Learn R Programming

survAH (version 1.2.0)

ahreg: Regression Analysis with Average Hazard

Description

The ahreg function performs a regression analysis for the average hazard (AH).

Usage

ahreg(formula, tau, data, link="log", conf.int=0.95, 
             cens_strata=NULL, cens_covs=NULL)

Value

an object of class ahreg.

result

A table containing the coefficient estimates, standard errors, confidence intervals, z-values, and two-sided p-values for each predicotor.

Arguments

formula

A formula object, with the response on the left of a ~ operator, and the terms on the right. The response must be a survival object as returned by the Surv function. For a multi-state model the formula may be a list of formulas.

tau

A scalar value to specify a time point for calculating the average hazard.

data

A data.frame in which to interpret the variables named in the formula.

link

A link function to be used, either "log" (default) or "identity".

conf.int

A confidence coefficient for calculating confidence intervals. The default is conf.int=0.95.

cens_strata

A variable name for specifying group-specific censoring. Only one of cens_strata or cens_cov can be specified. The default is NULL.

cens_covs

A set of variable names used for modeling censoring time distribution. Only one of cens_strata or cens_covs can be specified. The default is NULL.

Author

Hajime Uno, Miki Horiguchi

Details

The function implements the average hazard regression.

References

#' Uno H, Tian L, Horiguchi M, Hattori S, Kehl KL. Regression models for average hazard. Biometrics. 2024; 80(2):ujae037. <doi: 10.1093/biomtc/ujae037>

Examples

Run this code
#================================================================================
# ahreg.sample.data: Sample data from the pbc data in the survival package
#================================================================================
D = ahreg.sample.data()


#-- Independent censoring
a1 = ahreg(Surv(time,status) ~ arm + edema + bili, tau=7, data=D)
print(a1)

#-- Group specific censoring
a2 = ahreg(Surv(time,status) ~ arm + edema + bili, tau=7, data=D, cens_strata="arm")
print(a2)

#-- Covariate dependent censoring via Cox 
a3 = ahreg(Surv(time,status) ~ arm + edema + bili, tau=7, data=D, cens_covs=c("arm","edema"))
print(a3)

#-- Covariate dependent censoring via Cox (identity link)
a4 = ahreg(Surv(time,status) ~ arm + edema + bili, tau=7, data=D, cens_covs=c("arm","edema"), 
           link="identity")
print(a4)


Run the code above in your browser using DataLab