Learn R Programming

RAMP (version 2.0.2)

predict.RAMP: Model prediction based on a fitted RAMP object.

Description

Similar to the usual predict methods, this function returns predictions from a fitted 'RAMP' object.

Usage

# S3 method for RAMP
predict(object, newdata = NULL, type = c("link",
  "response", "class"), allpath = FALSE, ...)

Arguments

object

Fitted 'RAMP' model object.

newdata

Matrix of new values for x at which predictions are to be made, without the intercept term.

type

Type of prediction required. Type 'response' gives the fitted values for 'gaussian', fitted probabilities for 'binomial', fitted mean for 'poisson', and the fitted relative risk for 'cox'. Type 'link' returns the linear predictors for 'binomial', 'poisson' and 'cox' models; for 'gaussian' models it is equivalent to type 'response'. Type 'class' applies only to 'binomial' models, and produces the class label corresponding to the maximum probability (0-1 labels).

allpath

allpath = T will output all the predictions on the solution path. allpath = FALSE will only output the one the criterion selected in the 'RAMP' object.

Not used. Other arguments to predict.

Value

The object returned depends on type.

See Also

RAMP,print.RAMP