# Re: [R] lme - Random Effects Struture

From: harry wills <harry.wills_at_gmail.com>
Date: Thu 29 Jun 2006 - 01:04:54 EST

Thanks for the help Dimitris,

However I still have a question, this time I'll be more specific,

the following is my SAS code

proc mixed data=Reg;

```        class ID;
model y=Time Time*x1 Time*x2 Time*x3 /S;
random intercept Time /S type=UN subject=ID G GCORR V;
repeated /subject = ID R RCORR;
```

run; **

(Type =UN for random effects)

The eqivalent lme statement I am using is :

reglme <- lme(y ~ Time+Time*x1+Time*x2+Time*x3, data=Reg, random = ~ Time | ID)

When I compare the results, the values differ by considerable margin; I suppose this is due to the Random effects covariance structure. R output tells me that the structure is

"Structure: General positive-definite, Log-Cholesky parametrization"

Hence the problem for me is how to control this structure in R. Any help would appreciated

Thanks

Harry

On 6/28/06, Dimitris Rizopoulos <dimitris.rizopoulos@med.kuleuven.be> wrote:
>
> AFAIK lme(), by default, estimates the covariance between two or more
> random-effects, thus you do not have to specify anything. You're
> probably looking for something like:
>
> fit <- lme(y ~ time * treat, random = ~ time | subject)
> fit
> summary(fit)
>
>
> I hope it helps.
>
> Best,
> Dimitris
>
> ----
> Dimitris Rizopoulos
> Ph.D. Student
> Biostatistical Centre
> School of Public Health
> Catholic University of Leuven
>
> Address: Kapucijnenvoer 35, Leuven, Belgium
> Tel: +32/(0)16/336899
> Fax: +32/(0)16/337015
> Web: http://med.kuleuven.be/biostat/
> http://www.student.kuleuven.be/~m0390867/dimitris.htm
>
>
> ----- Original Message -----
> From: "harry wills" <harry.wills@gmail.com>
> To: <r-help@stat.math.ethz.ch>
> Sent: Wednesday, June 28, 2006 9:02 AM
> Subject: [R] Linear Mixed Effects
>
>
> > Hi,
> > I have implemented the lme in SAS and specified the random effects
> > covariance structure as unstructured using the statement "random /
> > type=UN"
> > I want to specify same in R but not able to know how to do it.
> > Thanks
> >
> >
> > --
> > Wills, Harry
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > http://www.R-project.org/posting-guide.html
> >
>
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>
>

```--
Wills, Harry

[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
```
Received on Thu Jun 29 02:18:21 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 29 Jun 2006 - 04:13:08 EST.

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