powered by
A function to estimate the restricted mean survival time (RMST) and its variance from data
rmsth(y=c(1,2,3),d=c(1,1,0),tcut=2.0,eps=1.0e-08)
time point at which rmst is calculated
estimated RMST
estimated variance of rmst
rmst
estimated variance-covariance term of rmst
observed times
non-censoring indicators
A small number representing the error tolerance when comparing the event times
Xiaodong Luo
More details
Luo, et al. (2017)
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
Run the code above in your browser using DataLab