Description Usage Arguments Details Value References Examples

In a population of accounts each unit has a book value, y, (known) and a true but unknown value, x. For a random sample of accounts the true values are observed. Using the posterior from a stepwise Bayes model this simulates possible values of D, the sum of the differences between the the book values and the true values. The 0.95 quantile of this posterior will yield an approximate 95 upper confidence bound for T for most populations and will be less conservative than the Stringer bound.

1 | ```
simulateD(ysmp,xsmp,yunsmp ,n,pgt,pwa,R)
``` |

`ysmp` |
numeric vector of book values for the units in the sample |

`xsmp` |
the corresponding true values for the units in the sample |

`yunsmp` |
numeric vector of the book values for the units not in the sample |

`n` |
an integer which is the size of the sample |

`pgt` |
numeric vector of prior guesses for the taints |

`pwa` |
weights corresponding to the taints that appear in the posterior |

`R` |
an integer which is the number of simulated values of D returned |

For a given unit (y-x)/x is its taint. pgt is a prior guess for the possible taints in the population. pwt specifies how much weight the prior guess pgt should have in the posterior. When all the taints are assumed to be nonnegative then the Stringer bound is often used. Setting both pqt and pwt equal to one yields a slightly shorter bound than that of Stringer's.

A vector of lenght R containing simulated values of D

Meeden, G. and Sargent, D. (2007)
Some Bayesian methods for two auditing problems.
*Communications in Statistics — Theory and Methods*,
**36**, 2727–2740.
doi: 10.1080/03610920701386802.

1 2 3 4 5 6 |

```
95%
711.9096
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.