This function requires data to have been dumped to disk: see ?dump2dir
and ?setoutput
. The routine quantile.lgcpPredict
computes quantiles of functions of Y. For example, to get cell-wise quantiles of exceedance probabilities, set fun=exp
.
Since computign the quantiles is an expensive operation, the option to output the quantiles on a subregion of interest is also provided (by
setting the argument inWindow
, which has a sensible default).
# S3 method for lgcpPredict
quantile(
x,
qt,
tidx = NULL,
fun = NULL,
inWindow = x$xyt$window,
crop2parentwindow = TRUE,
startidx = 1,
sampcount = NULL,
...
)
an object of class lgcpPredict
a vector of the required quantiles
the index number of the the time interval of interest, default is the last time point.
a 1-1 function (default the identity function) to be applied cell-wise to the grid. Must be able to evaluate sapply(vec,fun) for vectors vec.
an observation owin window on which to compute the quantiles, can speed up calculation. Default is x$xyt$window.
logical: whether to only compute the quantiles for cells inside x$xyt$window (the 'parent window')
optional starting sample index for computing quantiles. Default is 1.
number of samples to include in computation of quantiles after startidx. Default is all
additional arguments
an array, the [,,i]th slice being the grid of cell-wise quantiles, qt[i], of fun(Y), where Y is the MCMC output dumped to disk.