[R-sig-ME] Mixed linear model with nested and interaction term
henganl2 at illinois.edu
Fri May 4 21:36:57 CEST 2018
Here is my SAS syntax and output :
proc mixed data=A method=type3; class Location Block Treatment;
model Yield= Treatment/ddfm=kr;
random Location Location*Treatment Block(Location);
Sum of Squares
Pr > F
And here is R output:
Analysis of Variance Table
Df Sum Sq Mean Sq F value
Treatment 4 34.847 8.7118 0.5085
I am not sure why the sum of square, and the F- value are different.
Maybe is because I use type III in SAS and in lmer is using REML?
I would also like to check the sum of square of other factors as SAS did, is there any way could do this in lmer?
I am really new to this, Thanks for your time!
�q: Ben Bolker [bbolker at gmail.com]
�H����: 2018�~5��4�� �U�� 01:39
��: Lin, Heng-An
�ƥ�: r-sig-mixed-models at r-project.org
�D��: Re: [R-sig-ME] Mixed linear model with nested and interaction term
This seems like a reasonable model specification. Can you show us
the results you're getting from R and SAS, and your SAS syntax (some
people here understand that language), so that we can see what looks
different? (It would help if you also wrote a few sentences about
what you see as the important differences between the results.)
On Fri, May 4, 2018 at 2:30 PM, Lin, Heng-An <henganl2 at illinois.edu> wrote:
> Hi all,
> I am analyzing my data with following model,
> model1 <- lmer(Yield~Treatment+(1|Location)+(1|Location:Treatment)+(1|Location:Block), data=A)
> in here, I want to set an random interaction term (Location*treatment) and an random nested term (block nested within location).
> But I couldn't get similar ANOVA results when I compare the output with SAS porc mixed output.
> So, I think i might make some mistake in the model in R...
> Can anyone give me some suggestion?
> Thanks in advance!
> [[alternative HTML version deleted]]
> R-sig-mixed-models at r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models