| initialize {FVDDPpkg} | R Documentation |
Initialize Fleming-Viot dependent Dirichlet Processes by setting hyperparameters
Description
Initialize Fleming-Viot dependent Dirichlet Processes by setting hyperparameters
Usage
initialize(theta, sampling.f, density.f, atomic)
Arguments
theta |
The intensity of the centering measure, in the sense of Bayesian Nonparametrics. |
sampling.f |
A function to sample from the centering. Its unique argument must be the amount of values to be drawn. |
density.f |
A function to compute the value of the density function or
mass function of the centering. It has to be consistent with |
atomic |
A boolean value stating whether the centering is atomic or not. |
Value
A list containing the input (renamed as theta, P0.sample,
P0.density, and is.atomic) and three empty slots that will contain the
information once the FVDDP is updated with data. In particular, they are:
-
y.star: a vector of unique values -
M: a matrix of multiplicities, represented as row vectors -
w: a vector of weights associated to each row of the matrix of multiplicities. Such list repesents a n object of thefvddpclass.
References
Papaspiliopoulos O, Ruggiero M (2014). “Optimal filtering and the dual process.” Bernoulli, 20(4). doi:10.3150/13-bej548.
Papaspiliopoulos O, Ruggiero M, Spanò D (2016). “Conjugacy properties of time-evolving Dirichlet and gamma random measures.” Electronic Journal of Statistics, 10(2), 3452 – 3489. doi:10.1214/16-EJS1194.
Examples
#initiization with an atomic measure (Pois(3))
initialize(theta = 1, sampling.f = function(x) rpois(x, 3),
density.f = function(x) dpois(x, 3), atomic = TRUE)
#initialization with a non-atomic measure (N(-1, 3))
initialize(theta = 3, sampling.f = function(x) rnorm(x, -1, 3),
density.f = function(x) dnorm(x, -1, 3), atomic = FALSE)