predict.regrpolr: Predict and Fitted for polr Models

predict.regrpolrR 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 polr

newdata

data frame in which to look for variables with which to predict. If NULL, fitted values are produced.

type

type of prediction:
"link" asks for the linear predictor values.
Other types are available according to the standard methods of the predict function.

...

arguments passed to standard methods of predict or fitted

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)
}

plgraphics documentation built on Oct. 19, 2023, 3 p.m.