hzar.make.fitRequest: Generate a hzar.fitRequest with the specified attributes.

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

View source: R/31-hzarFittingNew.R

Description

This method is meant to generate an arbitrary hzar.fitRequest object to pass to hzar.doFit. Note that this method does not check its arguments for validity. Use hzar.first.fitRequest.old.ML or hzar.next.fitRequest for a more convenient method for generating hzar.fitRequest objects.

Usage

1
2
3
4
5
6
7
hzar.make.fitRequest(modelParameters,
                     covMatrix,
                     clineLLfunc,
                     mcmcParameters,
                     mcmcRaw = NULL,
                     fit.run = FALSE,
                     fit.success = FALSE)

Arguments

modelParameters

A named list of at least length 2. See details for format.

covMatrix

A covariance matrix for the gaussian proposal distribution as described in MCMCmetrop1R. Should be a square matrix of dimension equal to the number of free parameters, which can be generated by hzar.cov.rect or hzar.cov.mcmc. Although NULL is acceptable, it is extremely likely that hzar.doFit will crash.

clineLLfunc

A function of theta that returns a log likelihood. It is best to use the results of hzar.make.clineLLfunc.old.ML, hzar.make.clineLLfunc.old.bayes, or hzar.make.LLfunc.null.

mcmcParameters

The parameters controling the operation of the mcmc process. Use the results from hzar.make.mcmcParam.

mcmcRaw

The mcmc object created by a successful run of MCMCmetrop1R. Useful if you wish to import old mcmc objects for use with hzar.

fit.run

Has this particular request been run? Note that this does not update automatically; the result of hzar.doFit is a new object with mcmcRaw, fit.run, and fit.success updated as appropriate. Primariy affects the behavior of hzar.next.fitRequest.

fit.success

Has this particular request been run successfully? Note that this does not update automatically; the result of hzar.doFit is a new object with mcmcRaw, fit.run, and fit.success updated as appropriate. Primariy affects the behavior of hzar.next.fitRequest.

Details

For modelParameters, the list must have the following entries:

Value

A hzar.fitRequest object. A list with values:

$modelParam

modelParameters from above.

$cM

covMatrix from above.

$llFunc

clineLLfunc from above.

$mcmcParam

mcmcParameters from above.

$mcmcRaw

mcmcRaw from above.

and with attributes:

"fit.run"

fit.run from above.

"fit.success"

fit.success from above.

Note

Although modelParameters only needs to contain $init and $tune, modelParam will sometimes contain $fixed, $lower and $upper. These are artifacts of hzar.make.clineLLfunc.old.ML and can be safely ignored.

Author(s)

Graham Derryberry asterion@alum.mit.edu

See Also

hzar.first.fitRequest.old.ML hzar.next.fitRequest hzar.cov.mcmc hzar.cov.rect hzar.make.clineLLfunc.old.ML hzar.make.clineLLfunc.old.bayes hzar.make.LLfunc.null hzar.make.mcmcParam MCMCmetrop1R


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