Learn R Programming

smoothHR (version 1.0.5)

print.HR: print method for a Smooth Hazard Ratio Object

Description

This class of objects is returned by the HR class of functions to represent smooth hazard ratio curve. Objects of this class have methods for print, predict and plot.

Usage

# S3 method for HR
print(x, ...)

Value

No value is returned.

Arguments

x

An object of class HR.

...

Other arguments.

Author

Artur Araújo and Luís Meira-Machado

References

Meira-Machado, L. and Cadarso-Suárez, C. and Gude, F. and Araújo, A. (2013). smoothHR: An R Package for Pointwise Nonparametric Estimation of Hazard Ratio Curves of Continuous Predictors. Computational and Mathematical Methods in Medicine, 2013, 11 pages. tools:::Rd_expr_doi("10.1155/2013/745742")

See Also

smoothHR.

Examples

Run this code
# Example 1
library(survival)
data(whas500)
fit <- coxph(Surv(lenfol, fstat)~age+hr+gender+diasbp+pspline(bmi)+pspline(los),
data=whas500, x=TRUE)
hr1 <- smoothHR(data=whas500, coxfit=fit)
print(hr1)

# Example 2
hr2 <- smoothHR( data=whas500, time="lenfol", status="fstat", formula=~age+hr+gender+diasbp+
pspline(bmi)+pspline(los) )
print(hr2)

Run the code above in your browser using DataLab