[R] beginner gls (nlme) question
Simon.Blomberg at anu.edu.au
Thu Jul 3 02:53:22 CEST 2003
I am trying to get a handle on gls (package nlme). I have a toy problem: 3 fixed factors (A, B, C), two levels each, 5 replicates per treatment. The response variable is continuous, normal. I have a correlation matrix of the form:
A B C
A 1.00 0.75 0
B 0.75 1.00 0
C 0.00 0.00 1
which is common to all observations.
How do I construct the call to gls? I think I need to use correlation=corSymm(), but I do not understand the precise syntax. I have read the relevant parts of Pinheiro and Bates, but they only talk about cases where the corSymm correlation structure is modelled, rather than known. I have also searched the R archives, but no luck.
I think it should be of the form gls(response~A*B*C, data=dat, correlation=corSymm(...?))
but I don't understand the arguments to corSymm.
Thanks in advance,
Simon Blomberg, PhD
Depression & Anxiety Consumer Research Unit
Centre for Mental Health Research
Australian National University
Simon.Blomberg at anu.edu.au +61 (2) 6125 3379
More information about the R-help