simDC_weib: Simulate Doubly Censored Data

Description Usage Arguments Details Examples

Description

Simulates doubly censored data from a survival regression model with a Weibull baseline distribution.

Usage

1
2
simDC_weib(n = 100, b1 = 0.5, b2 = -0.5, model = "ph", shape = 2,
  scale = 2, lowerLimit = 0.75, upperLimit = 2)

Arguments

n

Number of observations

b1

Regression coefficient 1

b2

Regression coefficient 2

model

Regression model to use. Choices are "ph", "po" or "aft"

shape

Baseline shape parameter

scale

Baseline scale parameter

lowerLimit

Lower censoring threshold

upperLimit

Upper censoring threshold

Details

Exact event times are simulated according to the given survival regression model. Two covariates are used; x1 = rnorm(n), x2 = 1 - 2 * rbinom(n, 1, .5). After event times are simulated, all values less than lowerLimit are left censored and all values less than upperLimit are right censored.

Examples

1
2
simData <- simDC_weib()
fit <- ic_par(cbind(l, u) ~ x1 + x2, data = simData)

Example output

Loading required package: survival
Loading required package: Rcpp
Loading required package: coda

icenReg documentation built on Oct. 23, 2020, 8:11 p.m.