plot.tfCox {tfCox}R Documentation

Plot Fitted Functions from Class "tfCox"

Description

This function plots the fitted functions from a model estimated by tfCox.

Usage

## S3 method for class 'tfCox'
plot(x, which.lambda=1, which.predictor = NULL, n.plot = 4, ...)

Arguments

x

an object of class "tfCox"

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.

which.predictor

a vector of predictor index that indicates which predictor function to plot. The vector should have integer values from 1 to p where p is the number of predictors.

n.plot

the number of predictors to be plotted (default is 4). Note that only those non-zero estimated functions will be plotted. If which.predictor is supplied, this argument is ignored.

...

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

Author(s)

Jiacheng Wu

See Also

tfCox

Examples

#generate data
set.seed(123)
dat = sim_dat(n=100, zerof=0, scenario=1)

fit = tfCox(dat, ord=0, alpha=1, lambda.seq=0.04)
plot(fit, n.plot=4)


[Package tfCox version 0.1.0 Index]