ah: Fit Additive Hazards Regression Models

Description Usage Arguments Value Note References See Also Examples

Description

Fit a semiparametric additive hazard model '

λ(t|Z=z) = λ_0(t) + β'z.

The estimating procedures follow Lin & Ying (1994).

Usage

1
ah(formula, data, robust, weights, ties, ...)

Arguments

formula

a formula object for the regression model of the form response ~ predictors. The outcome is a survival object created by Surv.

data

a data frame. Input dataset.

robust

a logical variable. Robust standard errors are provided if robust == TRUE.

weights

a numeric vector. The weight of each observation.

ties

a logical variable. FALSE if there are no ties in the censored failure times.

...

additional arguments to be passed to the low level regression fitting functions.

Value

An object of class 'ah' representing the fit.

Note

The response variable is a survival object. If there are ties in the survival time, in the current version we recommend users to break ties by adding a small random number to the survival time. An example is provided. The regression model can be univariate or multivariate. This package is built upon the function ahaz by Anders Gorst-Rasmussen.

References

Lin, D.Y. & Ying, Z. (1994). Semiparametric analysis of the additive risk model. Biometrika; 81:61-71.

See Also

predict.ah for prediction based on fitted ah model, nwtsco for the description of nwtsco dataset

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(survival)
### using the first 100 rows in nwtsco to build an additive hazards model
nwts<- nwtsco[1:100,]

### fit the additive hazards model to the data
### the model-based standard errors are reported when setting robust = FALSE
fit1 <- ah(Surv(trel,relaps) ~ age + instit, ties = FALSE, data = nwts, robust = FALSE)
summary(fit1)

### fit the additive hazards model to the data with robust standard errors
fit2 <- ah(Surv(trel,relaps) ~ age + instit, ties = FALSE, data = nwts, robust = TRUE)
summary(fit2)

### when there are ties, break the ties first
nwts_all <- nwtsco
nwts_all$trel <- nwtsco$trel + runif(dim(nwts_all)[1],0,1)*1e-8
fit3 <- ah(Surv(trel,relaps) ~ age + instit, ties = FALSE, data = nwts_all, robust = TRUE)
summary(fit3)

Example output

Call:
ah(formula = Surv(trel, relaps) ~ age + instit, data = nwts, 
    robust = FALSE, ties = FALSE)

             coef         se   lower.95   upper.95     z p.value
age     0.0001401  0.0012043 -0.0022204  0.0025006 0.116   0.907
instit  0.0155257  0.0123040 -0.0085902  0.0396416 1.262   0.207
Call:
ah(formula = Surv(trel, relaps) ~ age + instit, data = nwts, 
    robust = TRUE, ties = FALSE)

             coef         se   lower.95   upper.95     z p.value
age     0.0001401  0.0012049 -0.0022216  0.0025018 0.116   0.907
instit  0.0155257  0.0129285 -0.0098140  0.0408655 1.201   0.230
Call:
ah(formula = Surv(trel, relaps) ~ age + instit, data = nwts_all, 
    robust = TRUE, ties = FALSE)

            coef        se  lower.95  upper.95     z  p.value    
age    0.0018322 0.0003581 0.0011303 0.0025341 5.116 3.12e-07 ***
instit 0.0418448 0.0055008 0.0310633 0.0526264 7.607 2.80e-14 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

addhazard documentation built on May 2, 2019, 9:40 a.m.