check_logliks: Function to examine posterior log-Likelihoods

Description Usage Arguments Value

Description

check_logliks ingests the raw vector of posterior log-likelihoods and returns quantiles of interests, the mean, and a plot of the distribution if plot = TRUE. A well-behaving posterior distribution should be unimodal and peak at the mean.

Usage

1
2
3
4
5
check_logliks(
  log_liks,
  probs = c(0.05, 0.1, 0.2, 0.5, 0.8, 0.9, 0.95),
  plot = TRUE
)

Arguments

log_liks

A numeric vector of posterior draws from mmBPFA sampler. Must not be processed.

probs

A numeric vector of quantiles to display for log-likelihoods distribution. Default is c(0.05, 0.1, 0.2, 0.5, 0.8, 0.9, 0.95).

plot

A boolean indicating whether to plot the log-likelihood distribution. Default is TRUE.

Value

If plot is TRUE, returns none, else returns mean log-likelihood and quantiles.


EandrewJones/mmBPFA documentation built on Feb. 14, 2021, 11:17 p.m.