piecewiseExp.ph: Proportional Hazards Models with Piecewise Constant Baseline...

piecewiseExp.phR Documentation

Proportional Hazards Models with Piecewise Constant Baseline Hazard Function

Description

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

Usage

piecewiseExp.ph(coxObject, knots = NULL, length.knots = 6)

Arguments

coxObject

an object of class coxph.

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 knots = NULL.

Value

an object of class glm.

Author(s)

Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl

References

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

Examples

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

drizopoulos/JM documentation built on Aug. 10, 2022, 1:51 a.m.