ricI: Generates Case I interval-censored Failure Time data

Description Usage Arguments Details Value Examples

Description

Generates Case I interval-censored Failure Time data as know as current status data. The failure time follows the Weibull regression model.

Usage

1
ricI(n, shape, scale, pc, X = as.matrix(0), beta = as.matrix(0))

Arguments

n

number of observations to be generated

shape

the shape parameter of Weibull distribution

scale

the scale parameter of Weibull distribution

pc

the proportion of right-censored expected in the sample

X

the matrix with the values of covariates. The number of rows of X must be equal n

beta

the vector with the value of the regression coefficients. The lenght of beta must be equal the number of covariaties

Details

First the function generates the failure time using [rweibull()]. The shape is the same and the second parameter is lambda. Lambda is equal to:

lambda = scale*exp(X*beta)

If there is no value to X and beta lambda = scale. Then is generated the only visit time. The shape is the same and the second parameter is gamma. Gamma is equal to:

gamma = (1-pc)*lambda/(pc)

Then the is created the values of the intervals. If the failure time is greater then the visited time, the first time is the visited time, the second time is [Inf] and the failure time is right-censored. Orthewise the first time is [-Inf] , the second is the visited time and the visited time is left-censored.

Value

The function return a data.frame on what:

L

the lower limit of the interval generated

R

the upper limit of the interval generated

X

the value of the covariates

Examples

1
ricI(50,2,2,0.5)

felipeamorimbr/ICdata documentation built on May 30, 2019, 1:59 p.m.