Description Usage Arguments Details Value Author(s) Examples
View source: R/Numeric_hessian.R
Obtain the covariance matrix for parameter estimates from the latent CTMC model.
1 2 3 4 | get_covariance(par, the.data, num.subjects, num.states,
num.obs.states, rates.setup, emission.setup = NULL,
init.setup = NULL, DDO.setup = NULL, do.DDO = F,
time.dep.emission = F)
|
par |
the parameter estimates (rates, emission, initial distribution, DDO (in that order) |
the.data |
list with the observed data, with one entry per individual |
num.subjects |
number of individuals in the study |
num.states |
number of latent states in the CTMC |
num.obs.states |
number of observed states |
rates.setup |
list with rate setup information |
emission.setup |
list with emission distribution setup information |
init.setup |
list with initial distribution setup information |
DDO.setup |
setup object for disease driven observation model |
do.DDO |
indicator (T/F) if there are disease driven observation times in the model |
time.dep.emission |
(not supported) Indicator if emission distribution has time dependent covariates. |
Run after the EM algorithm that provides maximum likelihood estimates. Evaluates the hessian of the observed data likelihood, using numeric differentiation,
covariance |
Estimated covariance of parameter estiamtes |
information |
Observed Fisher information of parameter estimates |
.
Jane Lange
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
library(cthmm)
data(DDO_data)
#run the EM on the example data
covariance_DDO=get_covariance(par=DDO_EM$param,
the.data=DDO_data,
num.subjects=500,
num.states=4,
num.obs.states=3,
rates.setup=rates.setup,
emission.setup=emission.setup,
init.setup=init.setup,
DDO.setup=DDO.setup,
do.DDO=T)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.