slice {synlik} | R Documentation |
Plot slices of the synthetic log-likelihood.
Description
Plot slices of the synthetic log-likelihood.
Usage
slice(object, ranges, nsim, param = object@param, pairs = FALSE,
draw = TRUE, trans = NULL, multicore = FALSE, ncores = detectCores() -
1, cluster = NULL, ...)
Arguments
object |
|
ranges |
ranges of values along which we want the slices. If |
nsim |
Number of simulations used to evaluate the synthetic likelihood at each location. |
param |
Named vector containing the value of the ALL parameters (including the sliced one). Parameters that are not
in |
pairs |
if |
draw |
If |
trans |
Named vector or list of transformations to be applied to the parameters in |
multicore |
If |
ncores |
Number of cores to use if |
cluster |
An object of class |
... |
additional arguments to be passed to |
Value
Either a vector or matrix of log-synthetic likelihood estimates, depending on whether length(parNames) ==
1 or 2.
These are returned invisibly.
Author(s)
Matteo Fasiolo <matteo.fasiolo@gmail.com>
Examples
data(ricker_sl)
# Plotting slices of the logLikelihood
slice(object = ricker_sl,
ranges = list("logR" = seq(3.5, 3.9, by = 0.01),
"logPhi" = seq(2, 2.6, by = 0.01),
"logSigma" = seq(-2, -0.5, by = 0.01)),
param = c(logR = 3.8, logSigma = log(0.3), logPhi = log(10)),
nsim = 500)
## Not run:
# Plotting a contour of the logLikelihood
slice(object = ricker_sl,
ranges = list("logR" = seq(3.5, 3.9, by = 0.01),
"logPhi" = seq(2, 2.6, by = 0.01),
"logSigma" = seq(-2, -0.5, by = 0.04)),
pairs = TRUE,
param = c(logR = 3.8, logSigma = log(0.3), logPhi = log(10)),
nsim = 500, multicore = TRUE)
## End(Not run)