Benford_simulation: Simulates N Benford distribution datasets with matching digit...

View source: R/padding_test.R

Benford_simulationR Documentation

Simulates N Benford distribution datasets with matching digit places as the observed dataset.

Description

Simulates N Benford distribution datasets with matching digit places as the observed dataset.

Usage

Benford_simulation(N, freq_table, expected_mean, contingency_table)

Arguments

N

The number of Benford conforming datasets to simulate.

  • 2400 seconds for N=10,000; data dimension = 4000 x 5 total digits.

freq_table

freq_table item returned from get_expected_mean

expected_mean

expected_mean item returned from get_expected_mean

contingency_table

The user-input probability table of arbitrary distribution. Overwrites distribution if not NA. Must be a dataframe of the form as benford_table. Defaulted to NA.

  • Check out load(file = "data/benford_table.RData") to see the format of benford_table

Value

A dataframe for the mean of each simulated dataset in every digit place


jlederluis/digitanalysis documentation built on Nov. 5, 2023, 11:46 a.m.