bencampbell_14 bencampbell_14 - 1 year ago 135
R Question

R Benford Analysis

I'm using the benford.analysis package to explore the benford's law. I'm being asked to plot distribution of the first digit of any given data set and overlay it on a benford graph. Right now, i'm looking at the plot() of the benford.analysis package, i guess this will fit my requirement, its just that the plot() displays so many "plots"...


bfd.cp <- benford(corporate.payment$Amount,1)
plot(cp, except=c("mantissa", "chi square", "abs diff", "second order"))

I just need the Digits Distribution plot. Given my code above, the summary distribution, chi squared diff and summation diff are still displayed together with the digits distribution. I just want the Digits distrib plot, can it be done? When i add the "summation" or "ex summation" to the vector for the except parameter, nothing is displayed.

I don't want to resort to doing the plot on my own since i'm not confident with my R skills yet.

Answer Source

Invoke the multiple argument to get individual plots, like so:

plot(bfd.cp, except=c("mantissa", "chi square", "abs diff", "second order"), multiple = F)

Giving (among others): enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download