P.pred {flexmsm}R Documentation

Predict and plot the transition probabilities

Description

Function to predict and plot the estimated transition probabilities (and confidence intervals).

Usage

P.pred(object, newdata, get.CI = TRUE,
       n.sim.CI = 1000, prob.lev = 0.05,
       plot.P = FALSE, which.plots = NULL,
       rug = FALSE, ...)

Arguments

object

Fitted model object.

newdata

Dataframe containing the profile for which one wished to obtain the predicted transition probabilities.

get.CI

Whether to compute the confidence intervals.

n.sim.CI

Number of simulations to be used for confidence intervals computation.

prob.lev

Probability level of confidence intervals.

plot.P

Whether to output plots of transition probabilities.

which.plots

Number between 1 and the maximum number of non-null transition probabilities. This can be used if only some plots are to be plotted.

rug

Whether to include a rugplot of the observed transition times.

...

Other graphical arguments.

Value

Estimated transition probabilities (and confidence intervals).

P.pred

Predicted transition probability matrix corresponding to the time horizon specified in newdata. This is a nstates x nstates matrix.

P.CI.lower

Matrix containing the lower bounds of the confidence intervals for the predicted transition probability matrix.

P.CI.upper

Matrix containing the upper bounds of the confidence intervals for the predicted transition probability matrix.

P.hist

List of predicted transition probability matrices computed at each time point specified in newdata. This is a nstates x nstates x n.pred array, where n.pred is the number of rows in newdata.

P.CI.lower.hist

List of matrices containing the lower bounds of the confidence intervals for each predicted transition probability matrix in P.hist..

P.CI.upper.hist

List of matrices containing the upper bounds of the confidence intervals for each predicted transition probability matrix in P.hist.

full.X

Full design matrix corresponding to the newdata provided.

P.sim.hist

List of transition probability matrices simulated to obtain the confidence intervals at each time point from newdata. May be useful to quickly obtain intervals for a different confidence level.

See Also

fmsm


[Package flexmsm version 0.1.1 Index]