predict.ddt_lcm | R Documentation |
Predict individual class memberships based on posterior predictive distributions. For each posterior sample, let the class memberships be modal assignments. Then aggregate over all posterior samples to obtain the most likely assigned classes.
## S3 method for class 'ddt_lcm'
predict(object, data, burnin = 3000, ...)
object |
a ddt_lcm object |
data |
an NxJ matrix of multivariate binary responses, where N is the number of individuals, and J is the number of granular items |
burnin |
number of samples to discard from the posterior chain as burn-ins. Default is 3000. |
... |
Further arguments passed to each method |
a list of the following named elements:
class_assignments
an integer vector of individual predicted class memberships taking values in 1, ..., K
predictive_probs
a N x K matrix of probabilities, where the (i,k)-th element is the probability that the i-th individual is predicted to belong to class k.
data(result_diet_1000iters)
burnin <- 500
predicted <- predict(result_diet_1000iters, result_diet_1000iters$data, burnin)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.