0

I am using the MASS package in R. I run ordered logit using polr on values below. However, all the predicted values are clustered in class 6. Am I doing something wrong?

x = rbind(
cbind(rep(1,1), runif(1,8.81,8.81)),
cbind(rep(2,63), runif(63,-2.25,12.84)),
cbind(rep(3,117), runif(117,0.11,15.87)),
cbind(rep(4,204), runif(204,-6.56,12.28)),
cbind(rep(5,291), runif(291,-4.05,26.97)),
cbind(rep(6,498), runif(498,-12.04,21.22)),
cbind(rep(7,69), runif(69,-13.94,11.5))
)

x=x[sort.list(x[,1]),]    
colnames(x) = c("y","x1")

p = polr(as.factor(y)~., x1)

table(predict(p))
ProgramFOX
  • 6,131
  • 11
  • 45
  • 51
earthlink
  • 323
  • 5
  • 15
  • Please provide the sample data – Metrics Aug 15 '13 at 02:27
  • For your specific data, given a particular value of `x` (within the range of your only predictor), the probability that `y` is less than or equal to 6 is quite high. Just look at how your values are distributed. It's not surprising to me. Since you only have a single numerical predictor, the probabilities will "accumulate" like this. – joran Aug 16 '13 at 03:19
  • @joran. Thank you. Is there a better method of modeling this type of data? – earthlink Aug 16 '13 at 03:36

0 Answers0