The individual tests on coefficients in logistic regression are generally based
on a Wald test statistic. Unfortunately there is a bit of a paradox possible in
this case where the coefficient is highly significant, but due to a flattening
of the likelihood the standard error is overestimated and the p-value ends up
non-significant. The anova function uses the likelihood ratio test which is not
affected by this and is the more trustworthy statistic to use.
I assume that you are using the lrm function from the rms package, the book that
that package goes along with gives more detail (including the name of the
paradox which I don't remember at the moment (and my copy of the book is
currently 40 miles away)).
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Rob James
Sent: Wednesday, June 15, 2011 4:18 PM
To: r-help at r-project.org
Subject: [R] When models and anova(model) disagree...
I have a situation where the parameter estimates from lrm identify a
binary predictor variable ("X") as clearly non-significant (p>0.3),
but
the ANOVA of that same model gives X a chi^2-df rank of > 200, and
adjudicates X and one interaction of X and a continuous measure as
highly significant. The N is massive and X has two categories, each
with > 100,000 observations. I would expect X to have a significant
impact on the outcome.
The full model includes a large number of continuous (coded with rcs
with 3 knots) and categorical variables, as well as a plethora of
interactions between the categorical and continuous variables. Only one
of the interactions between the binary variable and the other
categorical or continuous variables is statistically significant.
Can anyone offer a suggestion on what might explain this discordance?
______________________________________________
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.