search for: datamix

Displaying 20 results from an estimated 35 matches for "datamix".

2011 Feb 28
0
lme error message: Error in getGroups.data.frame(dataMix, groups) :
Windows XP R 2.10 I am trying to run lme and get the following error: > fitRandom <- lme(values ~ subject, + data=withindata) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups my data follows, below which is a copy of all my code > > print(withindata) subject values 1 1 2.3199639 2 1 -8.5795802 3 1 -4.1901241 4 1 0.4588128 5 1 16.9128232 6 1 8.9856358 7 1...
2012 Sep 14
1
linear mixed-effects models with two random variables?
...#glm glm1 <- glm (Biomass ~ fReserve * Roughness + fReserve * DivBoulders , family= Gamma, data= myData) #glmm: library (nlme) lme1 <- lme (Biomass ~ fReserve , random= ~1 + fReserve | Roughness + DivBoulders , data= myData ) # random intercept and slope #Error in getGroups.data.frame(dataMix, groups) : # Invalid formula for groups # if I only use one random variable I have: #Error in chol.default((value + t(value))/2) : #the leading minor of order 2 is not positive definite lme2 <- lme( Biomass ~ fReserve , random = ~1 | Roughness + DivBoulders ,data=myData) #random interce...
2002 Mar 08
3
Unbalanced ANOVA in R?
...t archives an found a post by Prof. Ripley saying one should use the lme function for (among other things) unbalanced ANOVAs, but I have not been able to use this object. My code gives me an error.. Why is that ? > aov(lme(DELAY ~ DOSE + TRIALS,data=epinuneq)) > Error in getGroups.data.frame(dataMix, groups) : > Invalid formula for groups Any ideas? How do I get an ANOVA computation that can handle uniqual sampe sizes in R? /Fredrik -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html...
2005 Jan 05
2
lme: error message with random=~1
...pseudo replication I used nlme (or lme4 as suggested for crossed random factors). The results indicate, that the random effects are very small, so I followed the lme example and tried to fit a model with random=~1. Unfortunately I got the following error message: Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups I suppose, that it would be redundant (and confusing to the reader) if we leave unnecessary random effects in the model, but due to pseudo replication it may be an offense if we simply ignore it and use lm. Reading the respective chapters in Pinheiro &...
2011 Oct 09
2
pdIdent in smoothing regression model
...knots <- seq(94,121,length=25) n <- length(x) X <- cbind(rep(1,n),x) Z <- outer(x,knots,"-") Z <- Z*(Z>0) fit <- lme(y~-1+X,random=pdIdent(~-1+Z)) When I ran the code fit <- lme(y~-1+X,random=pdIdent(~-1+Z)) I got an error message: Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups I was really puzzled. I asked Dr. Ngo and he said they did it in S-plus but not R. Does anyone knows how to do it in R? Thanks! Lei Liu Associate Professor Division of Biostatistics Department of Public Health Sciences University of Virginia School of Medi...
2003 Apr 14
1
Problem with nlme or glmmPQL (MASS)
...od1 <- glmmPQL( S817 ~ MIEMBROScat+S901+S902A+S923+URBRUR+REGION+ + S102+S103+S106A+S108+S110A+S109A+S202+S401+S557A+S557B+ + YHOGFcat, data=Hogares, random= ~1, family=binomial, + na.action=na.omit) iteration 1 Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups > getGroupsFormula(Hogares) ~ID08 Hogares is a groupedData object. The only non-default thing I have done is to use order.groups=FALSE in groupedData, since the response is a factor and the max ordering function does not apply. What is wring he...
2003 Oct 31
1
cross-classified random factors in lme without blocking
...like y~a+b but with a and b random? Everything I've tried gives an error: > lme(y~1,random=~1|(a+b)) Error in switch(mode(object), name = , numeric = , call = object, character = as.name(object), : [[ cannot be of mode ( > lme(y~1,random=~a+b) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups Thanks Gordon
2004 Apr 11
1
converting lme commands from S-PLUS to R
...) x <- runif(200) y <- sin(3*pi*x) + rnorm(200)*.4 ## library(splines) z <- ns(x, 4) The following runs without error on S-PLUS f <- lme(y ~ 1, random = pdIdent(~ -1 + z)) But in R I get library(nlme) > f <- lme(y ~ 1, random = pdIdent(~ -1 + z)) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups Does the S-PLUS lme have some default setting that R doesn't? Any help would be appreciated. Thanks, -roger
2010 Jun 15
1
lme, spline
Dear All, I have a problem running this program on R. Z is a matrix of spline which is random > fit<-lme(anc~X,random=pdIdent(~Z)) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups What I have done wrong?
2009 May 11
1
Error in NLME (nonlinear mixed effects model)
...a random effect (level2), though so far I have only experimented with the highest level grouping (fixed, level1), with the following code: mod1 <- nlme(H ~ a*(1-exp(-b*D^c)), data=sizes, fixed=a+b+c~factor(Loc), start=c(a=75,b=0.05,c=0.7)) This returns the error: Error in getGroups.data.frame(dataMix, eval(parse(text = paste("~1", deparse(groups[[2]]), : Invalid formula for groups Other points that it may be useful to note in diagnosing the problem are that: 1) I have tried both specifying Loc=as.factor and not specifying this. 2) I have tried other configurations of writi...
2000 Mar 14
1
Error in lme? (PR#488)
...79) Hi everyone, I've just installed R for Windows - I've previously been using it on Linux - and I've run into a problem when using lme. The lme routine throws up an error in the getGroups.data.frame command, complaining about an error in the formula: Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups getGroups works just fine, and I haven't run into this problem previously. Any ideas? Best wishes Simon -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hor...
2005 Jul 14
1
Error running lme.
I am trying to fit lme using R 2.1.1 under Windows 2k. I am getting the following message noted below. Any suggestions that would help me correct my error would be greatly appreciated. Thanks, John > fit1lme<-lme(Velocity~time,data=gate) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC and University of Maryland School of Medicine Claude Pepper OAIC University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical...
2005 Apr 26
1
Error in nonlinear mixed-effects model
...LME. I have defined my data as a groupedData object, and when I try to fit the model I get this error message: dat<-groupedData(V~VAC|ID,data=dat) attach(dat) mod<-nlme(V~A*exp(B*YEAR)*VAC, fixed=A+B~1, random=A+B~1, correlation=corCAR1(), start=c(A=1.2,B=0.2)) Error in getGroups.data.frame(dataMix, eval(parse(text = paste("~1", deparse(groups[[2]]), : Invalid formula for groups Do you have any clue of what?s happening? It?s the first time I fit a model like this in R, so the problem is probably pretty obvious, but I cannot see it. Thank you very much, Antonio
2005 Jan 05
0
lme, glmmPQL, multiple random effects
...k provided below). Am I trying something that is impossible at the moment, or just doing something wrong? Cheers andrew > m2<-glmmPQL(Mate1~Cross,data=gd,random=pdBlocked(list(pdIdent(~Female -1),pdIdent(~Male-1))),family="binomial") iteration 1 Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups > traceback() 8: stop("Invalid formula for groups") 7: getGroups.data.frame(dataMix, groups) 6: getGroups(dataMix, groups) 5: lme.formula(fixed = zz ~ Cross, random = list(numeric(0), numeric(0)), data = list(Mate1 = c(1, 1, 1, 0, 1, 1...
2005 Jan 26
1
Specification of factorial random-effects model
...2,49.45,50.75,49.56) anovamodel <- aov(y ~ c + Error(a*b)) summary(anovamodel) lmemodel <- lme(y ~ c, random = ~ 1|a*b) anova(lmemodel) N.B. You have to load the package 'nlme' before lme() will run at all. When it does run, it gives the error Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups I think there is something I haven't understood about the syntax of the argument 'random' in lme() . Can anyone explain it to me? Nick Galwey [[alternative HTML version deleted]]
2009 Oct 12
1
package nlme
...t;,"A2","A3"),each=3),3), Stand=rep(c("B1","B2","B3"),9), Block=rep(1:3,each=9)) Rice.lme<-lme(Yield ~ Variety + Stand + Block,data=Rice) And error will be like below: Wrong at getGroups.data.frame(dataMix, groups) : Invalid formula for groups can you give me some advice and you will be appreciated. Thanks. Wenjun. [[alternative HTML version deleted]]
2007 Jan 18
1
How to specify arguments in lme() ?
...a mixed effect model using lme(). I have read the R documention on lme(), but I am still not clear how to specify the random argument. I tried to do:- fit2<-lme(Score~A*B+A*C+B*C,data=test,random=~A, na.action=na.pass) but the system give a message as follows:- Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups So how should I specify the arguments? Thank you very much for your help! Jiajie
2006 Aug 09
1
nested ANOVA using lme
...ecify a nested factor using the "lme" function. I have tried: >firstgo<-lme(Diam~Env+Env:Site,data=environ) >secondgo<-lme(Diam~Env+Env%in%Site,data=environ) >thirdgo<-lme(Diam~Env+Env/Site,data=environ) But I keep getting this error: Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups If anyone could help me with code for specifying a random nested factor using lme that would be great. Thanks, David Semmens.
2006 Jul 25
1
how to fit with "lme" function
...+ X3, data = data.fr, random = ~ Z1 + Z2 + Z3 + Z4 + Z5) where: int is a vector of 1 in matrix X, used for the intercept term "b0", X1, X2, X3 are columns of matrix X, Z1 to Z5 are columns of matrix Z, data.fr = data.frame(y,X,Z). I got the error message: Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups Could you please suggest me know to solve this problem? Do I use incorrect arguments? Thank you very much. Nantachai
2006 Mar 28
3
fixed effects
...Suggestion: maybe a different notation to name packages would be more intuitive in the help system. yes, I know it now, but other novices may not. even a colon instead of a () may be more intuitive in this context. > library(nlme); ?lme and then > lme(y ~ X) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups now I have to beg for some help. ok, blatant free-riding. the lme docs tells me it does the Laird and Ware model, but I do not know this model. the only two examples given at the end of the lme help file seem to be similar to what I just specified....