llapprox-class: Log-Likelihood function approximations

llapprox-classR Documentation

Log-Likelihood function approximations

Description

Objects for Log-Likelihood function approximations.

Usage

llapprox(refz, mrfi, family, method = "pseudo", verbose = interactive(), ...)

Arguments

refz

A reference field to generate the approximation function. It is used to infer the lattice dimensions, support and any other relevant properties.

mrfi

mrfi object.

family

A parameter restriction family from mrf2d.

method

Which type of approximation should be created. Options are:

  • "pseudo" for Pseudolikelihood approximation (which will result in Pseudoposteriors).

  • "adj.pseudo" for mode and curvature adjusted Pseudolikelihood approximation.

  • "ma.pseudo" for mode adjusted Pseudolikelihood

  • "gt" for Geyer-Thompson.

  • "wanglandau" for the Wang-Landau algorithm.

verbose

logical value indicating wheter the algorithm progress should be printed.

...

Extra options passed depending on the method used.

  • If the selected method is "adj.pseudo":

    • gamma_seq: a sequence to be used by the Stochastic Approximation alforithm to find the Maximum Likelihood Estimator. See ?mrf2d::fit_sa

    • nsamples: Number of samples drawn for the Monte-Carlo estimate of the Likelihood function Hessian. Set to 1000 if unspecified.

  • If the selected method is "gt":

    • reference: A reference parameter value (theta), either as an array or a vector of appropriate length.

    • nsamples: The number of samples to be used in the approximation.

    • ncycles: The number of Gibbs Sampler cycles between each sample.

  • If the selected method is "wanglandau":

    • theta_list: A list of vectors with reference points for the parameter vector.

    • cycles: Number of cycles in between samples. Defaults to 2.

    • h: Bandwidth to be used in the smoother function. Defaults to 10.

Value

a llapprox object.

Slots

lafn

The log-likelihood function approximation lafn(z, theta). It is either a function of the complete lattice configuration or the vector of sufficient statistics, depending on the value of pass_entire.

family

a parameter restriction family from mrf2d.

mrfi

a mrfi object with the interaction structure.

C

Maximum integer value of the random fields considered (i.e., mrf support ranging from 0 to C)

pass_entire

logical value indicating whether the first argument of lafn() should be the entire lattice (TRUE) or the vector of sufficient statistics (FALSE).

method

The method used to create that function.

internal_data

Internal data to be used by the approximating function.

ptime

Time (in seconds) used to compute the approximation.

Author(s)

Victor Freguglia


Freguglia/mrf2dbayes documentation built on Jan. 19, 2024, 11:21 p.m.