baseline_intensities_from_coxmod: Recover baseline intensities (in the form of...

View source: R/msfit_subjects.R

baseline_intensities_from_coxmodR Documentation

Recover baseline intensities (in the form of intensity_matrices) from a coxph() fit on multi-state data.

Description

Recover baseline intensities (in the form of intensity_matrices) from a coxph() fit on multi-state data.

Usage

baseline_intensities_from_coxmod(object, tmat, newdata)

Arguments

object

A coxph object describing the fit of the multi-state model, must contain a 'strata()' term.

tmat

A transition matrix as created by transMat.

newdata

A data.frame containing K rows per subject in the data, with K the number of transitions possible in the model. The following named columns must be present:

id:

Unique identifier of the subject this row relates to, must be numeric or character;

trans:

Transition number in the 'transMat' trans this row relates to;

"variables":

The subject-specific covariates (appearing in the coxph formula), ordered according to transition number in trans.

Note that newdata must contain a column containing the variable which was used to determine the stratum of a transition in object (usually this is 'trans').

Author(s)

Daniel Gomon


hputter/mstate documentation built on July 17, 2025, 2:04 a.m.