Re: [R] lme command

From: Joshua Wiley <jwiley.psych_at_gmail.com>
Date: Mon, 14 Jun 2010 08:59:45 -0700

Hello Enrico,

One thing I notice between your two calls is that in the second you specify data=dados, but you do not in the first. When I try to do something similar to your formulae using one of my longitudinal datasets, I get the same results whether or not I put the formula for random in a list. Perhaps you could provide some sample data that shows what is happening?

One other comment, rather than specifically adding each term and interaction, you can use this shorthand:

Altura~(Idade+Idade2)*(sexo+status)

Best regards,

Josh

On Mon, Jun 14, 2010 at 6:37 AM, Enrico Colosimo <enricoc57_at_gmail.com> wrote:
> Hi,
>
> I am doing a longitudinal data set fit using lme.
> I used two forms of the lme command and I am
> getting two different outputs.
>
> FIRST
> out<-lme(Altura~Idade+Idade2+sexo+status+Idade:sexo+Idade:status+Idade2:sexo+Idade2:status,
> random=(list(ident=~Idade+Idade2)))
>
> SECOND
> out<-lme(Altura~Idade+Idade2+sexo+status+Idade:sexo+Idade:status+Idade2:sexo+Idade2:status,
> random= ~Idade+Idade2|ident,data=dados)
>
> I got weird results from the first one and could not understand the
> reason of it. All the results are
> exactly the same but  the intercetp, and the two main terms sexo
> (gender) and status (treatment).
> That differences made a lot of difference in the final results.
>
> Anybody can tell me what is the differences  between them?
> Thanks.
>
> Enrico.
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Joshua Wiley
Ph.D. Student
Health Psychology
University of California, Los Angeles

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 14 Jun 2010 - 16:02:19 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 14 Jun 2010 - 16:10:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive