piecewiseExp.ph | R Documentation |
Based on a fitted Cox model this function fits the corresponding relative risk model with a piecewise constant baseline hazard using the Poisson regression equivalence
piecewiseExp.ph(coxObject, knots = NULL, length.knots = 6)
coxObject |
an object of class |
knots |
A numeric vector denoting the internal knots (cut points) defining the intervals in which the baseline hazard is assumed constant. |
length.knots |
a numeric value denoting the number of internal knots to use in the fit.
Used when |
an object of class glm
.
Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl
Rizopoulos, D. (2012) Joint Models for Longitudinal and Time-to-Event Data: with Applications in R. Boca Raton: Chapman and Hall/CRC.
coxFit <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE)
piecewiseExp.ph(coxFit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.