[R-sig-ME] effect of adding a constant to predictor
Don Cohen
don-r-help at isis.cs3-inc.com
Tue Sep 5 17:46:06 CEST 2017
I expected that adding a constant to an input in a mixed
model would affect some of the coefficients, but not such basic
stuff as AIC (or loglik, from which it is derived).
But I seem to have been wrong about that:
> AIC(lmer(output ~ input1 + I(input1 * input2) + input2 + ((1 | group) + (0 + input2 | group)) , data=xxx, REML=F, control=contr))
[1] 1556.341
> xxx$input2 = xxx$input2 + 1
> AIC(lmer(output ~ input1 + I(input1 * input2) + input2 + ((1 | group) + (0 + input2 | group)) , data=xxx, REML=F, control=contr))
[1] 1551.005
Can someone explain why this change to input2 affects AIC (or loglik) ?
BTW, changing (0 + input2 | group) to (0 + input1 | group)
produces the same AIC before and after the change to input2.
More information about the R-sig-mixed-models
mailing list