[R] lrm -interaction without main effect-error message

Eva Mosner EvaMosner at web.de
Tue Apr 1 16:09:59 CEST 2008

Dear all,

this might be not only an R-question but also a statistical.
When I do a logistic regression analysis (species distribution modeling) 
with function lrm (Design package) I get the follwoing error message:

 > tadl1<-lrm(triad~fd+dista+fd2+dista2+fd:dista+dista:geo2, x=T, y=T)

Error in if (!length(fname) || !any(fname == zname)) { :

  missing value where TRUE/FALSE needed

The problem seems to be that geo2 (factor variable with 3 levels) is not 
included as main effect. But when I run the same model with glm it is 
working properly.
However, from an ecological point of view, inclusion of only the 
interaction term makes sense. When running the model with inclusion of 
both main effect and interaction, main effect has no significant 
influence and the interaction only marginaly. And LR-Test underlines 
model simplification.
Does anyone know how to solve the problem? I need the lrm function since 
I have to validate my models via bootstrapping (validate.lrm).

Many thanks!

Eva Mosner
Lilienstraße 9

35043 Marburg


More information about the R-help mailing list