[R-lang] Helmert contrast and goodness of fit

Claire Delle Luche Claire.Delleluche at univ-lyon2.fr
Tue Jun 16 02:49:34 PDT 2009


Dear R users,

I am working on a lmer regression. I have two modality factors (factors A and B), and one that has four levels (factorC). For this factor, I want to compare level 1 with level 2, then level 1 with 3 and level 1 with 4.

model = lmer(DV ~ factorA + factorB + factorC +  factorA*factorC  + (1|Corpustext), data=corpus, family="binomial",contrasts = list(factorC = "contr.helmert"))

- I've included helmert contrast in the model, but how can I make sure that the contrasts are the ones I intended?
- If the interaction between factorA and factorC is not significant for one contrast, shall I remove this contrast (then, how can I do that) or keep it in the final model?

Finally, when I check my actual final model with the somers2 function, I get the following values:
          C         Dxy           n     Missing 
   0.769677    0.539354 1311.000000    0.000000
- Is my model properly fitted? (I know a Dxy of 1 is a perfectly fit model)

Many thanks for your help.

Claire Delle Luche

Laboratoire Dynamique du Langage
14, avenue Berthelot
69007 Lyon
France



More information about the R-lang mailing list