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 ocm, usually a result of a call to ocm

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 NULL, predictions are computed for the original dataset.

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 type="quantile")

K

number of evenly spaced values of v over which the probability density is evaluated (if type="density" or type="CDF") or number of probabilities at which the quantile function is evaluated (if type="quantile"). The default is 50.

...

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

ocm

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)

[Package ordinalCont version 2.0.2 Index]