[R-sig-ME] lme interaction result strange
Thompson,Paul
Paul.Thompson at SanfordHealth.org
Tue May 1 20:39:41 CEST 2012
There is another issue. From the error df, it seems like this is a multi-level/RM/multiple obs study, and SAS and R do not always agree on the computation of the df, as well as the type of SS that is being computed. You need to present both outputs, so that we can see both.
I know almost nothing about R, and so my comments may not be relevant.
-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Ista Zahn
Sent: Tuesday, May 01, 2012 12:51 PM
To: Charles Determan Jr
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] lme interaction result strange
Hi Charles,
My first guess is that you have (a) categorical variable(s) in your
predictors, and that the contrasts in SAS are different than those in
R.
Best,
Ista
On Tue, May 1, 2012 at 1:39 PM, Charles Determan Jr <deter088 at umn.edu> wrote:
> Dear R users,
>
> I have been working on replicating some linear mixed models from SAS. The
> first one matches perfectly when the SAS model is simple with the three
> separate factors.
>
> fit=lme(var~group+Event_name+Died,
> data=liv34,
> random=~1|ID)
> anova.lme(fit, type="marginal", adjustSigma=F)
>
> However, once I put an interaction into the formula the values don't match.
>
> fit=lme(var~group+Event_name+Died+Event_name*Died,
> data=liv34,
> random=~1|ID)
> anova.lme(fit, type="marginal", adjustSigma=F)
>
> numDF denDF F-value p-value
> (Intercept) 1 91 111.20483 <.0001
> group 1 23 0.46632 0.5015
> Event_name 5 91 1.14042 *0.3449*
> Died 1 23 0.50989 * 0.4824*
> Event_name:Died 5 91 1.10436 0.3637
> Done.
>
> The numbers *bold* don't match up. They should be approximately .0290 and
> .1318 respectively. The other two are still exact matches. I know looking
> for exact matches is ambitious but the numbers should be at least similar
> that the conclusions don't change so drastically.
>
> Any thoughts as to why this discrepancy is happening would be most
> appreciated.
>
> Regards,
>
> Charles
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
-----------------------------------------------------------------------
Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
privileged and confidential information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy
all copies of the original message.
More information about the R-sig-mixed-models
mailing list