Learn R Programming

tfCox (version 0.1.0)

plot.sim_dat: Plot the true covariate effects

Description

This function plots the functional form of covariate effects in four simulation scenarios.

Usage

# S3 method for sim_dat
plot(x, which.predictor = NULL, n.plot = 4, …)

Arguments

x

an object of class "sim_dat"

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). If which.predictor is supplied, this argument is ignored.

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

See Also

sim_dat

Examples

Run this code
# NOT RUN {
#generate data
set.seed(123)
dat = sim_dat(n=100, zerof=0, scenario=1)
#plot X versus the true theta
plot.sim_dat(dat)
# }

Run the code above in your browser using DataLab