Description Usage Arguments Details Value Author(s) See Also Examples
hzar.chain.doSeq
cyclically calls hzar.doFit
and
hzar.next.fitRequest
in order to optimize the covariance
matrix driving mcmc process, MCMCmetrop1R
.
1 2 3 4 | hzar.chain.doSeq(hzar.request,
count = 3,
collapse = FALSE,
announce.complete = "Chain Complete")
|
hzar.request |
The |
count |
How many iterations to perform. |
collapse |
If TRUE, if all iterations succeed return a single
|
announce.complete |
Diagnostics message to print when the chain has completed. |
For each iteration, hzar.doFit
is called using
hzar.request
and the result is added to the results list.
For the second and all subsequent iterations, hzar.request
is
generated by hzar.next.fitRequest
using the results of
the previous iteration. If hzar.next.fitRequest
fails,
the results list is returned.
When count
iterations are performed and if collapse is TRUE,
the results list is reduced to a single hzar.fitRequest
object with the covariance matrix set to the last matrix used. All
other fields are set as if the concatenated results were the results
of a single call to hzar.doFit
.
Either a list of all successful hzar.fitRequest
objects,
or, if collapse is TRUE, a single hzar.fitRequest
object
with all of the results concatenated.
Graham Derryberry asterion@alum.mit.edu
hzar.fitRequest
hzar.doFit
MCMCmetrop1R
hzar.next.fitRequest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | data(manakinMolecular);
mknAdaA <-
hzar.doMolecularData1DPops(manakinMolecular$distance,
manakinMolecular$ada.A,
manakinMolecular$ada.nSamples);
mknAdaAmodel <-
hzar.makeCline1DFreq(mknAdaA, scaling="fixed",tails="none");
mknAdaAmodel <-
hzar.model.addBoxReq(mknAdaAmodel, -30, 600)
mknAdaAmodelFit <-
hzar.first.fitRequest.old.ML(model=mknAdaAmodel ,
mknAdaA,
verbose=FALSE);
mknAdaAmodelFit$mcmcParam$chainLength <- 1e3;
mknAdaAmodelFit$mcmcParam$burnin <- 50;
mknAdaAmodelFit$mcmcParam$thin <- 10;
str(hzar.chain.doSeq(mknAdaAmodelFit, count=2));
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.