Title: | R2 Measure of Explained Variation under the Additive Hazards Model |
---|---|
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) <arXiv:2003.09460>. |
Authors: | Denise Rava |
Maintainer: | Denise Rava <[email protected]> |
License: | GPL-2 |
Version: | 0.1.0 |
Built: | 2025-03-12 03:15:20 UTC |
Source: | https://github.com/cran/R2Addhaz |
The function computes R^2 measure of explained variation under the semiparametric additive hazards model.
R2addhaz(data)
R2addhaz(data)
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. |
The semiparametric hazards model
is fitted to the data. The R^2 measure of explained variation is then computed.
R |
R^2 measure of explained variation. |
Denise Rava
Rava, D., Xu, R. "Explained Variation under the Additive Hazards Model", March 2020, arXiv:2003.09460
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)
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)