R2addhaz {R2Addhaz}R Documentation

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)

[Package R2Addhaz version 0.1.0 Index]