rmsth {PWEALL} | R Documentation |
Estimate the restricted mean survival time (RMST) and its variance from data
Description
A function to estimate the restricted mean survival time (RMST) and its variance from data
Usage
rmsth(y=c(1,2,3),d=c(1,1,0),tcut=2.0,eps=1.0e-08)
Arguments
y |
observed times |
d |
non-censoring indicators |
tcut |
time point at which rmst is calculated |
eps |
A small number representing the error tolerance when comparing the event times |
Details
More details
Value
tcut |
time point at which rmst is calculated |
rmst |
estimated RMST |
var |
estimated variance of |
vadd |
estimated variance-covariance term of |
Note
This estimates the restricted mean survival time and its asymptotic variance
Author(s)
Xiaodong Luo
References
Luo, et al. (2017)
Examples
lamt<-0.8
lamc<-0.4
n<-3000
tcut<-2.0
truermst<-(1-exp(-lamt*tcut))/lamt
tt<-rexp(n)/lamt
cc<-rexp(n)/lamc
yy<-pmin(tt,cc)
dd<-rep(1,n)
dd[tt>cc]<-0
aest<-rmsth(y=yy,d=dd,tcut=tcut)
aest
[Package PWEALL version 1.3.0.1 Index]