Learn R Programming

hzar (version 0.2-5)

hzar.cov.rect: Generate a covariance matrix for the cline optimizer.

Description

These methods are intended to generate covariance matrices suitable for use with MCMCmetrop1R.

Usage

hzar.cov.rect(clineLLfunc, param.lower, param.upper, pDiv = 11, random = 0, passCenter = FALSE) hzar.cov.mcmc(clineLLfunc, mcmcRaw, pDiv = 15, random = 10000, passCenter = FALSE)

Arguments

clineLLfunc
The log likelihood function of the parameters.
param.lower
The minimum boundary of the region of parameter space to consider.
param.upper
The maximum boundary of the region of parameter space to consider.
pDiv
If generating a covariance matrix using a lattice, the lattice should have this many points on an edge.
random
Use random number of points drawn from a uniform likelihood space to generate the covariance matrix. If 0, use a lattice to generate the covariance matrix.
passCenter
Should weighted mean of the parameter space be returned.
mcmcRaw
A mcmc object used to refine the covariance matrix.

Value

A square matrix with a width equal to the number of free parameters.

Details

This method is adaptive, refining the pDiv and random parameters until either it can generate a useable matrix without too high of a memory cost, or random > 1e9 (use a 1 billion or more samples).

See Also

MCMCmetrop1R