Description Usage Arguments Details Value Author(s) References Examples
Compute Kaplan-Meier weights for weighted least squares method.
1 | aft.kmweight(Y, delta)
|
Y |
survival time. |
delta |
status. |
Compute Kaplan-Meier weights that are used for weighted least squares to solve the AFT model under right censoring. This gives weights that are computed after implementation of Efron's (1967) tail correction.
The Kaplan-Meier weights are proper in the sense that they sum one. The censoring considered here is right censoring only.
kmwt |
The Kaplan Meier weights |
Hasinur Rahaman Khan and Ewart Shaw
Stute, W. (1993). Consistent estimation under random censorship when covariables are available. Journal of Multivariate Analysis, 45 , 89-103.
Efron, B. (1967). The two sample problem with censored data. In Proceedings of the fifth Berkeley symposium on mathematical statistics and probability, Vol. 4, p. 831-853.
1 2 3 4 | # For dataset where the last largest datum is censored and censoring level is 50 percent
data1<-data(n=100, p=2, r=0, b1=c(2,4), sig=1, Cper=0)
kmw<-aft.kmweight(data1$y,data1$delta)
kmw
|
sh: 1: cannot create /dev/null: Permission denied
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
$kmwts
[1] 0.01000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
[7] 0.00000000 0.00000000 0.01076087 0.00000000 0.00000000 0.00000000
[13] 0.00000000 0.00000000 0.01138650 0.00000000 0.00000000 0.00000000
[19] 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
[25] 0.01273490 0.00000000 0.00000000 0.00000000 0.01326552 0.00000000
[31] 0.00000000 0.01365003 0.00000000 0.00000000 0.01406367 0.00000000
[37] 0.00000000 0.01451013 0.00000000 0.00000000 0.00000000 0.01524794
[43] 0.00000000 0.00000000 0.01579251 0.00000000 0.01608496 0.01608496
[49] 0.01608496 0.00000000 0.01640666 0.00000000 0.01674847 0.00000000
[55] 0.01711256 0.00000000 0.01750149 0.01750149 0.00000000 0.01792835
[61] 0.01792835 0.01792835 0.00000000 0.00000000 0.01892437 0.01892437
[67] 0.01892437 0.01892437 0.01892437 0.00000000 0.01955518 0.01955518
[73] 0.01955518 0.01955518 0.00000000 0.02033739 0.02033739 0.02033739
[79] 0.02033739 0.02033739 0.02033739 0.02033739 0.02033739 0.02033739
[85] 0.00000000 0.02169322 0.00000000 0.00000000 0.02530875 0.02530875
[91] 0.02530875 0.02530875 0.00000000 0.02892429 0.02892429 0.02892429
[97] 0.02892429 0.02892429 0.02892429 0.02892429
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.