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

Ramon Diaz-Uriarte rdiaz at cnio.es
Fri Jan 7 13:32:17 CET 2005


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
> > factor.  It would be correct syntax if you added a single level factor
> > to the data frame and used that but then the model fit would fail
> > because you would be trying to estimate a variance in a model where
> > there is no variation in the term.
>
> O.k. I see and think I understand it.
>
> > It seems to me that you are trying to estimate parameters in a
> > mixed-effects model without any random effects and lme can't do that.
>
> Yes, what I want is a model without any random effects to be tested
> against a model with random effects. I want to show, that the random
> effects are negligible but that we account for pseudo replicates and
> have tested this explicitely.

Dear Tomas,

What about fitting the models with and without random effects using the gls 
function (instead of lme ---you'll need to change a bit the syntax in the 
model with random effects in lm), and using a LR test? 

R.
>
> I'm not sure what is better: to leave the random effects in the model or
>   simply an LR test against a linear model fitted by lm. I've never seen
> such an example in the books. Or have I missed a global alternative here?
>
> Thomas P.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

-- 
Ramón Díaz-Uriarte
Bioinformatics Unit
Centro Nacional de Investigaciones Oncológicas (CNIO)
(Spanish National Cancer Center)
Melchor Fernández Almagro, 3
28029 Madrid (Spain)
Fax: +-34-91-224-6972
Phone: +-34-91-224-6900

http://ligarto.org/rdiaz
PGP KeyID: 0xE89B3462
(http://ligarto.org/rdiaz/0xE89B3462.asc)


Este correo electronico y, en su caso, cualquier fichero anexo al mismo, contiene informacion exclusivamente dirigida a su destinatario o destinatarios. Si Vd. ha recibido este mensaje por error, se ruega notificar esta circunstancia al remitente. Las ideas y opiniones manifestadas en este mensaje corresponden unicamente a su autor y no representan necesariamente a las del Centro Nacional de Investigaciones Oncologicas (CNIO).


The information contained in this message is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator. Please note that the Spanish National Cancer Centre (CNIO), does not accept liability for any statements or opinions made which are clearly the sender's own and not expressly made on behalf of the Centre.




More information about the R-help mailing list