Learn R Programming

intercure (version 0.1.0)

sim_frailty: Generates a interval censored dataset using frailty cure rate model

Description

sim_frailty returns a dataset generated by the cure rate frailty model.

Usage

sim_frailty(N, theta = c(-1, 1, 0), beta = c(0, 0.5), A = 5, B = 15, prob = 0.5)

Arguments

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 uniform random variable, defining another right censoring case.
prob
Probability that individual presents treatment T1 (baseline is T0).

Value

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.

Examples

Run this code
sim_frailty(20)

Run the code above in your browser using DataLab