| papply | R Documentation |
Applies a user-specified function to each particle contained in the
global variables peach and pall, collecting the
output in a data.frame
papply(fun, verb = 1, pre = "", ...)
fun |
a user-defined function which which takes a particle as its first
input; the output of |
verb |
a scalar |
pre |
an optional |
... |
these ellipses arguments are used to pass extra optional
arguments to the user-supplied function |
This is a extension to the built-in apply family of
function to particles, intended to be used with the particles created
by PL. Perhaps the most common use of this function is
in obtaining samples form the posterior predictive distribution, i.e.,
with the user supplied fun = pred.GP
The particles applied over must be present in the global variables
pall, containing sufficient information common to all
particles, peach, containing sufficient information
particular to each particle, as constructed by PL
Returns a data frame with the collected output of the user-specified
function fun
Robert B. Gramacy, rbg@vt.edu
Carvalho, C., Johannes, M., Lopes, H., and Polson, N. (2008). “Particle Learning and Smoothing.” Discussion Paper 2008-32, Duke University Dept. of Statistical Science.
https://bobby.gramacy.com/r_packages/plgp/
PL, pred.GP
## See the demos via demo(package="plgp") and the examples ## section of ?plgp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.