auditPrior {jfa}R Documentation

Audit Sampling: Prior Distributions

Description

auditPrior() is used to create a prior distribution for Bayesian audit sampling. The interface allows a complete customization of the prior distribution as well as a formal translation of pre-existing audit information into a prior distribution. The function returns an object of class jfaPrior that can be used in the planning() and evaluation() functions via their prior argument. Objects with class jfaPrior can be further inspected via associated summary() and plot() methods. They can also be used to compute a convoluted prior using the + (for addition) and * (for weighing) operators.

Usage

auditPrior(
  method = c(
    "default", "param", "strict", "impartial", "hyp",
    "arm", "bram", "sample", "factor", "nonparam"
  ),
  likelihood = c(
    "poisson", "binomial", "hypergeometric",
    "normal", "uniform", "cauchy", "t", "chisq",
    "exponential"
  ),
  N.units = NULL,
  alpha = NULL,
  beta = NULL,
  materiality = NULL,
  expected = 0,
  ir = NULL,
  cr = NULL,
  ub = NULL,
  p.hmin = NULL,
  x = NULL,
  n = NULL,
  factor = NULL,
  samples = NULL,
  conf.level = 0.95
)

Arguments

method

a character specifying the method by which the prior distribution is constructed. Possible options are default, strict, impartial, param, arm, bram, hyp, sample, and factor. See the details section for more information.

likelihood

a character specifying the likelihood for updating the prior distribution. Possible options are poisson (default) for a conjugate gamma prior distribution, binomial for a conjugate beta prior distribution, or hypergeometric for a conjugate beta-binomial prior distribution. See the details section for more information.

N.units

a numeric value larger than 0 specifying the total number of units in the population. Required for the hypergeometric likelihood.

alpha

a numeric value specifying the \alpha parameter of the prior distribution. Required for method param.

beta

a numeric value specifying the \beta parameter of the prior distribution. Required for method param.

materiality

a numeric value between 0 and 1 specifying the performance materiality (i.e., the maximum tolerable misstatement in the population) as a fraction. Required for methods impartial, arm, and hyp.

expected

a numeric value between 0 and 1 specifying the expected (tolerable) misstatements in the sample relative to the total sample size. Required for methods impartial, arm, bram, and hyp.

ir

a numeric value between 0 and 1 specifying the inherent risk (i.e., the probability of material misstatement occurring due to inherent factors) in the audit risk model. Required for method arm.

cr

a numeric value between 0 and 1 specifying the internal control risk (i.e., the probability of material misstatement occurring due to internal control systems) in the audit risk model. Required for method arm.

ub

a numeric value between 0 and 1 specifying the conf.level-% upper bound for the prior distribution as a fraction. Required for method bram.

p.hmin

a numeric value between 0 and 1 specifying the prior probability of the hypothesis of tolerable misstatement (H1: \theta < materiality). Required for method hyp.

x

a numeric value larger than, or equal to, 0 specifying the sum of proportional misstatements (taints) in a prior sample. Required for methods sample and factor.

n

a numeric value larger than 0 specifying the number of units in a prior sample. Required for methods sample and factor.

factor

a numeric value between 0 and 1 specifying the weight of a prior sample specified via x and n. Required for method factor.

samples

a numeric vector containing samples of the prior distribution. Required for method nonparam.

conf.level

a numeric value between 0 and 1 specifying the confidence level (1 - audit risk).

Details

To perform Bayesian audit sampling you must assign a prior distribution to the parameter in the model, i.e., the population misstatement \theta. The prior distribution can incorporate pre-existing audit information about \theta into the analysis, which consequently allows for a more efficient or more accurate estimates. The default priors used by jfa are indifferent towards the possible values of \theta, while still being proper. Note that the default prior distributions are a conservative choice of prior since they, in most cases, assume all possible misstatement to be equally likely before seeing a data sample. It is recommended to construct an informed prior distribution based on pre-existing audit information when possible.

This section elaborates on the available input options for the method argument.

This section elaborates on the available input options for the likelihood argument and the corresponding conjugate prior distributions used by jfa.

Value

An object of class jfaPrior containing:

prior

a string describing the functional form of the prior distribution.

description

a list containing a description of the prior distribution, including the parameters of the prior distribution and the implicit sample on which the prior distribution is based.

statistics

a list containing statistics of the prior distribution, including the mean, mode, median, and upper bound of the prior distribution.

specifics

a list containing specifics of the prior distribution that vary depending on the method.

hypotheses

if materiality is specified, a list containing information about the hypotheses, including prior probabilities and odds for the hypothesis of tolerable misstatement (H1) and the hypothesis of intolerable misstatement (H0).

method

a character indicating the method by which the prior distribution is constructed.

likelihood

a character indicating the likelihood of the data.

materiality

if materiality is specified, a numeric value between 0 and 1 giving the materiality used to construct the prior distribution.

expected

a numeric value larger than, or equal to, 0 giving the input for the number of expected misstatements.

conf.level

a numeric value between 0 and 1 giving the confidence level.

N.units

if N.units is specified, the number of units in the population.

Author(s)

Koen Derks, k.derks@nyenrode.nl

References

Derks, K., de Swart, J., van Batenburg, P., Wagenmakers, E.-J., & Wetzels, R. (2021). Priors in a Bayesian audit: How integration of existing information into the prior distribution can improve audit transparency and efficiency. International Journal of Auditing, 25(3), 621-636. doi:10.1111/ijau.12240

Derks, K., de Swart, J., Wagenmakers, E.-J., Wille, J., & Wetzels, R. (2021). JASP for audit: Bayesian tools for the auditing practice. Journal of Open Source Software, 6(68), 2733. doi:10.21105/joss.02733

Derks, K., de Swart, J., Wagenmakers, E.-J., & Wetzels, R. (2022). An impartial Bayesian hypothesis test for audit sampling. PsyArXiv. doi:10.31234/osf.io/8nf3e

See Also

planning selection evaluation

Examples

# Default beta prior
auditPrior(likelihood = "binomial")

# Impartial prior
auditPrior(method = "impartial", materiality = 0.05)

# Non-conjugate prior
auditPrior(method = "param", likelihood = "normal", alpha = 0, beta = 0.1)

[Package jfa version 0.7.1 Index]