Skip to content
Prev 333080 / 398503 Next

Different output from lm() and lmPerm lmp() if categorical variables are included in the analysis

RTFM!!! :-)

The help explicitly says "The default contrasts are set internally to 
(contr.sum, contr.poly) ....".

Set

     options(contrasts=c("contr.sum","contr.poly"))

before your call to lm() and "atest" will agree with "aptest" all down 
the line.

     cheers,

     Rolf Turner
On 11/08/13 21:35, Agustin Lobo wrote: