Skip to content
Prev 256487 / 398502 Next

ordered logistic regression - cdplot and polr

Hi Elizabeth,

On Mon, Apr 11, 2011 at 9:59 AM, Elizabeth Pringle
<epringle at stanford.edu> wrote:
This is difficult to really help with without some data (we do not
have LogAntDensity).  Certainly, if the graph shows values form 20 -
140, it makes sense that if you then force the range to be from 3 - 9,
you do not see anything.  The problem is not range, it is data/setup.
Does it not output the Residual Deviance and AIC?  Those relate to
model fit.  Two models can be compared using anova(m1, m2), so to
compare the overall effect of a factor or multiple factors, just fit
and compare two separate models.
This is repetivie.  ordered() makes a factor, and you could do the same with:

factor(HammerCat, ordered = TRUE)

Another note/commet, cdplot() and polr() have formula methods and can
access data from a data frame elegantly.  It would be better to keep
all your data bundled together in a data frame, than have different
variables in various stages of transformation but with similar names
floating around.  This may not be true, but wildly unexpected values
almost sounds like a typo may have happened at some point either in
using the name in cdplot OR in assigning data to the variable
initially.
What does str(HammerCatOrdFactor) or summary(HammerCatOrdFactor) (and
ditto for LogAntDensityFactor) give?  My guess is you will find they
are not quite what you thought they were.
Side note, why is LogAntDensity a factor? or do you mean factor in a
vernacular sense not in a technical is.factor(LogAntDensityFactor)
sense?  If LogAntDensityFactor is your only other term in the model,
an example comparison could be:

lognull <- polr(HammerCatOrdFactor ~ 1, Hess=TRUE)
logordered <- polr(HammerCatOrdFactor ~ LogAntDensityFactor, Hess=TRUE)

anova(lognull, logordered)

Cheers,

Josh
Plain text emails are preferred.