WeibullReg: Weibull Regression for Survival Data

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/WeibullReg.R

Description

WeibullReg performs Weibull regression using the survreg function, and transforms the estimates to a more natural parameterization. Additionally, it produces hazard ratios (corresponding to the proportional hazards interpretation), and event time ratios (corresponding to the accelerated failure time interpretation) for all covariates.

Usage

1
WeibullReg(formula, data = parent.frame(), conf.level = 0.95)

Arguments

formula

A Surv formula.

data

The dataset containing all variables referenced in formula.

conf.level

Specifies that 1 - α level confidence intervals for the hazard and event time ratios should be produced.

Details

Details regarding the transformations of the parameters and their standard errors can be found in Klein and Moeschberger (2003, Chapter 12). An explanation of event time ratios for the accelerated failure time interpretation of the model can be found in Carroll (2003). A general overview can be found in the vignette("weibull") of this package, or in the documentation for ConvertWeibull.

Value

formula

The formula for the Weibull regression model.

coef

The transformed maximum likelihood estimates, with standard errors.

HR

The hazard ratios for each of the predictors, with 1 - α level confidence intervals.

ETR

The event time ratios (acceleration factors) for each of the predictors, with 1 - α level confidence intervals.

summary

The summary output from the original survreg model.

Author(s)

Sarah R. Haile, [email protected]

References

Carroll, K. (2003). On the use and utility of the Weibull model in the analysis of survival data. Controlled Clinical Trials, 24, 682–701.

Klein, J. and Moeschberger, M. (2003). Survival analysis: techniques for censored and truncated data. 2nd edition, Springer.

See Also

Requires the package survival. This function depends on ConvertWeibull. See also survreg.

Examples

1
2
3
data(larynx)
WR <- WeibullReg(Surv(time, death) ~ factor(stage) + age, data = larynx)
WR

Example output

Loading required package: survival
$formula
Surv(time, death) ~ factor(stage) + age

$coef
                 Estimate         SE
lambda         0.01853664 0.01898690
gamma          1.13014371 0.13844846
factor(stage)2 0.16692694 0.46112943
factor(stage)3 0.66289534 0.35550887
factor(stage)4 1.74502788 0.41476410
age            0.01973646 0.01424135

$HR
                     HR        LB        UB
factor(stage)2 1.181668 0.4786096  2.917491
factor(stage)3 1.940402 0.9666786  3.894946
factor(stage)4 5.726061 2.5398504 12.909334
age            1.019933 0.9918573  1.048802

$ETR
                     ETR        LB       UB
factor(stage)2 0.8626863 0.3880879 1.917678
factor(stage)3 0.5562383 0.2971113 1.041364
factor(stage)4 0.2135090 0.1047619 0.435140
age            0.9826879 0.9583820 1.007610

$summary

Call:
survival::survreg(formula = formula, data = data, dist = "weibull")
                 Value Std. Error      z        p
(Intercept)     3.5288     0.9041  3.903 9.50e-05
factor(stage)2 -0.1477     0.4076 -0.362 7.17e-01
factor(stage)3 -0.5866     0.3199 -1.833 6.68e-02
factor(stage)4 -1.5441     0.3633 -4.251 2.13e-05
age            -0.0175     0.0128 -1.367 1.72e-01
Log(scale)     -0.1223     0.1225 -0.999 3.18e-01

Scale= 0.885 

Weibull distribution
Loglik(model)= -141.4   Loglik(intercept only)= -151.1
	Chisq= 19.37 on 4 degrees of freedom, p= 0.00066 
Number of Newton-Raphson Iterations: 5 
n= 90 

SurvRegCensCov documentation built on May 30, 2017, 3:32 a.m.