gaussianSynLikeGhuryeOlkin: Estimate the Gaussian synthetic (log) likelihood with an...

View source: R/gaussianSynLikeGhuryeOlkin.R

gaussianSynLikeGhuryeOlkinR Documentation

Estimate the Gaussian synthetic (log) likelihood with an unbiased estimator

Description

This function computes an unbiased, nonnegative estimate of a normal density function from simulations assumed to be drawn from it. See \insertCitePrice2018;textualBSL and \insertCiteGhurye1969;textualBSL.

Usage

gaussianSynLikeGhuryeOlkin(ssy, ssx, log = TRUE, verbose = FALSE)

Arguments

ssy

The observed summary statisic.

ssx

A matrix of the simulated summary statistics. The number of rows is the same as the number of simulations per iteration.

log

A logical argument indicating if the log of likelihood is given as the result. The default is TRUE.

verbose

A logical argument indicating whether an error message should be printed if the function fails to compute a likelihood. The default is FALSE.

Value

The estimated synthetic (log) likelihood value.

References

\insertAllCited

See Also

Other available synthetic likelihood estimators: gaussianSynLike for the standard synthetic likelihood estimator, semiparaKernelEstimate for the semi-parametric likelihood estimator, synLikeMisspec for the Gaussian synthetic likelihood estimator for model misspecification.

Examples

data(ma2)
ssy <- ma2_sum(ma2$data)
m <- newModel(fnSim = ma2_sim, fnSum = ma2_sum, simArgs = ma2$sim_args,
              theta0 = ma2$start)
ssx <- simulation(m, n = 300, theta = c(0.6, 0.2), seed = 10)$ssx

# unbiased estimate of the Gaussian synthetic likelihood
# (the likelihood estimator used in uBSL)
gaussianSynLikeGhuryeOlkin(ssy, ssx)


BSL documentation built on Nov. 3, 2022, 9:06 a.m.