plot.modSim: Survival or hazard curves of simulated data

View source: R/ModelSim.R

plot.modSimR Documentation

Survival or hazard curves of simulated data

Description

Survival or hazard curves of simulated data

Usage

## S3 method for class 'modSim'
plot(x, ind, type = "surv", ...)

Arguments

x

output of modelSim function (must be of type modSim)

ind

vector (individuals to show)

type

type of plots (survival or hazard curves)

...

supplementary parameters

Value

plot x

Examples

library(survMS)
ind = sample(1:500, 5)
### Example with survival data simulated from AH model
res_paramLN = get_param_ln(var=170000, mu=2325)
listAHSim_n500_p1000 <- modelSim(model = "AH", matDistr = "unif", matParam = c(-1,1), n = 500, 
                                 p = 100, pnonull = 100, betaDistr = 1.5, hazDistr = "log-normal",
                                 hazParams = c(res_paramLN$a*4, res_paramLN$lambda),
                                 Phi = 0, seed = 1, d = 0)
### Two types of plot are available (survival (by default) and hazard curves)
## Survival curves                                
plot(listAHSim_n500_p1000, ind = ind)
## Hazard curves
plot(listAHSim_n500_p1000, ind = ind, type = "hazard")

mathildesautreuil/survMS documentation built on June 13, 2022, 4:07 p.m.