Learn R Programming

jfa (version 0.5.5)

evaluation: Evaluate a statistical audit sample

Description

This function takes a data frame (using sample, bookValues, and auditValues) or summary statistics (using nSumstats and kSumstats) and performs inference on the misstatement in the sample. The function returns an object of class jfaEvaluation which can be used with associated summary() and plot() methods.

For more details on how to use this function, see the package vignette: vignette('jfa', package = 'jfa')

Usage

evaluation(materiality = NULL, minPrecision = NULL, method = 'binomial',
           confidence = 0.95, sample = NULL, bookValues = NULL, auditValues = NULL, 
           counts = NULL, nSumstats = NULL, kSumstats = NULL,
           N = NULL, populationBookValue = NULL,
           prior = FALSE, nPrior = 0, kPrior = 0, 
           rohrbachDelta = 2.7, momentPoptype = 'accounts',
           csA = 1, csB = 3, csMu = 0.5)

Arguments

materiality

a numeric value between 0 and 1 specifying the performance materiality (maximum tolerable error) as a fraction of the total size of the population. If specified, the function also returns the conclusion of the analysis with respect to the performance materiality. The value is discarded when direct, difference, quotient, or regression method is chosen.

minPrecision

a numeric value between 0 and 1 specifying the required minimum precision (upper bound minus most likely error) as a fraction of the total size of the population. If specified, the function also returns the conclusion of the analysis with respect to the required minimum precision.

method

a character specifying the method to be used in the evaluation. Possible options are poisson, binomial (default), hypergeometric, mpu, stringer, stringer-meikle, stringer-lta, stringer-pvz, rohrbach, moment, direct, difference, quotient, or regression. See the details section for more information.

confidence

a numeric value between 0 and 1 specifying the confidence level used in the evaluation. Defaults to 0.95 for 95% confidence.

sample

a data frame containing the sample to be evaluated. The sample must at least contain a column of book values and a column of audit (true) values.

bookValues

a character specifying the column name for the book values in the sample.

auditValues

a character specifying the column name for the audit values in the sample.

counts

a integer vector specifying the number of times each item in the sample should be counted in the evaluation (due to it being selected multiple times for the sample).

nSumstats

an integer larger than 0 specifying the number of items in the sample. If specified, overrides the sample, bookValues and auditValues arguments and assumes that the data come from summary statistics specified by both nSumstats and kSumstats.

kSumstats

a numeric value larger than 0 specifying the sum of errors found in the sample. If specified, overrides the sample, bookValues and auditValues arguments and assumes that the data come from summary statistics specified by both kSumstats and nSumstats.

N

an integer larger than 0 specifying the total number of items in the population.

populationBookValue

if method is one of direct, difference, quotient, or regression, a numeric value specifying the total value of the items in the population. This argument is optional otherwise.

prior

a logical specifying if a prior distribution must be used, or an object of class jfaPrior or jfaPosterior containing the prior distribution. Defaults to FALSE for frequentist planning. If TRUE, a negligible prior distribution is chosen by default, but can be adjusted using the `kPrior` and `nPrior` arguments. Chooses a conjugate gamma distribution for the Poisson likelihood, a conjugate beta distribution for the binomial likelihood, and a conjugate beta-binomial distribution for the hypergeometric likelihood.

nPrior

if prior = TRUE, a numeric value larger than, or equal to, 0 specifying the sample size of the sample equivalent to the prior information.

kPrior

if prior = TRUE, a numeric value larger than, or equal to, 0 specifying the sum of errors in the sample equivalent to the prior information.

rohrbachDelta

if method = 'rohrbach', a numeric value specifying \(\Delta\) in Rohrbach's augmented variance bound (Rohrbach, 1993).

momentPoptype

if method = 'moment', a character specifying the type of population (Dworin and Grimlund, 1984). Possible options are accounts and inventory. This argument affects the calculation of the central moments in the bound.

csA

if method = "coxsnell", a numeric value specifying the \(\alpha\) parameter of the prior distribution on the mean taint. Defaults to 1 as recommended by Cox and Snell (1979).

csB

if method = "coxsnell", a numeric value specifying the \(\beta\) parameter of the prior distribution on the mean taint. Defaults to 3 as recommended by Cox and Snell (1979).

csMu

if method = "coxsnell", a numeric value between 0 and 1 specifying the mean of the prior distribution on the mean taint. Defaults to 0.5 as recommended by Cox and Snell (1979).

Value

An object of class jfaEvaluation containing:

confidence

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

materiality

if materiality is specified, a numeric value between 0 and 1 indicating the performance materiality as a fraction of the total population size.

minPrecision

if minPrecision is specified, a numeric value between 0 and 1 indicating the minimum required precision as a fraction of the total population size.

method

a character indicating the evaluation method.

N

if N is specified, in integer larger than 0 indicating the population size.

n

an integer larger than 0 indicating the sample size.

k

an integer larger than, or equal to, 0 indicating the number of items in the sample that contained an error.

t

a value larger than, or equal to, 0, indicating the sum of observed taints.

mle

a numeric value between 0 and 1 indicating the most likely error in the population as a fraction of its total size.

precision

a numeric value between 0 and 1 indicating the difference between the most likely error and the upper bound in the population as a fraction of the total population size.

popBookvalue

if populationBookValue is specified, a numeric value larger than 0 indicating the total value of the population.

pointEstimate

if method is one of direct, difference, quotient, or regression, a numeric value indicating the point estimate of the population misstatement as a fraction the total population size.

lowerBound

if method is one of direct, difference, quotient, or regression, a numeric value indicating the lower bound of the interval around the population misstatement as a fraction the total population size.

upperBound

if method is one of direct, difference, quotient, or regression, a numeric value indicating the upper bound of the interval around the population misstatement as a fraction the total population size.

confBound

a numeric value indicating the upper bound on the population misstatement as a fraction the total population size.

conclusion

if materiality is specified, a character indicating the conclusion about whether to approve or not approve the population with respect to the performance materiality.

populationK

if method = 'hypergeometric', an integer indicating the assumed total errors in the population.

prior

an object of class 'jfaPrior' that contains the prior distribution.

posterior

an object of class 'jfaPosterior' that contains the posterior distribution.

data

a data frame containing the relevant columns from the sample.

Details

This section lists the available options for the methods argument.

  • poisson: Evaluates the sample with the Poisson distribution. If combined with prior = TRUE, performs Bayesian evaluation using a gamma prior and posterior.

  • binomial: Evaluates the sample with the binomial distribution. If combined with prior = TRUE, performs Bayesian evaluation using a beta prior and posterior.

  • hypergeometric: Evaluates the sample with the hypergeometric distribution. If combined with prior = TRUE, performs Bayesian evaluation using a beta-binomial prior and posterior.

  • mpu: Evaluates the sample with the mean-per-unit estimator.

  • stringer: Evaluates the sample with the Stringer bound (Stringer, 1963).

  • stringer-meikle: Evaluates the sample with the Stringer bound with Meikle's correction for understatements (Meikle, 1972).

  • stringer-lta: Evaluates the sample with the Stringer bound with LTA correction for understatements (Leslie, Teitlebaum, and Anderson, 1979).

  • stringer-pvz: Evaluates the sample with the Stringer bound with Pap and van Zuijlen's correction for understatements (Pap and van Zuijlen, 1996).

  • rohrbach: Evaluates the sample with Rohrbach's augmented variance bound (Rohrbach, 1993).

  • moment: Evaluates the sample with the modified moment bound (Dworin and Grimlund, 1984).

  • coxsnell: Evaluates the sample with the Cox and Snell bound (Cox and Snell, 1979).

  • direct: Evaluates the sample with the direct estimator (Touw and Hoogduin, 2011).

  • difference: Evaluates the sample with the difference estimator (Touw and Hoogduin, 2011).

  • quotient: Evaluates the sample with the quotient estimator (Touw and Hoogduin, 2011).

  • regression: Evaluates the sample with the regression estimator (Touw and Hoogduin, 2011).

References

Cox, D. and Snell, E. (1979). On sampling and the estimation of rare errors. Biometrika, 66(1), 125-132.

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, 1-16.

Dworin, L. D. and Grimlund, R. A. (1984). Dollar-unit sampling for accounts receivable and inventory. The Accounting Review, 59(2), 218<U+2013>241

Leslie, D. A., Teitlebaum, A. D., & Anderson, R. J. (1979). Dollar-unit Sampling: A Practical Guide for Auditors. Copp Clark Pitman; Belmont, Calif.: distributed by Fearon-Pitman.

Meikle, G. R. (1972). Statistical Sampling in an Audit Context: An Audit Technique. 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.

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

auditPrior planning selection report auditBF

Examples

Run this code
# NOT RUN {
data('BuildIt')

# Draw a sample of 100 monetary units from the population using
# fixed interval monetary unit sampling
sample <- selection(population = BuildIt, sampleSize = 100, 
          algorithm = 'interval', units = 'mus', bookValues = 'bookValue')$sample

# Evaluate using the Stringer bound
evaluation(materiality = 0.05, method = 'stringer', confidence = 0.95,
           sample = sample, bookValues = 'bookValue', auditValues = 'auditValue')

# }

Run the code above in your browser using DataLab