Skip to content

Different within-group error correlation matrices per group

3 messages · Luis Damiano, Kevin Wright

#
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;
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!
#
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 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
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: