H_bar: Compute unbiased estimators from coupled chains

View source: R/H_bar.R

H_barR Documentation

Compute unbiased estimators from coupled chains

Description

Compute unbiased estimators based on coupled chains. Presumably generated via sample_coupled_chains.

The test function h should take a "chain_state" as argument and return a numeric vector. The estimand of interest is \int h(x) π(x) dx, where π is the invariant distribution of the chains.

The lag is inferred from the coupled chains, so there's no argument to specify it.

Usage

H_bar(c_chains, h = function(x) x, k = 0, m = 1)

Arguments

c_chains

A list containing coupled chains generated by sample_coupled_chains.

h

A test function of interest, which should take a chain state ("chain_state" entry of the output of "rinit", for instance) and return a numeric vector

k

An integer at which to start computing the unbiased estimator; should be less than m

m

A time horizon: should be less than the length of the chains; typically the same m that was used in the call to sample_coupled_chains, or a smaller value

Value

A value (or vector of values) of an unbiased estimator of \int h(x) π(x) dx


pierrejacob/debiasedmcmc documentation built on Aug. 22, 2022, 12:41 a.m.