Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict_DP

Prediction for DP density estimation models.


Description

Prediction for DP density estimation models.

Usage

predict_DP(x, fit, K, pi = "pi", dens, params, R_params, samps = FALSE)

Arguments

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).

Value

Matrix of posterior mean, sd, .025, and .975 intervals.

Author(s)

Stephen R. Martin


MIRES

Measurement Invariance Assessment Using Random Effects Models and Shrinkage

v0.1.0
MIT + file LICENSE
Authors
Stephen Martin [aut, cre] (<https://orcid.org/0000-0001-8085-2390>), Philippe Rast [aut] (<https://orcid.org/0000-0003-3630-6629>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.