[R] R2BayesX

2015-02-03 Thread Shanley Chong
Hi, I am trying to run STAR logistic/binomial model using R2BayesX . A warning message came up every time when i included a random effect, bs='re', (unstructured spatial effect) into the model. The warning message is : Warning message: running command

Re: [R] reprojrecting longitude from 0 - 360 to -180 - 180

2015-02-03 Thread Michael Sumner
On Wed Feb 04 2015 at 5:10:02 AM John Wasige johnwas...@gmail.com wrote: Hello r community, This is to request for help on how to reprojrect longitude from 0 - 360 to -180 - 180 With the following script below, i get output transformed to something like rectangle. Is there a better way of

Re: [R] FFT Normalization Documentation

2015-02-03 Thread Jeff Newmiller
I see now the trick... the square wave clarified it for me. It is indeed faster than re-arranging the data if putting the zero frequency in the middle of the data is your goal. Since I only do that for the purposes of teaching I probably won't be using it, but it may well be an interesting

[R] How to tell if there is overdispersion in a GLMM?

2015-02-03 Thread maggy yan
I read something on http://glmm.wikidot.com/faq, under How can I deal with overdispersion in GLMMs?: library(lme4) ## 1.0-4set.seed(101) d - data.frame(y=rpois(1000,lambda=3),x=runif(1000), f=factor(sample(1:10,size=1000,replace=TRUE))) m1 - glmer(y~x+(1|f),data=d,family=poisson)

[R] rgl::writeWebGL( , prefix = , )

2015-02-03 Thread Keith.Jewell
Dear all, I am using writeWebGL to create an HTML page containing an interactive 3D plot. It works fine with the default prefix= but fails when I specify a prefix for different scenes displayed on the same web page (quoting ?writeWebGL). I'm sure I'm misreading the help, and would appreciate

[R-es] Duda sobre GLM

2015-02-03 Thread Matias Ledesma
Hola a todos! Tengo una duda acerca de una glm muy simple que estoy haciendo para analizar bioensayos de mortalidad con sedimento extra�do en cuatro estaciones de un puerto. El modelo es el siguiente: m1-glm (cbind (Mortalidad,Sobrev)~Muestra, family=binomial,data=dat2)

Re: [R] rgl::writeWebGL( , prefix = , )

2015-02-03 Thread Duncan Murdoch
On 03/02/2015 9:43 AM, keith.jew...@campdenbri.co.uk wrote: Dear all, I am using writeWebGL to create an HTML page containing an interactive 3D plot. It works fine with the default prefix= but fails when I specify a prefix for different scenes displayed on the same web page (quoting

Re: [R] Updating to R 3.1.1. - impacts on existing packages

2015-02-03 Thread Sun Shine
Thanks Jeff/ Henrik Jeff - that's what I needed: so far the update seems to be painless. Many thanks Sun On 03/02/15 01:45, Jeff Newmiller wrote: I think you missed the question, Henrik, which was directed at updating the local 3.1 library with all of the packages that were in the 3.0

Re: [R] the less-than-minus gotcha

2015-02-03 Thread Mike Miller
Kevin Thorpe wrote, Moral of story, computers do what you tell them, not what you meant. But hope springs eternal! Of course this aphorism explains neatly every problem I've ever run across while using a computer. But maybe someday they'll make a computer that undertands *me*! Peter

Re: [R] FFT Normalization Documentation

2015-02-03 Thread Franklin Bretschneider
Dear Elke; Jeff, Re: Eike: Understanding Discrete Fourier Transform theory is not trivial... while a vignette added to the stat package has the potential help a lot of users, it is a bit ambitious to try to supplant the extensive published material on using and interpreting the DFT

Re: [R] rgl::writeWebGL( , prefix = , )

2015-02-03 Thread Keith Jewell
Thanks Duncan, your suggestions led me to a solution. Perhaps this could be reflected in the help, but I'll leave that decision to you. It comes down to the template. As well as including a single line for each scene containing paste(%, prefix, WebGL%); e.g. %WebGL% or %AWebGL% the body

[R] Problem running stepAIC within a function.

2015-02-03 Thread Xochitl CORMON
I know it is pretty old but it seems that nobody answer this question. I ran into similar problem and the work around I found use the assign function. Indeed it seems than stepAIC look for the element it needs within the global environment. So if you define an object inside a function, you

Re: [R] xerror and xstd are missing from cptable of the Rpart package

2015-02-03 Thread Adams, Jean
Kim, The x in xerror and xstd stands for cross validation. But you have specified no cross validations, xval=0. Try: model - rpart(Product ~ ., data=trainData, control=rpart.control(minsplit=50, cp=0.002)) model$cptable Jean On Tue, Feb 3, 2015 at 7:09 AM, Kim C. minorthre...@hotmail.com

Re: [R] Error in running pkmodel function in mlxR package

2015-02-03 Thread lavielle
Hi RajPatil It seems that you are using an old version of mlxLibrary. You need to install mlxLibrary 1.1.0 from the Lixoft website http://download.lixoft.com/?software=mlxlibrary Marc -- View this message in context:

[R] xerror and xstd are missing from cptable of the Rpart package

2015-02-03 Thread Kim C.
Hello all, I'm making a decision tree with the rpart package. I want to prune the tree and in many tutorials it says to use cptable. Like so: opt - which.min(model_rpart$cptable[, xerror]) The problem is that when I look up model_rpart$cptable it only show the columns CP, nsplit, rel error. So

Re: [R] FFT Normalization Documentation

2015-02-03 Thread Eike Petersen
Dear Frank, thanks a lot for your reply. I was aware of the need for FFT normalization and folding, but you're making another good point here, stating that there should be examples on this (folding) in the documentation as it will pose quite an obstacle for newcomers attempting to practically

Re: [R] rJava Scientific Linux 6.5 - Can not install

2015-02-03 Thread stephen sefick
I have solved the problem. Here are the steps in case this will help anyone. 1) I downloaded, compiled, and installed latest R sources. 2) made sure I had all of the R development libraries install through packages manager 3) update java jkd 1.6* to java jkd 1.7* 4) ran sudo R CMD javareconf

Re: [R] rgl::writeWebGL( , prefix = , )

2015-02-03 Thread David Winsemius
On Feb 3, 2015, at 7:14 AM, Duncan Murdoch wrote: On 03/02/2015 9:43 AM, keith.jew...@campdenbri.co.uk wrote: Dear all, I am using writeWebGL to create an HTML page containing an interactive 3D plot. It works fine with the default prefix= but fails when I specify a prefix for different

Re: [R] rgl::writeWebGL( , prefix = , )

2015-02-03 Thread Duncan Murdoch
On 03/02/2015 11:15 AM, Keith Jewell wrote: Thanks Duncan, your suggestions led me to a solution. Perhaps this could be reflected in the help, but I'll leave that decision to you. It comes down to the template. As well as including a single line for each scene containing paste(%, prefix,

Re: [R] FFT Normalization Documentation

2015-02-03 Thread Jeff Newmiller
Eike: Understanding Discrete Fourier Transform theory is not trivial... while a vignette added to the stat package has the potential help a lot of users, it is a bit ambitious to try to supplant the extensive published material on using and interpreting the DFT (particularly as there is more

Re: [R] How to check a regression model's fit?

2015-02-03 Thread Jeff Newmiller
Many ways... but they all assume you know the background theory, which you don't seem to, and which is off-topic here. Consider reading some help files: ?summary.lm ?plot.lm Re: regression not existing... the classic case is when your data fit your model too perfectly... regression must have

Re: [R] rgl::writeWebGL( , prefix = , )

2015-02-03 Thread Duncan Murdoch
On 03/02/2015 12:18 PM, David Winsemius wrote: On Feb 3, 2015, at 7:14 AM, Duncan Murdoch wrote: On 03/02/2015 9:43 AM, keith.jew...@campdenbri.co.uk wrote: Dear all, I am using writeWebGL to create an HTML page containing an interactive 3D plot. It works fine with the default prefix= but

[R] reprojrecting longitude from 0 - 360 to -180 - 180

2015-02-03 Thread John Wasige
Hello r community, This is to request for help on how to reprojrect longitude from 0 - 360 to -180 - 180 With the following script below, i get output transformed to something like rectangle. Is there a better way of doing it? ### script convert longitude from 0 - 360 to -180 - 180

[R] How to check a regression model's fit?

2015-02-03 Thread TMF
as the title says (from an R begginer). Is it also possible that regression, in a given data's case, just doesn't exist -- for any type of applied regression modelling? Thanks! -- View this message in context: http://r.789695.n4.nabble.com/How-to-check-a-regression-model-s-fit-tp4702766.html

[R] AMBUR package will not build

2015-02-03 Thread CJ Jackson
I've been trying to build the latest version of the AMBUR package and have been having problems. I've noticed a few other packages experiencing build issues. The error appears to be on the R-Forge related based on what I've been researching about issues with building packages. I think it is a

Re: [R] collapse a list of dataframes

2015-02-03 Thread JS Huang
Hi, The following worked. data.frame(rbind(as.matrix(data.frame(a=1:3,b=letters[1:3])),as.matrix(data.frame(x=1:5,b=LETTERS[1:5] a b 1 1 a 2 2 b 3 3 c 4 1 A 5 2 B 6 3 C 7 4 D 8 5 E -- View this message in context:

Re: [R] AMBUR package will not build

2015-02-03 Thread Jeff Newmiller
You may be able to learn something useful from how the maptools package handles that dependency? --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics:

Re: [R] Get 10%, 50% and 90% Quantile of data samples with probability

2015-02-03 Thread JS Huang
Hi, For you first task and use your first row of data as an example. Define a function named dist to take care of the probability for each group. dist - function(x) + { + return(c(rep(x[1],15),rep(x[2],15),rep(x[3],25),rep(x[4],20),rep(x[5],25))) + } plot(ecdf(dist(c(2,3,2,5.3,7.3

Re: [R-es] Duda sobre GLM

2015-02-03 Thread Carlos J. Gil Bellosta
Hola, ¿qué tal? Leyendo con más cuidado me he dado cuenta de lo de los cero casos en control. Tu problema se puede reproducir con un ejemplo como dat - data.frame(a = c(10, 10, 10, 10), b = c(0,2,3,4), grupo = letters[1:4]) res - glm(cbind(a,b) ~ grupo, data = dat, family = binomial)

Re: [R] collapse a list of dataframes

2015-02-03 Thread William Dunlap
I don't think that worked as OP would like it too - all columns of the output are factors. data.frame(rbind(as.matrix(data.frame(a=1:3,b=letters[1:3])),as.matrix(data.frame(x=1:5,b=LETTERS[1:5] a b 1 1 a 2 2 b 3 3 c 4 1 A 5 2 B 6 3 C 7 4 D 8 5 E str(.Last.value) 'data.frame': 8 obs. of

Re: [R] Plot residuals against standard normal distribution

2015-02-03 Thread Mikael Olai Milhøj
Thx - this was exactly what I needed. Yes I also prefer the qqnorm but I like the distrubution chart as well. Thx ! /Mikael On Tue, Feb 3, 2015 at 12:18 AM, peter dalgaard pda...@gmail.com wrote: On 02 Feb 2015, at 23:42 , Mikael Olai Milhøj mikaelmil...@gmail.com wrote: Hi, I'm

Re: [R-es] Duda sobre GLM

2015-02-03 Thread Carlos J. Gil Bellosta
Hola, ¿qué tal? ¿Cómo son tus datos? Para un modelo como el que planteas, deberían tener cuatro filas (una para cada grupo) y en tal caso, sospecho, los grados de libertad menores. ¿Tienes varias filas por grupo con proporciones de mortalidad muy desiguales? ¿Existen otras variables

Re: [R] the less-than-minus gotcha

2015-02-03 Thread Martin Maechler
Steve Taylor steve.tay...@aut.ac.nz on Tue, 3 Feb 2015 03:11:47 + writes: Nobody would write x=x or indeed x-x; both are silly. If I found myself writing f(x=x) I might smirk at the coincidence, but it wouldn't bother me. I certainly wouldn't confuse it with

[R] Teaching materials for R course

2015-02-03 Thread Michael Haenlein
Dear all, I am Professor at a business school and I would like to develop a course about quantitative research using R. My current plan is that the course should cover (a) an introduction (assuming that students have never used R before), (b) basic econometric analysis (e.g., regression, logit)

Re: [R] How to tell if there is overdispersion in a GLMM?

2015-02-03 Thread Ben Bolker
maggy yan kiotoqq at gmail.com writes: I read something on http://glmm.wikidot.com/faq, under How can I deal with overdispersion in GLMMs?: library(lme4) ## 1.0-4set.seed(101) d - data.frame(y=rpois(1000,lambda=3),x=runif(1000), f=factor(sample(1:10,size=1000,replace=TRUE)))

Re: [R] New to R

2015-02-03 Thread Jim Lemon
Hi Lalitha, Your description is more like calculating a composite score from the values observed on ten attributes, which can then be ranked. Perhaps you want to standardize the observed values to insure that the result is not dominated by the attribute with the numerically highest variance. For