
A constructor for the BNPpart
class. The class BNPpart
is a named list containing
the output of partition estimation methods.
BNPpart(partitions = NULL, scores = NULL, psm = NULL)
a matrix, each row is a visited partition;
a vector, each value is the score of a visited partition;
a matrix, posterior similarity matrix.
data_toy <- c(rnorm(100, -3, 1), rnorm(100, 3, 1))
grid <- seq(-7, 7, length.out = 50)
est_model <- PYdensity(y = data_toy, mcmc = list(niter = 100,
nburn = 10, nupd = 100), output = list(grid = grid))
part <- partition(est_model)
class(part)
Run the code above in your browser using DataLab