data: Generating Survival Data from Log-normal AFT Model

Description Usage Arguments Details Value Author(s) References Examples

View source: R/imputeYn.R

Description

This gives the survival data generated from log-normal AFT model.

Usage

1
data(n, p, r, b1, sig, Cper)

Arguments

n

sample size.

p

the number of covariates. For the AFT model each covariate is generated from Uniform(0, 1) distribution

r

correlation between the covariates, r is set to 0 for no correlation.

b1

the vector of coefficients.

sig

this maintains noise ratio, 1 for no noise.

Cper

takes specific value for generating specific censoring percentage, e.g., -0.2 for 30 censoring percentage, 0.0 for 50 censoring percentage and 0.2 for 70 percentages.

Details

Generate survival data from a log-normal AFT model (Y = alpha + X (beta) + error; Y=log(T)) where error is N(0,1). The last largest datum is generated always as censored otherwise censorship is random with censoring time generated from Uniform (c, 2c) for a suitable c.

Value

y

logarithmic of survival time

x

matrix of covariates of order n by p

delta

status; 1 for uncensored, o for censored

Pper

censoring percentage

Author(s)

Hasinur Rahaman Khan and Ewart Shaw

References

Khan and Shaw. (2013a). On Dealing with Censored Largest Observations under Weighted Least Squares. CRiSM working paper, Department of Statistics, University of Warwick, UK, No. 13-07. Also available in http://arxiv.org/abs/1312.2533.

Examples

1
2
3
4
5
6
7
8
9
#Dataset with zero correlation between the covariates and the medium censoring level 
#(50 percent) 
data1<-data(n=100, p=2, r=0, b1=c(2,4), sig=1, Cper=0)
data1

#Dataset with moderate correlation between the covariates and the higher censoring level 
#(70 percent) 
data.r<-data(n=100, p=2, r=0.5, b1=c(2,4), sig=1, Cper=0.2)
data.r

imputeYn documentation built on May 29, 2017, 2:18 p.m.