predict.tfCox: Predict for a New Covariate Matrix and fit from 'tfCox'

Description Usage Arguments Details Value Author(s) See Also

View source: R/Rfunctions.R

Description

This function makes predictions from a specified covariate matrix for a fit of the class "tfCox".

Usage

1
2
## S3 method for class 'tfCox'
predict(object, newX, which.lambda=1, ...)

Arguments

object

an object of the class "tfCox"

newX

a n x p covariate matrix

which.lambda

the index for the model of interest to be plotted. which.lambda corresponds to the model fit in lambda.seq and should be integer between 1 to length(fit$lambda.seq). In other words, the fit from fit$theta.list[[which.lambda]] will be plotted.

...

additional arguments to be passed. These are ignored in this function.

Details

Prediction for the new data point is implemented by constant or linear interpolation. 0th order trend filtering will have constant interpolation, and 1th or higher order trend filtering will have linear interpolation.

Value

A n x p matrix containing the fitted theta values.

Author(s)

Jiacheng Wu

See Also

tfCox


tfCox documentation built on Aug. 1, 2019, 5:07 p.m.