Description Usage Arguments Value Examples
View source: R/sim_frailty_cl_data.R
sim_frailty_cl
returns a dataset generated by the frailty cure rate
model for clustered data.
1 2 | sim_frailty_cl(N, theta = c(-1, 1, 0), beta = c(0, 0.5), A = 5, B = 15,
prob = 0.5, nclus = 2, w = exp(-0.5))
|
N |
Size of the sample to be generated. |
theta |
Three parameters associated with the cure linear predictor. |
beta |
Two parameters associated with the hazard function. |
A |
A positive number representing a fixed right censoring. |
B |
A positive number which multiplies an exponential random variable with mean 1, defining another right censoring case. |
prob |
Probability that individual presents treatment T1 (baseline is T0). |
nclus |
Number of clusters to generate with balanced sizes. |
w |
Shape and rate parameters value for the Gamma distribution with mean 1. |
A generated dataset with columns: Z
, the actual event time;
L
, the leftmost limit of the censored interval; R
, the
rightmost limit of the censored interval; delta
, the failure
indicator; xi1
, the treatment covariate assuming 1 with probability
prob
and 0 otherwise; xi2
, second variable generated by a
standard normal distribution; U
, the frailty for each individual,
with value 0 for cured individuals. clus
, representing the cluster
id for each observation.
1 | sim_frailty_cl(50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.