pfinal_fmsm | R Documentation |
This requires the model to be Markov, and is not valid for semi-Markov
models, as it works by wrapping pmatrix.fs
to calculate the
transition probability over a very large time. As it also works on a
fmsm
object formed from transition-specific time-to-event models,
it therefore only works on competing risks models, defined by just one starting
state with multiple destination states representing competing events.
For these models, this function returns the probability governing which
competing event happens next. However this function simply wraps pmatrix.fs
,
so for other models, pmatrix.fs
or pmatrix.simfs
can be used with a
large forecast time t
.
pfinal_fmsm(x, newdata = NULL, fromstate, maxt = 1e+05, B = 0, cores = NULL)
x |
Object returned by |
newdata |
Data frame of covariate values, with one column per covariate, and one row per alternative value. |
fromstate |
State from which to calculate the transition probability
state. This should refer to the name of a row of the transition matrix
|
maxt |
Large time to use for forecasting final state probabilities.
The transition probability from zero to this time is used. Note
|
B |
Number of simulations to use to calculate 95% confidence intervals
based on the asymptotic normal distribution of the basic parameter
estimates. If |
cores |
Number of processor cores to use. If |
A data frame with one row per covariate value and destination state,
giving the state in column state
, and probability in column
val
. Additional columns lower
and upper
for the
confidence limits are returned if B=0
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.