Description Usage Arguments Value References See Also Examples
View source: R/estimateLoglike.R
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.
1 2 3 4 5 6 7 8 |
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 \insertCiteGhurye1969;textualBSL. “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 \insertCiteFrazier2019BSL. |
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 |
... |
Arguments to be passed to methods.
|
The estimated synthetic (log) likelihood value.
gaussianSynLike
,
gaussianSynLikeGhuryeOlkin
,
semiparaKernelEstimate
and synLikeMisspec
.
1 2 3 4 5 6 7 8 9 | 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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.