Re: [R] lme: error message with random=~1

2005-01-07 Thread Ramon Diaz-Uriarte
On Wednesday 05 January 2005 16:29, Thomas Petzoldt wrote: Douglas Bates wrote: I'm not sure what model you want to fit here. To specify a random effect in lme you need both a grouping factor and a model matrix. The error message indicates that lme is unable to determine a grouping

Re: [R] lme: error message with random=~1

2005-01-05 Thread Dimitris Rizopoulos
Hi Thomas, random=~1 works if your data frame is in groupedData format, check this: # Orthodont is in groupedData format fm1 - lme(distance~age+Sex, data=Orthodont, random=~1) # dat - as.data.frame(Orthodont) fm2.1 - lme(distance~age+Sex, data=dat, random=~1) `dat' is an ordinary data.frame

Re: [R] lme: error message with random=~1

2005-01-05 Thread Thomas Petzoldt
Dimitris Rizopoulos wrote: Hi Thomas, random=~1 works if your data frame is in groupedData format, check this: # Orthodont is in groupedData format fm1 - lme(distance~age+Sex, data=Orthodont, random=~1) # dat - as.data.frame(Orthodont) fm2.1 - lme(distance~age+Sex, data=dat, random=~1) `dat'

Re: [R] lme: error message with random=~1

2005-01-05 Thread Douglas Bates
Thomas Petzoldt wrote: 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

Re: [R] lme: error message with random=~1

2005-01-05 Thread Dimitris Rizopoulos
: error message with random=~1 Dimitris Rizopoulos wrote: Hi Thomas, random=~1 works if your data frame is in groupedData format, check this: # Orthodont is in groupedData format fm1 - lme(distance~age+Sex, data=Orthodont, random=~1) # dat - as.data.frame(Orthodont) fm2.1 - lme(distance~age

Re: [R] lme: error message with random=~1

2005-01-05 Thread A.J. Rossini
On Wed, 05 Jan 2005 13:31:51 +0100, Thomas Petzoldt [EMAIL PROTECTED] wrote: Dimitris Rizopoulos wrote: Hi Thomas, random=~1 works if your data frame is in groupedData format, check this: # Orthodont is in groupedData format fm1 - lme(distance~age+Sex, data=Orthodont, random=~1)

Re: [R] lme: error message with random=~1

2005-01-05 Thread Thomas Petzoldt
Douglas Bates wrote: I'm not sure what model you want to fit here. To specify a random effect in lme you need both a grouping factor and a model matrix. The error message indicates that lme is unable to determine a grouping factor. It would be correct syntax if you added a single level

Re: [R] lme: error message with random=~1

2005-01-05 Thread Douglas Bates
Thomas Petzoldt wrote: Douglas Bates wrote: I'm not sure what model you want to fit here. To specify a random effect in lme you need both a grouping factor and a model matrix. The error message indicates that lme is unable to determine a grouping factor. It would be correct syntax if you