Prediction for DP density estimation models.
predict_DP(x, fit, K, pi = "pi", dens, params, R_params, samps = FALSE)Values for prediction.
Stan DP fit.
Max cluster.
Character. Name of stan variable corresponding to DP weights.
Function. The density base function used.
Character vector. Names of base/kernel function parameters in Stan (e.g., mu, sigma for normal base functions).
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.