
This samples from the posterior predictive of a fitted logistic-normal multinomial model.
lnm_sampler(fit, newdata = NULL, indices = NULL, ...)
y_star A data.frame of samples y associated wtih the new inputs.
The fitted LNM model from which to draw posterior predictive samples.
A data.frame containing new inputs from which to sample responses. If NULL, defaults to the data used to estimate fit.
The coordinates of the response from which to draw samples.
Additional parameters passed to sample.
m <- lnm_model()
mat <- data.frame(matrix(rpois(250, 10), 25, 10))
colnames(mat) <- paste0("y", 1:6)
fit <- estimator(m)(y1 + y2 + y3 + y4 ~ y5 + y6, mat)
lnm_sampler(fit, depth = 10)
lnm_sampler(fit, depth = 100)
Run the code above in your browser using DataLab