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

From: Eva Mosner <EvaMosner_at_web.de>
Date: Tue, 01 Apr 2008 16:09:59 +0200


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

-- 
Eva Mosner
Lilienstraße 9

35043 Marburg

06421-8400886
0151-17867488

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 01 Apr 2008 - 14:51:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 01 Apr 2008 - 20:30:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive