Learn R Programming

lgcp (version 0.9-1)

quantile.lgcpPredict: quantile...

Description

quantile.lgcpPredict function

Usage

## S3 method for class 'lgcpPredict':
quantile(x, qt, tidx, fun,
    inWindow=x$xyt$window, crop2parentwindow=TRUE, ...)

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')
...
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.

Details

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).

See Also

lgcpPredict, dump2dir, setoutput, plot.lgcpQuantiles