probtrans_ebmstate: Compute subject-specific transition probabilities using...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/probtrans_ebmstate.R

Description

Compute subject-specific transition probabilities using convolution.

Usage

1
2
3
4
5
6
7
probtrans_ebmstate(
  initial_state,
  cumhaz,
  model,
  max_time = NULL,
  nr_steps = 10000
)

Arguments

initial_state

The present function estimates transition probabilities from the state given in this argument.

cumhaz

An msfit object created by running mstate or mstate_generic.

model

Either 'clockforward' or 'clockreset'. See details.

max_time

The maximum time for which transition probabilities are estimated.

nr_steps

The number of steps in the convolution algorithm (larger increases precision but makes it slower)

Details

The clock-forward model is a model in which the transition hazard rates depend only on time since the initiating event. The clock-reset model has a single time scale: the sojourn time in the current state.

The algorithm behind probtrans_ebmstate is based on the convolution of density and survival functions and is suitable for processes with a tree-like transition structure only.

Value

An object of class 'probtrans'. See the 'value' section in the help page of mstate::probtrans.

Author(s)

Rui Costa & Moritz Gerstung

See Also

probtrans;

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Compute transition probabilities
# from an object with (pre-estimated) 
# cumulative hazard rates.

#load object with estimated
#cumulative hazard rates 
data("msfit_object_sample")

#compute transition probabilities
probtrans_object<-probtrans_ebmstate("health",
   msfit_object_sample,"Markov")

ebmstate documentation built on Dec. 20, 2021, 5:07 p.m.