similar to: Error in lme? (PR#488)

Displaying 20 results from an estimated 20000 matches similar to: "Error in lme? (PR#488)"

2004 Apr 11
1
converting lme commands from S-PLUS to R
I'm trying to do some smoothing with lme and am having some difficulty bringing commands over from S-PLUS to R. I have the following setup (modified from Ngo and Wand, 2004): set.seed(1) 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
2003 Oct 31
1
cross-classified random factors in lme without blocking
On page 165 of Mixed-Effects Models in S and S-Plus by Pinheiro and Bates there is an example of using lme() in the nlme package to fit a model with crossed random factors. The example assumes though that the data is grouped. Is it possible to use lme() to fit crossed random factors when the data is not grouped? E.g., y <- rnorm(12); a=gl(4,1,12); b=gl(3,4,12). Can I fit an additive model
2012 Sep 14
1
linear mixed-effects models with two random variables?
Dear R users, Does anyone knows how to run a glmm with one fixed factor and 2 random numeric variables (indices)? Is there any way to force in the model a separate interaction of those random variables with the fixed one? I hope you can help me. #eg. Reserve <- rep(c("In","Out"), 100) fReserve <- factor(Reserve) DivBoulders <- rep
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
2006 Aug 09
1
nested ANOVA using lme
I have an ANOVA model with 2 factors "Environment" and "Site", "Diameter" is the response variable. Site should be nested within Environment. Site is also a random factor while Environment is fixed. I can do this analysis using the "aov" function by using these commands: >model<-aov(Diam~Env+Error(Env%in%Site),data=environ) >summary(model)
2007 Jan 18
1
How to specify arguments in lme() ?
Hi, I have a question about the function lme() in R. I have a 2*2*3 layout with some missing data (labelled as *). These 3 factors are labelled as A,B,C, the response is Score. The layout is as follows:- A B C Score 1 1 1 5 1 1 2 * 1
2006 Jul 25
1
how to fit with "lme" function
Hi everone, I have a question on using lme on a mixed effects model. The linear mixed model is in the form of: y = bX +Zu + e where "X" and "Z" are the matrices, "b" is the coefficient vector of fixed effects, "u" is the coefficient vector of random effects, and e is an error vector. I would like to use "lme" function to fit the model and
2005 Jan 05
2
lme: error message with random=~1
Hello, I have an unbalanced mixed model design with two fixed effects "site" (2 levels) and "timeOfDay" (4 levels) and two random effects "day" (3 consecutive days) and "trap" (6 unique traps, 3 per site). The dependent variable is the body length ("BL") of insect larvae from 7 to 29 individuals per trap (104 individuals in total). To account
2008 May 24
1
Problems with lme
Hello, I want to perform an lme on a database with this structure: ID Sequence Temperature Tumour Error 1 5 0 1 8.721872e-08 1 5 0 2 8.695348e-08 1 5 0 3 2.019604e-13 1 5 37 1
2001 Aug 29
1
lme questions
Dear list, the following should fit the model log(PEPC.Wert)=fKTemp+fHerk+interaction(fKTemp,fHerk)+fMub+error, where fKTemp, fHerk are fixed effect factors and fMub is a random effects factor nested in fHerk (values are different fopr different values of fHerk). > logpepcr1 <- lme(log(PEPC.Wert) ~ fKTemp*fHerk, random= ~ 1 | fMub, na.action=na.omit) The following should be without the
2008 Mar 14
1
Lme does not work without a random effect (UNCLASSIFIED)
Classification: UNCLASSIFIED Caveats: NONE Dear R users, I'm interested in finding a random effect of the Block in the data shown below, but 'lme' does not work without the random effect. I'm not sure how to group the data without continuous value which is shown in the error message at the bottom line. If I use 'aov' with Error(Block), is there a test method comparing
2008 May 09
1
lme() with two random effects
Hi all, I have collected response time data from 178 participants ('sub') for each combination of 4 within-Ss factors ('con','int','tone','cue'). Additionally, I have recorded the gender of each participant, so this forms a between-Ss factor ('gender'). Normally this would be analyzed using aov:
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?
2010 Oct 18
1
Crossed random effects in lme
Dear all, I am trying to fit a model with crossed random effects using lme. In this experiment, I have been measuring oxygen consumption (mlmin) in bird nestlings, originating from three different treatments (treat), in a respirometer with 7 different channels (ch). I have also measured body mass (mass) for these birds. id nest treat year mlmin mass ch hack 1EP51711 17
2002 Mar 08
3
Unbalanced ANOVA in R?
Hi all I'm trying to complete a textbook example originally designed for SPSS in R, and I therefore need to find out how to compute an unbalanced ANOVA in R. I did a search on the mailinglist 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
2005 Jan 26
1
Specification of factorial random-effects model
I want to specify two factors and their interaction as random effects using the function lme(). This works okay when I specify these terms using the function Error() within the function aov(), but I can't get the same model fitted using lme(). The code below illustrates the problem. a <- factor(rep(c(1:3), each = 27)) b <- factor(rep(rep(c(1:3), each = 9), times = 3)) c <-
2011 Oct 09
2
pdIdent in smoothing regression model
Hi there, I am reading the 2004 paper "Smoothing with mixed model software" in Journal of Statistical Software, by Ngo and Wand. I tried to run their first example in Section 2.1 using R but I had some problems. Here is the code: library(nlme) fossil <- read.table("fossil.dat",header=T) x <- fossil$age y <- 100000*fossil$strontium.ratio knots <-
2009 Oct 12
1
package nlme
Hi R Users, When I use package nlme for linear model with random effects, there exists errors and I don't know the data structure of lme. Here is my data: Rice<-data.frame(Yield=c(8,7,4,9,7,6,9,8,8,8,7,5,9,9,5,7,7,8,8,8,4,8,6,4,8,8,9), Variety=rep(rep(c("A1","A2","A3"),each=3),3),
2006 Mar 28
3
fixed effects
dear R wizards: X is factor with 20,000*20=800,000 observations of 20,000 factors. I.e., each factor has 20 observations. y is 800,000 normally distributed data points. I want to see how much R^2 the X factors can provide. Easy, right? > lm ( y ~ X) and > aov( y ~ X) Error: cannot allocate vector of size 3125000 Kb is this computationally infeasible? (I am not an expert, but
2002 Jan 22
1
lme and mixed effects
Dear r-help, With lme, is there a way to specify multiple fixed factors under one level of grouping? For example, for a single fixed factor, I use the following: fm1.lme <- lme(fixed=resp ~ fact1, random=~1|subj/fact1, data=mydata) I would like to have multiple factors under subj, like the following for a two-way design, but I get an error: fm2.lme <- lme(fixed=resp ~ fact1*fact2,