[R-sig-ME] Different within-group error correlation matrices per group

Luis Damiano luiggi at gmail.com
Thu Oct 29 02:16:16 CET 2015


Dear Kevin,

I must confess I found both sites on google before asking here, but I could
not make much sense out of them. It clicked now that I realised lme models
different variances per factor through variance functions and not through
the correlation structure. It is even covered in the book I searched on.

Just in case it is of help for future readers, the following model

> lme(fixed = y~1+time, random = ~1+time|ind, correlation = NULL, weights =
varIdent(form = ~ 1 | group))

has both fixed (intercept and slope) and random (again intercept and slope)

On 28 October 2015 at 14:59, Kevin Wright <kw.stat at gmail.com> wrote:

> You might find the following links contain some useful information.
>
>
> http://stackoverflow.com/questions/11819720/converting-repeated-measures-mixed-model-formula-from-sas-to-r
>
> Factor-specific variances in R
> https://rpubs.com/bbolker/6298
>
> Harris wateruse
> http://www.inside-r.org/packages/cran/agridat/docs/harris.wateruse
>
>
> On Tue, Oct 27, 2015 at 8:57 PM, Luis Damiano <luiggi at gmail.com> wrote:
>
>> Dear all,
>>
>> I am working with lme and I would like to have different within-group
>> error
>> correlation matrices per group (\Lambda_i in 5.1 from Pinheiro & Bates).
>>
>> Currently, my sentence looks like the following
>>
>> correlation = corCompSymm(form = ~ 1 | ind)
>>
>>
>> which imposes the SC structure into the within-group error correlation
>> matrix, marking the individuals by "ind".
>>
>> According to the following example in SAS given by an instructor, it is
>> possible to estimate different within-group error correlation matrices per
>> sex using the following sentences (see "group=gender" in fourth line):
>>
>> proc mixed  data=dental;
>> >   class  child gender;
>> >   model distance = gender gender*age / noint solution;
>> >   repeated / group=gender subject=child;
>> >   random intercept age / type=un subject=child g gcorr v vcorr;
>> > run;
>>
>>
>> I cannot figure out how to reproduce this in R. I took a look at the
>> documentation as well as the first five chapters of Pinheiro & Bates
>> (2000)
>> without luck.
>>
>> Cheers!
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>
>
>
> --
> Kevin Wright
>

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list