[R] polr model, out-of-sample probabilities

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jan 11 08:48:22 CET 2013


On 11/01/2013 01:59, Alphan Kirayoglu wrote:
> Hi,
>
> Is there a function to calculate probabilities for new out-of-sample data
> once we fit a model using the in-sample data?
>
> predict(model, newdata=... ) seems to require the new data to be the same
> size as the original data used to fit the model.

It does not, so why do you assume so?

> In short, I would like to fit a model and then pass out-of-sample data to
> calculate probabilities.

That is what predict() is for.

Your subject line says 'polr model'.  Perhaps this was about my package 
MASS, but in any case please talk to the credit-where-credit-is-due 
department.

And you could have seen this with a simple modification of the example 
on the help page for MASS::polr ....

>
> Regards,
> Alp
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list