estimateLoglike {BSL}R Documentation

Estimate the synthetic likelihood

Description

This function computes the estimated synthetic (log) likelihood using one of the four methods (“BSL”, “uBSL”, “semiBSL” and “BSLmisspec”). Please find the links below in the see also section for more details.

Usage

estimateLoglike(
  ssy,
  ssx,
  method = c("BSL", "uBSL", "semiBSL", "BSLmisspec"),
  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.

method

A string argument indicating the method to be used. The default, “BSL”, runs standard BSL. “uBSL” uses the unbiased estimator of a normal density of Ghurye and Olkin (1969). “semiBSL” runs the semi-parametric BSL algorithm and is more robust to non-normal summary statistics. “BSLmisspec” estimates the Gaussian synthetic likelihood whilst acknowledging that there may be incompatibility between the model and the observed summary statistic (Frazier and Drovandi 2021).

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.

...

Arguments to be passed to methods.

  • shrinkage Available for methods “BSL” and “semiBSL”. A string argument indicating which shrinkage method to be used. The default is NULL, which means no shrinkage is used. Shrinkage estimation is only available for methods “BSL” and “semiBSL”. Current options are “glasso” for the graphical lasso method of Friedman et al. (2008) and “Warton” for the ridge regularisation method of Warton (2008).

  • penalty Available for methods “BSL” and “semiBSL”. The penalty value to be used for the specified shrinkage method. Must be between zero and one if the shrinkage method is “Warton”.

  • standardise Available for method “BSL”. A logical argument that determines whether to standardise the summary statistics before applying the graphical lasso. This is only valid if method is “BSL”, shrinkage is “glasso” and penalty is not NULL. The diagonal elements will not be penalised if the shrinkage method is “glasso”. The default is FALSE.

  • GRC Available for method “BSL”. A logical argument indicating whether the Gaussian rank correlation matrix (Boudt et al. 2012) should be used to estimate the covariance matrix in “BSL” method. The default is FALSE, which uses the sample covariance by default.

  • whitening Available for method “BSL”. This argument determines whether Whitening transformation should be used in “BSL” method with Warton's shrinkage. Whitening transformation helps decorrelate the summary statistics, thus encourages sparsity of the synthetic likelihood covariance matrix. This might allow heavier shrinkage to be applied without losing much accuracy, hence allowing the number of simulations to be reduced. By default, NULL represents no Whitening transformation. Otherwise this is enabled if a Whitening matrix is provided. See estimateWhiteningMatrix for the function to estimate the Whitening matrix.

  • ssyTilde Available for method “BSL”. The whitened observed summary statisic. If this is not NULL, it will be used to save computation effort. Only used if Whitening is enabled.

  • kernel Available for method “semiBSL”. A string argument indicating the smoothing kernel to pass into density for estimating the marginal distribution of each summary statistic. Only “gaussian" and “epanechnikov" are available. The default is “gaussian".

  • type Available for method “BSLmisspec”. A string argument indicating which method is used to account for and detect potential incompatibility. The two options are "mean" and "variance".

  • gamma Available for method “BSLmisspec”. The additional latent parameter to account for possible incompatability between the model and observed summary statistic. In “BSLmisspec” method, this is updated with a slice sampler (Neal 2003).

Value

The estimated synthetic (log) likelihood value.

References

Boudt K, Cornelissen J, Croux C (2012). “The Gaussian Rank Correlation Estimator: Robustness Properties.” Statistics and Computing, 22(2), 471–483. doi: 10.1007/s11222-011-9237-0.

Frazier DT, Drovandi C (2021). “Robust Approximate Bayesian Inference with Synthetic Likelihood.” Journal of Computational and Graphical Statistics (In Press). https://arxiv.org/abs/1904.04551.

Friedman J, Hastie T, Tibshirani R (2008). “Sparse Inverse Covariance Estimation with the Graphical Lasso.” Biostatistics, 9(3), 432–441.

Ghurye SG, Olkin I (1969). “Unbiased Estimation of Some Multivariate Probability Densities and Related Functions.” Ann. Math. Statist., 40(4), 1261–1271.

Neal RM (2003). “Slice sampling.” The Annals of Statistics, 31(3), 705–767.

Warton DI (2008). “Penalized Normal Likelihood and Ridge Regularization of Correlation and Covariance Matrices.” Journal of the American Statistical Association, 103(481), 340–349. doi: 10.1198/016214508000000021.

See Also

gaussianSynLike, gaussianSynLikeGhuryeOlkin, semiparaKernelEstimate and synLikeMisspec.

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
estimateLoglike(ssy, ssx, method = "BSL")
estimateLoglike(ssy, ssx, method = "uBSL")
estimateLoglike(ssy, ssx, method = "semiBSL")
estimateLoglike(ssy, ssx, method = "BSLmisspec", type = "mean", gamma = rep(0.1, 50))


[Package BSL version 3.2.5 Index]