ICSimple: Generates Case II interval-Censored Failure Time data

Description Usage Arguments Details Value Examples

Description

The ICSimple generates case II interval-censored failure time data. The failure time follows the Weibull regression model

Usage

1
ICSimple(n, shape, scale, pc, h, 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

h

the maximum of time between the intervals

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 the function generates the quantiles, the final time of each observattion. If the failure time is greater than the final time, the time is right-censored. The final time is generated using [qweibull()] with shape and lambda. The probability is 1 - pc. That way, is expected that proportion of right-censored observation be pc. Now is generated the time of visits, they are generated using the function [runif(0,2*h)]. They are generated while the time of visits are less than the minimum of the failure time and the final time. Then is selected first and second time interval of each observation. If the failure time is greater than final time, the first time of the interval is the bigger time of visit and the second time is [Inf]. If the failure time is less than final time, the second time of the interval is the bigger visit time and the first time of the interval is the second bigger visit time.

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

event

the indicator of interval censored data in the same way that is used in [Surv()] function from survival package.

X

the value of the covariates

Examples

1
ICsimple(50,0.8,0.8)

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