evaluation {jfa} | R Documentation |
Audit Sampling: Evaluation
Description
evaluation()
is used to perform statistical inference
about the misstatement in a population after auditing a statistical sample.
It allows specification of statistical requirements for the sample with
respect to the performance materiality or the precision. The function returns
an object of class jfaEvaluation
that can be used with associated
summary()
and plot()
methods.
Usage
evaluation(
materiality = NULL,
method = c(
"poisson", "binomial", "hypergeometric",
"inflated.poisson", "hurdle.beta",
"stringer.poisson", "stringer.binomial", "stringer.hypergeometric",
"stringer.meikle", "stringer.lta", "stringer.pvz", "stringer",
"rohrbach", "moment", "coxsnell", "mpu", "pps",
"direct", "difference", "quotient", "regression"
),
alternative = c("less", "two.sided", "greater"),
conf.level = 0.95,
data = NULL,
values = NULL,
values.audit = NULL,
strata = NULL,
times = NULL,
x = NULL,
n = NULL,
N.units = NULL,
N.items = NULL,
pooling = c("none", "complete", "partial"),
prior = FALSE
)
Arguments
materiality |
a numeric value between 0 and 1 specifying the
performance materiality (i.e., the maximum tolerable misstatement in the
population) as a fraction of the total number of units in the population.
Can be |
method |
a character specifying the statistical method. Possible
options are |
alternative |
a character indicating the alternative hypothesis and
the type of confidence / credible interval returned by the function.
Possible options are |
conf.level |
a numeric value between 0 and 1 specifying the confidence level (i.e., 1 - audit risk / detection risk). |
data |
a data frame containing a data sample. |
values |
a character specifying name of a numeric column in
|
values.audit |
a character specifying name of a numeric column in
|
strata |
a character specifying name of a factor column in
|
times |
a character specifying name of an integer column in
|
x |
a numeric value or vector of values equal to or larger
than 0 specifying the sum of (proportional) misstatements in the sample or,
if this is a vector, the sum of taints in each stratum. If this argument is
specified, the input for the |
n |
an integer or vector of integers larger than 0
specifying the sum of (proportional) misstatements in the sample or, if
this is a vector, the sum of taints in each stratum. If this argument is
specified, the input for the |
N.units |
a numeric value or vector of values than 0 specifying
the total number of units in the population or, if this is a vector, the
total number of units in each stratum of the population.
This argument is strictly required for the |
N.items |
an integer larger than 0 specifying the number of items
in the population. Only used for methods |
pooling |
a character specifying the type of model to use when
analyzing stratified samples. Possible options are |
prior |
a logical specifying whether to use a prior
distribution, or an object of class |
Details
This section lists the available options for the method
argument.
poisson
: Evaluates the sample with the Poisson distribution. If combined withprior = TRUE
, performs Bayesian evaluation using a gamma prior.binomial
: Evaluates the sample with the binomial distribution. If combined withprior = TRUE
, performs Bayesian evaluation using a beta prior.hypergeometric
: Evaluates the sample with the hypergeometric distribution. If combined withprior = TRUE
, performs Bayesian evaluation using a beta-binomial prior.inflated.poisson
: Inflated Poisson model incorporating the explicit probability of misstatement being zero. Ifprior = TRUE
, performs Bayesian evaluation using a beta prior.hurdle.beta
: Hurdle beta model incorporating the explicit probability of a taint being zero, one, or in between. Ifprior = TRUE
, this setup performs Bayesian evaluation using a beta prior.stringer.poisson
: Evaluates the sample with the Stringer bound using the Poisson distribution.stringer.binomial
: Evaluates the sample with the Stringer bound using the binomial distribution (Stringer, 1963).stringer.hypergeometric
: Evaluates the sample with the Stringer bound using the hypergeometric distribution.stringer.meikle
: Evaluates the sample using the Stringer bound with Meikle's correction for understatements (Meikle, 1972).stringer.lta
: Evaluates the sample using the Stringer bound with LTA correction for understatements (Leslie, Teitlebaum, and Anderson, 1979).stringer.pvz
: Evaluates the sample using the Stringer bound with Pap and van Zuijlen's correction for understatements (Pap and van Zuijlen, 1996).rohrbach
: Evaluates the sample using Rohrbach's augmented variance bound (Rohrbach, 1993).moment
: Evaluates the sample using the modified moment bound (Dworin and Grimlund, 1984).coxsnell
: Evaluates the sample using the Cox and Snell bound (Cox and Snell, 1979).mpu
: Evaluates the sample with the mean-per-unit estimator using the Normal distribution.pps
: Evaluates the sample with the proportional-to-size estimator using the Student-t distribution.direct
: Evaluates the sample using the direct estimator (Touw and Hoogduin, 2011).difference
: Evaluates the sample using the difference estimator (Touw and Hoogduin, 2011).quotient
: Evaluates the sample using the quotient estimator (Touw and Hoogduin, 2011).regression
: Evaluates the sample using the regression estimator (Touw and Hoogduin, 2011).
Value
An object of class jfaEvaluation
containing:
conf.level |
a numeric value between 0 and 1 giving the confidence level. |
mle |
a numeric value between 0 and 1 giving the most likely misstatement in the population as a fraction. |
ub |
a numeric value between 0 and 1 giving the upper bound for the misstatement in the population. |
lb |
a numeric value between 0 and 1 giving the lower bound for the misstatement in the population. |
precision |
a numeric value between 0 and 1 giving the difference
between the most likely misstatement and the bound relative to
|
p.value |
for classical tests, a numeric value giving the p-value. |
x |
an integer larger than, or equal to, 0 giving the number of misstatements in the sample. |
t |
a value larger than, or equal to, 0, giving the sum of proportional misstatements in the sample. |
n |
an integer larger than 0 giving the sample size. |
materiality |
if |
alternative |
a character indicating the alternative hypothesis. |
method |
a character the method used. |
N.units |
if |
N.items |
if |
K |
if |
prior |
an object of class |
posterior |
an object of class |
data |
a data frame containing the relevant columns from the
|
strata |
a data frame containing the relevant statistical results for the strata. |
data.name |
a character giving the name of the data. |
Author(s)
Koen Derks, k.derks@nyenrode.nl
References
Cox, D. and Snell, E. (1979). On sampling and the estimation of rare errors. Biometrika, 66(1), 125-132. doi:10.1093/biomet/66.1.125.
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. (2021). The Bayesian approach to audit evidence: Quantifying statistical evidence using the Bayes factor. PsyArXiv. doi:10.31234/osf.io/kzqp5
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
Derks, K., de Swart, J., Wagenmakers, E.-J., & Wetzels, R. (2022). Bayesian generalized linear modeling for audit sampling: How to incorporate audit information into the statistical model. PsyArXiv. doi:10.31234/osf.io/byj2a
Dworin, L. D. and Grimlund, R. A. (1984). Dollar-unit sampling for accounts receivable and inventory. The Accounting Review, 59(2), 218-241. https://www.jstor.org/stable/247296
Leslie, D. A., Teitlebaum, A. D., & Anderson, R. J. (1979). Dollar-unit Sampling: A Practical Guide for Auditors. Copp Clark Pitman; Belmont, CA. ISBN: 9780773042780.
Meikle, G. R. (1972). Statistical Sampling in an Audit Context. Canadian Institute of Chartered Accountants.
Pap, G., and van Zuijlen, M. C. (1996). On the asymptotic behavior of the Stringer bound. Statistica Neerlandica, 50(3), 367-389. doi:10.1111/j.1467-9574.1996.tb01503.x.
Rohrbach, K. J. (1993). Variance augmentation to achieve nominal coverage probability in sampling from audit populations. Auditing, 12(2), 79.
Stringer, K. W. (1963). Practical aspects of statistical sampling in auditing. In Proceedings of the Business and Economic Statistics Section (pp. 405-411). American Statistical Association.
Touw, P., and Hoogduin, L. (2011). Statistiek voor Audit en Controlling. Boom uitgevers Amsterdam.
See Also
Examples
# Using summary statistics
evaluation(materiality = 0.05, x = 0, n = 100) # Non-stratified
evaluation(materiality = 0.05, x = c(2, 1, 0), n = c(50, 70, 40)) # Stratified
# Using data
data("BuildIt")
BuildIt$inSample <- c(rep(1, 100), rep(0, 3400))
levs <- c("low", "medium", "high")
BuildIt$stratum <- factor(c(levs[3], levs[2], rep(levs, times = 1166)))
sample <- subset(BuildIt, BuildIt$inSample == 1)
# Non-stratified evaluation
evaluation(
materiality = 0.05, data = sample,
values = "bookValue", values.audit = "auditValue"
)
# Stratified evaluation
evaluation(
materiality = 0.05, data = sample, values = "bookValue",
values.audit = "auditValue", strata = "stratum"
)