bcov {eglhmm} | R Documentation |
Bootstrap covariance.
Description
Creates an estimate of the covariance matrix of the parameter estimates for an extended generalised linear hidden Markov model via parametric bootstrapping.
Usage
bcov(object, nsim = 50, itmax = 500, verbose = TRUE)
Arguments
object |
An object of class |
nsim |
The number of data sets to simulate, from which
to estimate parameters. From each data set a vector of parameters
is estimated; the estimated covariance matrix is the empirical
covariance matrix of these |
itmax |
The maximum number of iterations to be used in attempting to achieve convergence when fitting models to the simulated data sets. Note that if convergence is not achieved, the simulated data set being used is discarded (i.e. it “doesn't count”) and a replacement data set is simulated. |
verbose |
Logical scalar. Should a “progress report” be printed out at each step of the fitting procedure? |
Value
A list with components:
C_hat |
The parametric bootstrap estimate of the covariance matrix of the parameter estimates. |
nc.count |
A count of the total number of times that the algorithm failed to converge during the bootstrapping procedure. |
an.count |
A count of the “anomalies” that occurred,
i.e. the number of times that there was a decrease in the log
likelihood. Present only if the |
Remarks
Although this documentation refers to “extended generalised linear models”, the only such models currently (13/02/2024) available are the Gaussian model with the identity link, the Poisson model, with the log link, the Binomial model with the logit link, the Dbd (discretised beta distribution model), and the Multinom model. The latter two are generalised linear models only in the “extended” sense. Other models may be added at a future date.
When eglhmm()
is called by bcov()
the argument
checkDecrLL
is set equal to FALSE
. This has an
effect only when the method
used in fitting the models
is "em"
. In this case a decrease in the log likelihood
is treated as meaning that the algorithm has converged. Setting
checkDecrLL
equal to FALSE
is done so as to decrease
the number of discarded data sets and thereby speed up the rate
at which the iterations proceed.
Author(s)
Rolf Turner rolfturner@posteo.net
References
See the help for eglhmm()
for references.
See Also
fitted.eglhmm()
reglhmm()
reglhmm.default()
reglhmm.eglhmm()
Examples
## Not run: # Takes too long.
fitP <- eglhmm(y~locn+depth,data=SydColCount,distr="P",cells=c("locn","depth"),
K=2,contr="sum",verb=TRUE,itmax=300)
cvrP <- bcov(fitP)
fitD <- eglhmm(y~locn+depth,data=SydColCount,distr="D",cells=c("locn","depth"),
K=2,nbot=0,ntop=11,contr="sum",verb=TRUE)
cvrD <- bcov(fitD)
fitM <- eglhmm(y~locn+depth,data=SydColDisc,distr="M",cells=c("locn","depth"),
K=2,contr="sum",verb=TRUE)
cvrM <- bcov(fitM)
## End(Not run)