# [R] SAS Proc Mixed and lme

From: Kellie J. Archer, Ph.D. <kjarcher_at_vcu.edu>
Date: Sat 01 Jul 2006 - 05:08:53 EST

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@vcu.edu
website: www.people.vcu.edu/~kjarcher

R-help@stat.math.ethz.ch mailing list
{"ft_lang_label":"__label__en","ft_lang_prob":0.80036646,"math_prob":0.8020788,"size":2596,"snap":"2020-10-2020-16","text_gpt3_token_len":685,"char_repetition_ratio":0.10609568,"word_repetition_ratio":0.0,"special_character_ratio":0.24614792,"punctuation_ratio":0.12770137,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9617078,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-03-30T00:36:28Z\",\"WARC-Record-ID\":\"<urn:uuid:97a56689-ff16-4ee7-af05-8ca6cd2c41c3>\",\"Content-Length\":\"8305\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:48f35f90-82d6-4a38-8367-6047573b2fff>\",\"WARC-Concurrent-To\":\"<urn:uuid:aa33cbd7-99dd-4614-876e-5b3ed3d9825f>\",\"WARC-IP-Address\":\"99.84.181.20\",\"WARC-Target-URI\":\"https://tolstoy.newcastle.edu.au/R/help/06/07/30155.html\",\"WARC-Payload-Digest\":\"sha1:3KG2CQRDUI7QAPCTYE6LPLRDE5XPODVD\",\"WARC-Block-Digest\":\"sha1:VKU27SGUG32KLIPAQXOUKVJFPA2OSS6W\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-16/CC-MAIN-2020-16_segments_1585370496330.1_warc_CC-MAIN-20200329232328-20200330022328-00522.warc.gz\"}"}