Learn R Programming

orderedLasso (version 1.7.1)

predict.timeLagLasso.path: make predictions from a fitted "timeLagLasso.path" object

Description

Similar to other predict methods, this functions predicts fitted values from a fitted "timeLagLasso.path" object.

Usage

# S3 method for timeLagLasso.path
predict(object, newdata = NULL, s = NULL,
  exact = FALSE, ...)

Arguments

object

fitted "timeLagLasso.path" model

newdata

Matrix of new values for object at which predictions are to be made.

s

Value(s) of the penalty parameter lambda at which predictions are required. Default is the entire sequence used to create the model.

exact

If exact = TRUE, and predictions are to made at values of s not included in the original fit, these values of s are merged with object$lambda, and the model is refit before predictions are made. If exact = FALSE (default), then the predict function uses linear interpolation to make predictions for values of s that do not coincide with those used in the fitting algorithm. Note that exact = TRUE is fragile when used inside a nested sequence of function calls. predict.orderedLasso() needs to update the model, and expects the data used to create it to be around.

...

Not used. Other arguments to predict.

Value

yhat

A matrix or a vector of fitted values

yhat.ordered

A matrix or a vector of fitted values of the strongly ordered lasso coefficients