View source: R/probtrans_ebmstate.R
probtrans_ebmstate | R Documentation |
Compute subject-specific transition probabilities using convolution.
probtrans_ebmstate(
initial_state,
cumhaz,
model,
max_time = NULL,
nr_steps = 10000
)
initial_state |
The present function estimates transition probabilities from the state given in this argument. |
cumhaz |
An |
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) |
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.
An object of class 'probtrans'. See the 'value'
section in the help page of mstate::probtrans
.
Rui Costa & Moritz Gerstung
probtrans
;
# 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,"clockforward")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.