From: Spencer Graves <spencer.graves_at_pdf.com>

Date: Thu 18 May 2006 - 12:04:17 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu May 18 12:09:27 2006

Date: Thu 18 May 2006 - 12:04:17 EST

First, an almost trivial observation: The model you specified for lme could more succinctly be specified as follows:

y ~ (a + b + c)^3

This expression implies the second and third order interactions. It does NOT imply squared terms in case any two of "a", "b", or "c" are numeric.

To your question: Do you get the same result when you omit the "correlation" argument?

- If yes, how can you further simplify the example to make it self contained, so someone else can actually see what you see and replicate the discrepancy that you see?
- If no, have you studied ch. 5 of Pinhiero and Bates, including working through the script file "ch05.R" included in "~\R-2.3.0\library\nlme\scripts" wherever you have R installed; if you aren't using R 2.3.0 and nlme 3.1-72, please upgrade.

Also, PLEASE do read the posting guide! "www.R-project.org/posting-guide.html". I very much appreciate you telling us you have Pinheiro and Bates. If you could have also included a simple, self-contained example, I might have been able to provide a more useful reply with less effort than what I've expended in writing these few lines.

Ich hofe dass diese weinige Woerter koenen Sie hilfen. Spencer Graves

Jörg Trojan wrote:

> Dear experts,

*>
**> I'm trying to transfer a mixed model developed in SAS to R. This it what
**> it looks like in SAS:
**>
**> proc mixed method=ml;
**> class a b c subj;
**> model y = a|b|c;
**> repeated /subject=subj type=ar(1);
**>
**> I tried something like this in R:
**>
**> mixed <- lme(y ~ a + b + c + a*b + a*c + b*c + a*b*c,
**> random = ~ 1 | subj,
**> correlation = corAR1(form = ~ 1 | subj)
**> na.action = na.omit, method = "ML")
**>
**> When I do an anova(mixed) the denomniator DFs do not compare to the ones
**> SAS uses in calculating Type III results, In R a common, quite high
**> (close to the total number of observations) denominator DF value is used
**> for all effects, while SAS seems to calculate the DFs directly from the
**> number of class categories. So obviously I have to specify my random
**> effects in R differently, but I don't know how...
**>
**> Any hint on what I'm doing wrong is very much appreciated.
**>
**> Thanks,
**> Jörg
**>
**> P.S. I have the Mixed Model book by Pinheiro and Bates here with me in
**> case you can direct me to a specific section explaining my problem.
**>
**> ______________________________________________
**> R-help@stat.math.ethz.ch mailing list
**> https://stat.ethz.ch/mailman/listinfo/r-help
**> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
*

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu May 18 12:09:27 2006

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.1.8, at Thu 18 May 2006 - 16:10:10 EST.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*