Description Usage Arguments Value References See Also Examples
View source: R/gaussianSynLike.R
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.
1 2 3 4 5 6 7 8 9 10 11 12 |
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 |
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
|
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 |
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, |
ssyTilde |
The whitened observed summary statisic. If this is not
|
log |
A logical argument indicating if the log of likelihood is
given as the result. The default is |
verbose |
A logical argument indicating whether an error message
should be printed if the function fails to compute a likelihood. The
default is |
The estimated synthetic (log) likelihood value.
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.