quantile.lgcpPredict {lgcp} | R Documentation |
quantile.lgcpPredict function
Description
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).
Usage
## S3 method for class 'lgcpPredict'
quantile(
x,
qt,
tidx = NULL,
fun = NULL,
inWindow = x$xyt$window,
crop2parentwindow = TRUE,
startidx = 1,
sampcount = NULL,
...
)
Arguments
x |
an object of class lgcpPredict |
qt |
a vector of the required quantiles |
tidx |
the index number of the the time interval of interest, default is the last time point. |
fun |
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. |
inWindow |
an observation owin window on which to compute the quantiles, can speed up calculation. Default is x$xyt$window. |
crop2parentwindow |
logical: whether to only compute the quantiles for cells inside x$xyt$window (the 'parent window') |
startidx |
optional starting sample index for computing quantiles. Default is 1. |
sampcount |
number of samples to include in computation of quantiles after startidx. Default is all |
... |
additional arguments |
Value
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.
See Also
lgcpPredict, dump2dir, setoutput, plot.lgcpQuantiles