[R] extracting the residuals from models working with ordinal multinomial data

Jesús Fernández Moya jesusfmoya at gmail.com
Tue May 7 15:23:09 CEST 2013


Hello

I am having some problems for extracting the residuals from models
working with ordinal multinomial data.

Either working with the polr() function or the plsRglm () function,
the residuals are "NULL". I guess this is because the data is
multinomial but I do not know how to solve it.

I have read the following in internet:
"can you tell us how residuals would be defined in principle for a
model with categorical responses? If you do "your model"$fitted.values
you obtain a matrix of probabilities. You could define residuals in
terms of correct prediction (defining the most likely outcome as the
prediction, as in the default predict method for polr objects) -- or
you could compute an n-by-n table of true values and predicted values.
Alternatively you could reduce the ordinal data back to an integer
scale and compute a mean outcome as the prediction ... but I can't see
that there's any unique way to define the residuals in the first
place."

However it seems clear, I don't understand how to this. May be some of
you can help me out with a more extense explanation of how to do it
and/or with some commands to do it?

Thank you very much

jesús



More information about the R-help mailing list