Type: | Package |
Title: | R2 Measure of Explained Variation under the Additive Hazards Model |
Version: | 0.1.0 |
Date: | 2020-03-20 |
Author: | Denise Rava |
Maintainer: | Denise Rava <drava@ucsd.edu> |
Description: | R^2 measure of explained variation under the semiparametric additive hazards model is estimated. The measure can be used as a measure of predictive capability and therefore it can be adopted in model selection process. Rava, D. and Xu, R. (2020) <doi:10.48550/arXiv.2003.09460>. |
License: | GPL-2 |
Encoding: | UTF-8 |
LazyData: | true |
RdMacros: | Rdpack |
Imports: | ahaz, pracma, zoo, caTools, survival, Rdpack (≥ 0.7) |
NeedsCompilation: | no |
Packaged: | 2020-04-06 19:38:37 UTC; Denise |
Repository: | CRAN |
Date/Publication: | 2020-04-07 15:20:02 UTC |
Estimate R^2 for additive hazards model
Description
The function computes R^2 measure of explained variation under the semiparametric additive hazards model.
Usage
R2addhaz(data)
Arguments
data |
a data.frame with survival data. The first column needs to be the censored failure time. The second column needs to be the event indicator, 1 if the event is observed, 0 if it is censored. The other columns are covariates. |
Details
The semiparametric hazards model
\lambda(t | Z)=\lambda_0(t) + \beta Z
is fitted to the data. The R^2 measure of explained variation is then computed.
Value
R |
R^2 measure of explained variation. |
Author(s)
Denise Rava
References
Rava, D., Xu, R. "Explained Variation under the Additive Hazards Model", March 2020, arXiv:2003.09460
Examples
Z=runif(100,0,sqrt(3)) #generate covariates
u=runif(100,0,1)
t=-log(u)/as.vector((1+Z)) #generate failure time
status=rep(1,100) #censoring indicator
sd<-as.data.frame(cbind(t,status,Z)) #data frame of survival data
R2addhaz(sd)