Description Usage Arguments Value Author(s)
Prediction for DP density estimation models.
1 | predict_DP(x, fit, K, pi = "pi", dens, params, R_params, samps = FALSE)
|
x |
Values for prediction. |
fit |
Stan DP fit. |
K |
Max cluster. |
pi |
Character. Name of stan variable corresponding to DP weights. |
dens |
Function. The density base function used. |
params |
Character vector. Names of base/kernel function parameters in Stan (e.g., mu, sigma for normal base functions). |
R_params |
Character vector. Names of corresponding parameters for the R equivalent (e.g., mean, sd in dnorm). |
Matrix of posterior mean, sd, .025, and .975 intervals.
Stephen R. Martin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.