Skip to contents

Simulate the highest density interval (HDI) width for a beta posterior.

Usage

betaHDIwidthSim(
  genPriorMean,
  genPriorN,
  audPriorMean = 0.5,
  audPriorN = 2,
  HDImass = 0.95,
  minSamples = 20,
  maxSamples = 200
)

Arguments

genPriorMean

The mean of the generating distribution.

genPriorN

The sum of the generating distributions shape parameters.

audPriorMean

The mean of the prior for analysis.

audPriorN

The sum of the prior's shape parameters or sample size on which the prior is based.

HDImass

The desired mass of the highest density interval (HDI).

minSamples

Number of samples to begin simulation.

maxSamples

Number of samples to end simulation.

Value

A dataframe with columns n and HDIwidth.