modified.moment: Modified Moment bound

Description Usage Arguments Value Details Author(s) References Examples

Description

Calculates the Modified Moment confidence bound for the maximum error in an audit population according to the methodology described by Dworin & Grimlund (1986).

Usage

1
modified.moment(bookValues, auditValues, pop.type = "inventory", confidence = 0.95)

Arguments

bookValues

A vector of book values from sample.

auditValues

A vector of corresponding audit values from the sample.

pop.type

A character defining the type of population audited. inventory for inventory populations. accounts for populations of accounts receivable.

confidence

The amount of confidence desired from the bound (on a scale from 0 to 1), defaults to 95% confidence.

Value

An estimate of the mean taint per dollar unit in the population.

Details

EMPTY FOR NOW

Author(s)

Koen Derks, k.derks@nyenrode.nl

References

Dworin, L., & Grimlund, R. A. (1986). Dollar-unit sampling: A comparison of the quasi-Bayesian and moment bounds. Accounting Review, 36-57.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Create an imaginary data set
bookValues   <- rgamma(n = 2400, shape = 1, rate = 0.001)
error.rate   <- 0.1
error        <- sample(0:1, 2400, TRUE, c(1-error.rate, error.rate))
taint        <- rchisq(n = 2400, df = 1) / 10
auditValues  <- bookValues - (error * taint * bookValues)
frame        <- data.frame( bookValues = round(bookValues,2),
                            auditValues = round(auditValues,2))
# Draw a sample
samp.probs   <- frame$bookValues/sum(frame$bookValues)
sample.no    <- sample(1:nrow(frame), 100, FALSE, samp.probs)
sample       <- frame[sample.no, ]
# Calculate bound
modified.moment(bookValues = sample$bookValues,
                auditValues = sample$auditValues,
                pop.type = "inventory",
                confidence = 0.95)

koenderks/auditR documentation built on May 16, 2019, 7:16 p.m.