Learn R Programming

hzar (version 0.2-5)

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

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

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 generate
clineLLfunc
A function of theta that returns a log likelihood. It is best to use the results of hzar.make.clineLLfunc.old.ML,
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. Pr
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 ap

Value

  • A hzar.fitRequest object. A list with values:
  • $modelParammodelParameters from above.
  • $cMcovMatrix from above.
  • $llFuncclineLLfunc from above.
  • $mcmcParammcmcParameters from above.
  • $mcmcRawmcmcRaw from above.
  • and with attributes:
  • "fit.run"fit.run from above.
  • "fit.success"fit.success from above.

Details

For modelParameters, the list must have the following entries:
  • $init
{A named list with the initial values of the free parameters. Used as theta.init in MCMCmetrop1R.} $tune{A named list with the tuning values of the free parameters. Used as tune in MCMCmetrop1R.}

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