cp_splines_plot {cutpoint} | R Documentation |
Plot penalized smoothing splines from cpobj
object
Description
Create penalized smoothing splines plot with different degrees of freedom and shows the cutpoints of the dichotomised variable.
Usage
cp_splines_plot(cpobj, show_splines = TRUE, adj_splines = TRUE)
Arguments
cpobj |
list, contains variables for pspline plot:
|
show_splines |
logical, if |
adj_splines |
logical, if |
Value
Plots penalized smoothing splines and shows the cutpoints.
See Also
cp_est()
for main function of the package, cp_value_plot()
for Value plots and Index plots
Examples
cpvar <- rnorm(100, mean = 100, sd = 10)
time <- seq(1, 100, 1)
event <- rbinom(100, 1, 0.5)
datf <- data.frame(time, event, cpvar)
plot_splines_list <- list(cpdata = datf, nb_of_cp = 1, cp = 95, dp = 2,
cpvarname = "Biomarker")
cp_splines_plot(plot_splines_list)