[R-sig-ME] mismatch between R lme and SPSS mixed model

Julio Alejandro Di Rienzo dirienzo.julio at gmail.com
Wed Apr 6 22:34:35 CEST 2016

A detail about anova function, applied to lme objects is that it returns
asequential hypothesis tests. In this type of hypothesis, with unbalance in
the number of replicates for each treatment, the order of factors affects

Usually, most software displays type III hypotesis test, which are probably
the way SPSS is reporting the anova table. The way to obtain type III sum
of squares in lme anova has 2 steps.

1.   You must redefine the way factors are coded in the model matrix. If
say you have a factor named F1 y a data frame named myData, you have to use
the following sentence:


2. When calling anova function you need another parameter to be specified

    anova(mymodel, *type="marginal"*)

You can even have differences if there are "corrections" on the denominators
degree of freedom.

Good luck

	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list