qmatrix.nhm {nhm}R Documentation

Compute transition intensities from a fitted nhm model

Description

Outputs the transition intensities from a non-homogeneous Markov or misclassification type hidden Markov multi-state model fitted using nhm.

Usage

qmatrix.nhm(object, time0=0, times=NULL, covvalue=NULL, ci=TRUE, sim=FALSE,
coverage=0.95, B=1000)

Arguments

object

Fitted model object produced using nhm.

time0

Starting time from which to compute the transition intensities. Defaults to 0.

times

Optional vector of times at which to compute the transition intensities. If omitted, the intensities will be computed at a sequence of times from time0 to the maximum observed time in the data.

covvalue

Optional vector of covariate vectors (should be given in the order specified in the covariate option in nhm). If omitted the function will use the mean values of the covariates.

ci

If TRUE pointwise confidence intervals will be shown in addition to the point estimates.

sim

If TRUE a simulation Delta method (Mandel, 2013) will be used to calculate the confidence intervals. Otherwise the standard Delta method will be applied.

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.

Details

The intens function used to fit the model is called to obtain the values of the transition intensities at the supplied times for the supplied covariate value.

If the simulation delta method approach is specified then the function will generate B parameter vectors from the asymptotic distribution of the MLE and compute the intensities for each of them, before finding pointwise percentile bootstrap confidence intervals from them.

Value

Returns a list containing the vector of times at which the intensities are computed, a matrix of probabilities for each state at each of the times. If confidence intervals are requested then the lower and upper limits are also provided.

If transition probability (as opposed to intensity) estimates are required then predict.nhm should be used.

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.

See Also

nhm, plot.nhm, predict.nhm


[Package nhm version 0.1.1 Index]