[R] SAS Proc Mixed and lme

Kellie J. Archer, Ph.D. kjarcher at vcu.edu
Fri Jun 30 21:08:53 CEST 2006


I am trying to use lme to fit a mixed effects model to get the same
results as when using the following SAS code:

proc mixed;
class refseqid probeid probeno end;
model expression=end logpgc / ddfm=satterth;
random probeno probeid / subject=refseqid type=cs;
lsmeans end / diff cl; run;

There are 3 genes (refseqid) which is the large grouping factor, with
2 probeids nested within each refseqid, and 16 probenos nested within
each of the probeids.

I have specified in the SAS Proc Mixed procedure that the
variance-covariance structure is to be compound symmetric. Therefore,
the variance-covariance matrix is a block diagonal matrix of the form,

V_1  0   0
0   V_2  0
0    0   V3

where each V_i represents a RefSeqID. Moreover, for each V_i the
structure within the block is

v_{11}   v{12}
v_{21}   v{22}

where v_{11} and v_{22} are different probeids nested within the
refseqid, and so are correlated. The structure of
both v_{11} and v_{22} are compound symmetric, and v_{12} and v{21}
contain a constant for all elements of the matrix.

I have tried to reproduce this using lme, but it is unclear from the
documentation (and Pinheiro & Bates text) how the pdBlocked and
compound symmetric structure can be combined.

fit.lme<-lme(expression~End+logpgc,random=list(RefSeqID=pdBlocked(list
(~1,~ProbeID-1),pdClass="pdSymm")),data=dataset,correlation=corCompSym
m(form=~1|RefSeqID/ProbeID/ProbeNo))


The point estimates are essentially the same comparing R and SAS for
the fixed effects, but the 95% confidence intervals are much shorter
using lme(). In order to find the difference in the algorithms used by
SAS and R I tried to extract the variance-covariance matrix to look at
its structure. I used the getVarCov() command, but it tells me that
this function is not available for nested structures. Is there another
way to extract the variance-covariance structure for nested models?
Does anyone know how I could get the var-cov structure above using
lme?


Kellie J. Archer, Ph.D.
Assistant Professor, Department of Biostatistics
Fellow, Center for the Study of Biological Complexity
Virginia Commonwealth University
1101 East Marshall St., B1-066
Richmond, VA 23298-0032
phone: (804) 827-2039
fax: (804) 828-8900
e-mail: kjarcher at vcu.edu
website: www.people.vcu.edu/~kjarcher



More information about the R-help mailing list