Learn R Programming

mets (version 0.1-8)

ClaytonOakes: Clayton-Oakes model with piece-wise constant hazards

Description

.. content for description (no empty lines) ..

Usage

ClaytonOakes(formula, data = parent.frame(), id,
    var.formula = ~1, cuts = NULL, type = "co", start,
    control = list(), ...)

Arguments

formula
formula specifying the marginal proportional (piecewise constant) hazard structure with the right-hand-side being a survival object (Surv) specifying the entry time (optional), the follow-up time, and event/censoring status at follow-up. The clust
data
Data frame
id
Variable defining the clustering (if not given in the formula)
var.formula
Formula specifying the variance component structure (if not given via the id special function in the formula) using a linear model with log-link.
cuts
Cut points defining the piecewise constant hazard
type
Type of estimation (Clayton-Oakes or conditional frailty model)
start
Optional starting values
control
Control parameters to the optimization routine
...
Additional arguments

Details

.. content for details ..

Examples

Run this code
set.seed(1)
d <- simClaytonOakes(2000,4,2,1,stoptime=2,left=0.5)
e <- ClaytonOakes(Surv(lefttime,time,status)~x1+id(~1,cluster),cuts=c(0,0.5,1,2),data=subset(d,!truncated))
e
plot(e,add=FALSE)

Run the code above in your browser using DataLab