predict_DP: Prediction for DP density estimation models.

Description Usage Arguments Value Author(s)

View source: R/density.R

Description

Prediction for DP density estimation models.

Usage

1
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 documentation built on Feb. 22, 2021, 5:10 p.m.