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

Description Usage Arguments Value Author(s) References Examples

View source: R/piecewiseExp.ph.R

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

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

References

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

Examples

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

drizopoulos/JM documentation built on Sept. 29, 2018, 3:25 a.m.