posteriorPredictiveDensity: Density of the posterior predictive distribution at the given...

View source: R/posteriorPredictiveDensity.R

posteriorPredictiveDensityR Documentation

Density of the posterior predictive distribution at the given outcome value y

Description

Return the density for y taking a certain value given the DGP. Requires output from a posteriorPredictiveMAP() object and the outcome value y at which the density is measured.

Usage

posteriorPredictiveDensity(y, ppmap)

Arguments

y

the value taken by the new output

ppmap

A posteriorPredictiveMAP() object

Value

the density of the posterior predictive distribution of the outcome taking value y

Examples

df <- dgenRbinom()
postPredMAP <- posteriorPredictiveMAP(df$Y, df$D,  d=0, sigma0=1, lambda=1)
posteriorPredictiveDensity(y=1, postPredMAP)

johnsontr/entmax documentation built on July 2, 2022, 9:23 p.m.