MUS.extraction: Extract a sample using Monetary Unit Sampling.

Description Usage Arguments Value Author(s) See Also Examples

Description

Extract a sample using Monetary Unit Sampling. At the end of the extraction step, you get to know the items that you have to audit.

Usage

1
MUS.extraction(plan, start.point, seed, obey.n.as.min, combined)

Arguments

plan

A MUS.planning.result object that you got by executing the function MUS.planning.

start.point

The extraction method uses fixed interval sampling. The monetary unit specified by start.point will be drawn in each interval. Default is NULL, in this case a random number is drawn.

seed

A seed number which will be used to initialise the random number generator. Default is NULL which means that no new random number generator is initialised. This argument is mainly used for simulations or if you want to be able to regenerate the sample on another computer.

obey.n.as.min

Boolean. If set to TRUE, the sample interval will be exactly recalculated and thus the sample size will be exactly the planned sample size. Default is FALSE which is what most commercial statistical software do. In this case the drawn sample size might be slightly smaller than specified.

combined

Boolean. Marks the dataset as a combination of multiple strata. Default is "FALSE".

Value

An object MUS.extraction.result is returned which is a list containing the following elements:

MUS.planning.result elements

All elements that are contained in MUS.planning.result object. For auditing acceptability and for further steps all inputs are also returned.

start.point

dito.

seed

dito.

obey.n.as.min

dito.

high.values

The part of the population that is classified as individually significant items. All of them have to be audited.

sample.population

The part of the population that is not in the high-values-subpopulation.

sampling.interval

The reassessed sampling interval that have to be used for evaluation.

sample

The extracted sample. All elements have to be audited.

Author(s)

Henning Prömpers <henning@proempers.net>

See Also

MUS.planning for planning a sample and MUS.evaluation for evaluation of the extracted and audited sample.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Simple Example
# Assume 500 invoices, each between 1 and 1000 monetary units
example.data.1 <- data.frame(book.value=round(runif(n=500, min=1,
max=1000)))
# Plan a sample and cache it
plan.results.simple <- MUS.planning(data=example.data.1,
tolerable.error=100000, expected.error=20000)
# Extract a sample and cache it
extract.results.simple <- MUS.extraction(plan.results.simple)

## Advanced Example
example.data.2 <- data.frame(own.name.of.book.values=round(runif(n=500,
min=1, max=1000)))
plan.results.advanced <- MUS.planning(data=example.data.2,
col.name.book.values="own.name.of.book.values", confidence.level=.70,
tolerable.error=100000, expected.error=20000, n.min=3)
extract.results.advanced <- MUS.extraction(plan.results.advanced,
start.point=5, seed=0, obey.n.as.min=TRUE)

Example output



MUS documentation built on May 2, 2019, 12:36 p.m.