Description Usage Arguments Value Author(s) References Examples

View source: R/piecewiseExp.ph.R

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

1 | ```
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 [email protected]

Rizopoulos, D. (2012) *Joint Models for Longitudinal and Time-to-Event Data: with
Applications in R*. Boca Raton: Chapman and Hall/CRC.

1 2 | ```
coxFit <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE)
piecewiseExp.ph(coxFit)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.