Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I've run an ordered logistic regression model in R with Zelig and am looking to calculate predicted probabilities. Zelig has a series of simple one line commands to generate the information I want on first differences and so forth. Unfortunately, I keep getting an error when running the zelig function and was wondering if there was a quick alternative for generating predicted probabilities for a ordered logit in R.

For what it's worth, here's the error from my Zelig code.

> x.out <- setx(mod, credit=1)
Error in dta[complete.cases(mf), names(dta) %in% vars, drop = FALSE] : 
  incorrect number of dimensions

I just need an alternative solution that I can use to generate the probabilities.

share|improve this question
There is also a zelig list, you might get a solution to the error there. – Peter Flom Dec 16 '11 at 11:18

1 Answer

up vote 3 down vote accepted

A similar issue was raised on Stack Overflow more than one year ago. I don't know if re-installing Zelig and its dependencies will solve your problem (especially because I would prefer to understand why this error message came up before reinstalling).

Anyway, you can use the lrm() function from the rms package, as it allows to fit several models for categorical outcomes including proportional odds model. There is a predict() (but also Predict()) function to get the desired predicted values. As an alternative, you may want to look at the ordinal package (see the clm() function).

share|improve this answer
Thanks, re-installing did not help. I'll looking into the rms package. – ATMathew Dec 16 '11 at 10:51
For rms do ?predict.lrm to see how to get all probabilities of interest. – Frank Harrell Dec 16 '11 at 21:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.