simdata: Generating survival data

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/simdata.R

Description

Generate survival data by keeping the second last largest subject as censored.

Usage

1
simdata(n, lambda)

Arguments

n

the sample size.

lambda

value of the parameter lambda for Uniform distribution. Different values of lambda are analytically computed to obtain specific censoring percentages. lambda takes values 7.53, 4.81, 3.48, 2.64, 2.04, 1.58, 1.20, 0.87, 0.55 for corresponding censoring percentages 10, 20, 30, 40, 50, 60, 70, 80, 90.

Details

Data are generated always keeping the second last largest subject as censored i.e. delta_(n-1)=0. The survival times and the censoring times are generated using log-normal(1.1, 1) and Uniform(lambda, 2xlambda) distribution respectively. This type of data is required to compute the actual and modified jackknife estimates of Kaplan-Meier estimators and their bias. This data is used in Khan and Shaw (2015).

Value

Y

survival times censored or uncensored i.e. min(t, c)

delta

status

Cper

censoring percentage. Different censoring percentages are obtained for different values of lambda of censoring time distribution

Author(s)

Hasinur Rahaman Khan and Ewart Shaw

References

Khan and Shaw. (2015). Robust bias estimation for Kaplan-Meier Survival Estimator with Jackknifing. Journal of Statistical Theory and Practice, (published online; DOI:10.1080/15598608.2015.1062833). Also available in http://arxiv.org/abs/1312.4058.

See Also

jackknifeKME

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#For Cper = 30%.
data<-simdata(n = 100,lambda = 3.48)
data 

#For Cper = 50%.
data2<-simdata(n = 100,lambda = 2.04) 
data2

#For Cper = 80%.
data3<-simdata(n = 100,lambda = 0.87) 
data3

Example output

Loading required package: imputeYn
Loading required package: quadprog
Loading required package: emplik
Loading required package: mvtnorm
Loading required package: survival
Loading required package: boot

Attaching package: 'boot'

The following object is masked from 'package:survival':

    aml


Attaching package: 'imputeYn'

The following object is masked from 'package:utils':

    data

$Y
  [1] 0.1310687 0.3503525 0.3846138 0.4183898 0.6316080 0.6743958 0.7341944
  [8] 0.7841998 0.8452440 0.8475564 0.9399467 0.9523598 1.0127401 1.1218087
 [15] 1.1558235 1.2184863 1.4126113 1.4142924 1.5219588 1.5724355 1.5782813
 [22] 1.6001224 1.6286559 1.7039539 1.9554714 1.9634628 1.9684326 1.9913779
 [29] 2.0904109 2.0956094 2.1230183 2.1726566 2.1852028 2.2115474 2.2408818
 [36] 2.2925232 2.3171124 2.4164537 2.4846747 2.6304435 2.8594330 2.9004197
 [43] 2.9591050 3.0135411 3.0996854 3.1348640 3.1418828 3.1852818 3.3625272
 [50] 3.3764088 3.7115323 3.7447903 3.7551162 3.7573427 3.7694217 3.7817080
 [57] 3.8263676 3.8685477 3.9017154 3.9134820 3.9322705 3.9539530 3.9575277
 [64] 4.0782337 4.1803278 4.1904263 4.2536779 4.2671646 4.2990077 4.4630618
 [71] 4.4665394 4.5393514 4.5483293 4.5991463 4.6019118 4.6138439 4.6466044
 [78] 4.7081217 4.7700657 4.7803802 4.8557580 4.9947010 5.0446335 5.0697597
 [85] 5.0847761 5.0848445 5.3464065 5.5228550 5.5368145 5.5761707 5.7839948
 [92] 5.9190662 6.2991238 6.4782062 6.5182173 6.5542816 6.5947777 6.6069596
 [99] 6.7101234 6.7425035

$delta
  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
 [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 0 0 1 0 0 1 1 1 1 1 0 1 0 0 0 1
 [75] 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1

$Pper
[1] 30

$Y
  [1] 0.2888003 0.2926266 0.3992288 0.4317922 0.4511685 0.5497073 0.5922252
  [8] 0.6117899 0.6987175 0.7095020 0.7498501 0.7646640 0.8474252 0.8924495
 [15] 0.9075773 1.0227729 1.0665712 1.0688141 1.1589103 1.1870626 1.2220480
 [22] 1.2294002 1.3552869 1.4130034 1.4363902 1.5329364 1.6406970 1.6660248
 [29] 1.9293195 1.9436284 1.9496723 2.0975068 2.1014344 2.1025307 2.1191424
 [36] 2.1364170 2.1381831 2.1397510 2.1719830 2.2081399 2.2181853 2.2187462
 [43] 2.2228370 2.2326320 2.2673721 2.2852296 2.2907973 2.3025053 2.3107560
 [50] 2.3221917 2.3376231 2.3484986 2.3913466 2.4270323 2.4318121 2.4418039
 [57] 2.4683939 2.4698397 2.4933130 2.5415946 2.5529371 2.6234643 2.6489710
 [64] 2.6790124 2.6871627 2.8094034 2.8160655 2.8583637 2.8589307 2.9289250
 [71] 2.9613821 2.9668683 3.0195426 3.0259364 3.0621787 3.1585356 3.1842607
 [78] 3.2071828 3.2939404 3.3771454 3.4185007 3.4194062 3.4635439 3.4709128
 [85] 3.5096882 3.5114240 3.5263157 3.5293063 3.5496694 3.5897239 3.5973014
 [92] 3.6952368 3.7390244 3.7600211 3.7625140 3.7646429 3.7648570 3.8545740
 [99] 3.8838455 3.9111896

$delta
  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 0
 [38] 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 0
 [75] 1 1 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1

$Pper
[1] 50

$Y
  [1] 0.4701476 0.4853281 0.4929366 0.5708104 0.5906210 0.5984072 0.6483835
  [8] 0.6761869 0.7755325 0.8617393 0.8724242 0.8724755 0.8799132 0.8864263
 [15] 0.8964356 0.8975030 0.9080658 0.9146441 0.9293475 0.9327409 0.9404624
 [22] 0.9499364 0.9557119 0.9583160 0.9609667 0.9617423 0.9620461 0.9757796
 [29] 0.9823633 0.9836911 0.9879409 1.0094131 1.0103446 1.0129452 1.0171599
 [36] 1.0344274 1.0346576 1.0456539 1.0497663 1.0536858 1.0600371 1.0656067
 [43] 1.0733635 1.0828946 1.1058188 1.1070269 1.1100920 1.1313138 1.1349066
 [50] 1.1511601 1.1616966 1.1707718 1.1746123 1.1852639 1.1974203 1.2024270
 [57] 1.2112512 1.2186352 1.2259006 1.2620548 1.2814336 1.2847908 1.2863617
 [64] 1.2945797 1.3016849 1.3056340 1.3145442 1.3146902 1.3381005 1.3779224
 [71] 1.3833496 1.3959425 1.3961832 1.4376248 1.4706685 1.4745220 1.4967459
 [78] 1.5000750 1.5346702 1.5619464 1.5638018 1.5657090 1.5746954 1.5871956
 [85] 1.5954877 1.6021382 1.6030789 1.6031574 1.6062965 1.6197115 1.6254056
 [92] 1.6259963 1.6520060 1.6535787 1.6542722 1.6552424 1.6784704 1.6959850
 [99] 1.7097815 1.7125852

$delta
  [1] 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0
 [38] 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
 [75] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

$Pper
[1] 80

jackknifeKME documentation built on May 2, 2019, 5:27 a.m.