6 How-to’s
This chapter contains various step-by-step instructions on how to perform best practices using the analyses in the ‘Audit Sampling’ section of the module.
6.1 Extending a sample selected with a fixed interval
If you have selected a sample using a fixed interval and need to extend it because your population has become larger, follow these steps to manually create a selection counter column. Click the ‘+’ icon next to the dataset and select ‘Compute column’.
Next, name the new column (for example, ‘Selected_for_sample’), then click the R icon, followed by the ‘scale’ icon, and click on ‘Create column’. This will open an editor where you can input the necessary R code.
Copy and paste the following R script into the editor, ensuring that you replace the first three lines with the appropriate values for your dataset. The interval
represents the fixed interval size, start
defines the starting point within the first interval, and book_values
should be replaced with the column name containing your book values.
<- ... # Specify the size of the fixed interval
interval <- ... # Specify the starting point in the first interval
start <- ... # Enter the name of the column containing book values
book_values
# Do not change the code below
<- sum(book_values) %/% interval; units <- start + interval * (0:(size - 1)); cumsum_values <- cumsum(book_values)
size <- rep(0, size)
items for (i in 1:size) items[i] <- which(units[i] <= cumsum_values)[1]
<- rep(0, length(book_values)); counts <- table(items); indices <- as.integer(dimnames(counts)[[1]]); result[indices] <- as.numeric(counts)
result result
For example, if you are selecting with an interval of €15,000 and a starting point of 1, you should enter the following values.
If you later extend your dataset by adding new data, you must re-run the computed column to update the selection while maintaining the same interval (e.g., €15,000).
6.2 Configurating and locking default options
You can launch JASP with a configuration file to set restrictions, disable, or hide certain options from users. This is particularly useful for deploying JASP for Audit within your organization, ensuring control over the options available to less statistically experienced users.
The configuration file type is .toml. The example .toml file below sets the likelihood in the classical planning analysis to the Poisson distribution and locks the option, preventing it from being changed. Additionally, it specifies the increment (the option name in the QML file is ‘by’) as 1 and the maximum sample size (the option name in the QML file is ‘max’) as 2,000 instead of the default 5,000.
Format = "0.1.0"
JASPVersion = "0.19.3"
EnabledModules = ["jaspAudit"]
[Modules.jaspAudit.Analyses.auditClassicalPlanning.Options]
likelihood = {Value = "poisson", Lock = true}
by = {Value = 1, Lock = true}
max = {Value = 2000, Lock = true}
To load this config file into JASP, go to ‘Preferences’ in the left menu, then ‘Advanced’, and click ‘Use a configuration file’ in the ‘Configuration File Options’ box. Select the location of your config file and restart JASP for the changes to take effect.
When you start the planning analysis, the options under advanced settings will be set to the corresponding defaults and cannot be changed by the user.