gaussianSynLike: Estimate the Gaussian synthetic (log) likelihood

Description Usage Arguments Value References See Also Examples

View source: R/gaussianSynLike.R

Description

This function estimates the Gaussian synthetic log-likelihood \insertCite@see @Wood2010 and @Price2018BSL. Several extensions are provided in this function: shrinkage enables shrinkage estimation of the covariance matrix and is helpful to bring down the number of model simulations (see \insertCiteAn2019;textualBSL for an example of BSL with glasso \insertCiteFriedman2008BSL shrinkage estimation); GRC uses Gaussian rank correlation \insertCiteBoudt2012BSL to find a more robust correlation matrix; whitening \insertCiteKessy2018BSL could further reduce the number of model simulations upon Warton's shrinkage \insertCiteWarton2008BSL by decorrelating the summary statistics.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
gaussianSynLike(
  ssy,
  ssx,
  shrinkage = NULL,
  penalty = NULL,
  standardise = FALSE,
  GRC = FALSE,
  whitening = NULL,
  ssyTilde = NULL,
  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.

shrinkage

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 \insertCiteFriedman2008;textualBSL and “Warton” for the ridge regularisation method of \insertCiteWarton2008;textualBSL.

penalty

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

standardise

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

A logical argument indicating whether the Gaussian rank correlation matrix \insertCiteBoudt2012BSL should be used to estimate the covariance matrix in “BSL” method. The default is FALSE, which uses the sample covariance by default.

whitening

This argument determines whether Whitening transformation should be used in “BSL” method with Warton's shrinkage. Whitening transformation helps decorrelate the summary statistics, thus encouraging 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

The whitened observed summary statisic. If this is not NULL, it will be used to save computation effort. Only used if Whitening is enabled.

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: gaussianSynLikeGhuryeOlkin for the unbiased synthetic likelihood estimator, semiparaKernelEstimate for the semi-parametric likelihood estimator, synLikeMisspec for the Gaussian synthetic likelihood estimator for model misspecification.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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

# the standard Gaussian synthetic likelihood (the likelihood estimator used in BSL)
gaussianSynLike(ssy, ssx)
# the Gaussian synthetic likelihood with glasso shrinkage estimation
# (the likelihood estimator used in BSLasso)
gaussianSynLike(ssy, ssx, shrinkage = 'glasso', penalty = 0.1)
# the Gaussian synthetic likelihood with Warton's shrinkage estimation
gaussianSynLike(ssy, ssx, shrinkage = 'Warton', penalty = 0.9)
# the Gaussian synthetic likelihood with Warton's shrinkage estimation and Whitening transformation
W <- estimateWhiteningMatrix(20000, m)
gaussianSynLike(ssy, ssx, shrinkage = 'Warton', penalty = 0.9, whitening = W)

ziwenan/BSL documentation built on April 25, 2021, 1:11 p.m.