plot.nhm {nhm} | R Documentation |
Plot transition probabilities or intensities from a fitted nhm model.
Description
Produces plots of the transition probabilites or intensities from a non-homogeneous Markov or misclassification type hidden Markov multi-state model fitted using nhm
.
Usage
## S3 method for class 'nhm'
plot(x, what="probabilities",time0=0, state0=1, times=NULL,
covvalue=NULL, ci=TRUE, sim=FALSE, coverage=0.95, B=1000, rtol=1e-6,
atol=1e-6, main_arg=NULL, xlab="Time", ...)
Arguments
x |
Fitted model object produced using |
what |
Character string to indicate what should be plotted. Options are |
time0 |
Starting time from which to compute the transition probabilities or intensities. Defaults to 0. |
state0 |
Starting state from which to compute the transition probabilities. Defaults to 1. Not required for transition intensities |
times |
Optional vector of times at which to compute the transition probabilities or intensities. If omitted, the probabilities/intensities will be computed at a sequence of times of length 100 from |
covvalue |
Optional vector of covariate vectors (should be given in the order specified in the |
ci |
If |
sim |
If |
coverage |
Coverage level (should be a value between 0 and 1) for the confidence intervals. Defaults to 0.95. |
B |
Number of simulations to be performed to compute the simulation Delta method. |
rtol |
Relative tolerance parameter to be used by |
atol |
Absolute tolerance parameter to be used by |
main_arg |
Character string specifying beginning of title to be given to each of the plot panes generated. |
xlab |
Character string specifying x-axis label to be given to each plot. |
... |
Other items to be passed to the function. Currently not used. |
Details
Computation is performed by calling predict.nhm
, for the transition probabilities, or qmatrix.nhm
for the intensities (see for more details).
Value
Generates a multi-pane plot for each state. If values are required they can be obtained using predict.nhm
.
Author(s)
Andrew Titman a.titman@lancaster.ac.uk
References
Mandel M. Simulation-based confidence intervals for functions with complicated derivatives. 2013. The American Statistician, 67. 76-81.