predict.ocm {ordinalCont} | R Documentation |
Predict method for Continuous Ordinal Fits
Description
Predicted values based on ocm
object
Usage
## S3 method for class 'ocm'
predict(
object,
newdata = NULL,
type = c("response", "density", "CDF", "quantile", "regressor", "exp_regressor",
"hazard", "cum_hazard", "survival"),
prob = 1:(K - 1)/K,
K = 50,
...
)
Arguments
object |
an object of class |
newdata |
optionally, a data frame in which to look for variables with
which to predict.
Note that all predictor variables should be present, having the same names as the variables
used to fit the model. If |
type |
type of prediction. One of "response" (default), "density", "CDF", "quantile", "regressor", "exp_regressor", "hazard", "cum_hazard" or "survival" |
prob |
probabilities used to evaluate the quantile function (if |
K |
number of evenly spaced values of |
... |
further arguments passed to or from other methods |
Details
An object of class ocm
and optionally a new data
frame are used to compute the predictions. The estimated parameters
of the fitted model and K
values of v
are used to compute the conditional probability density and the conditional cumulative distribution. If a new data frame is used to make predictions, the individual (random) effects are set to zero, while they are maintained to the estimated values if newdata
is NULL.
Value
A vector of predictions, according to the type
.
Author(s)
Maurizio Manuguerra, Gillian Heller
See Also
Examples
## Not run:
fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100))
pred <- predict(fit.overall)
## End(Not run)