predict.regrpolr {plgraphics} | R Documentation |
Predict and Fitted for polr Models
Description
Methods of predict
and fitted
Usage
## S3 method for class 'regrpolr'
predict(object, newdata = NULL,
type = c("class", "probs", "link"), ...)
## S3 method for class 'regrpolr'
fitted(object, type = c("class", "probs", "link"), ...)
Arguments
object |
result of |
newdata |
data frame in which to look for variables with
which to predict. If |
type |
type of prediction: |
... |
arguments passed to standard methods of |
Value
Vector of predicted or linear predictor values
Author(s)
Werner A. Stahel, ETH Zurich
See Also
predict, fitted, residuals.regrpolr
Examples
if(requireNamespace("MASS")) {
data(housing, package="MASS")
rr <- MASS::polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
aa <- fitted(rr)
bb <- predict(rr)
cc <- predict.regrpolr(rr)
}
[Package plgraphics version 1.2 Index]