hzar.next.fitRequest: Generate a new fitRequest using data from another fitRequest.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/31-hzarFittingNew.R

Description

The method is the glue for parallel runs of sequential chains. It returns a ready to run hzar.fitRequest object based on the hzar.fitRequest supplied. If oldFitRequest had already been successfully run, this method's result will be dependent on the prior run. If not, this method's result will be a request for an independent run.

Usage

1
hzar.next.fitRequest(oldFitRequest)

Arguments

oldFitRequest

A hzar.fitRequest object.

Details

If oldFitRequest describes a successful run, a new covariance matrix is generated, modelParam$init is updated to the covariance matrix center, and the lecuyer seed channel incremented by 1. If the mersenne twister was used previously, the lecuyer random number generator is requested on channel 2.

If oldFitRequest does not describe a successful run, everything is copied, except the lecuyer seed channel incremented by 10 to prevent overlapping. If the mersenne twister was used previously, the lecuyer random number generator is requested on channel 11.

Value

A hzar.fitRequest object.

Author(s)

Graham Derryberry asterion@alum.mit.edu

See Also

hzar.fitRequest hzar.chain.doSeq hzar.cov.mcmc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(manakinMolecular);
mknAdaA <-
  hzar.doMolecularData1DPops(manakinMolecular$distance,
                             manakinMolecular$ada.A,
                             manakinMolecular$ada.nSamples);
mknAdaAmodel <-
  hzar.makeCline1DFreq(mknAdaA, scaling="fixed",tails="none");

mknAdaAmodelFit <-
   hzar.first.fitRequest.old.ML(model=mknAdaAmodel ,
                                mknAdaA,
                                verbose=FALSE);

mknAdaAmodelFit$mcmcParam$chainLength <- 1e4;
str(hzar.next.fitRequest(mknAdaAmodelFit))
## Not run: 
mknAdaAinitialFit <- hzar.doFit(mknAdaAmodelFit);
str(hzar.next.fitRequest(mknAdaAinitialFit))

## End(Not run)

hzar documentation built on May 2, 2019, 7 a.m.