Minor changes
auditPrior()
function,
method = "factor"
has been replaced with
method = "power"
to be consistent with existing
terminology.selection()
now always performs sampling with
replacement when using items = "values"
and
method = "random"
(Thanks to @lottemensink for the suggestion). This
should not lead to substantial differences in typical audit
populations.New features
planning()
function. This can be done by
providing a vector of integers to the expected
argument
that specifies the intended sampling plan. For instance,
expected = c(1, 0)
gives the sample size for a two-stage
sampling plan in which the auditor is allowed to extend the initial
sample after finding one misstatement and is allowed to approve the
population if the initial sample contains no misstatements.method = "inflated.poisson"
and
method = "hurdle.beta"
. Since these methods rely on mcmc
sampling, they can take any form of prior. They can also be fitted using
maximum likelihood estimation with prior = FALSE
.Minor changes
type = "estimates"
is now
the default option.Major changes
report()
function as it did not align with
the rest of the functionality in the package.Bug fixes
selection()
where the numeric data in
the sample was returned as character if the original data was entered as
character only (i.e.,
selection(data.frame(x = c("hello", "bye", "hi")), size = 2)
).N.units
is now only taken from the prior if the user
does not provide it manually to the planning()
and
evaluation()
functions.New features
model_fairness()
to compute
fairness metrics for algorithm auditing on the basis of predictions of
an algorithm.Minor changes
evaluation()
function, the typical stringer
bound has been changed from method = "stringer"
to
method = "stringer.binomial"
. Furthermore, additional
methods stringer.poisson
and
stringer.hypergeometric
are added that apply the stringer
bound using the Poisson and hypergeometric distributions, respectively.
The stringer
method will remain for now but redirect to
stringer.binomial
.rstantools 2.3.1
.New features
digit_test()
function now returns element
estimates
containing observed proportions and their
corresponding confidence intervals. The plot output also shows these
intervals around the estimates.Bug fixes
New features
evaluation()
function.digitTests
package via the digit_test()
and
repeated_test()
functions.Bug fixes
summary(selection)
was displayed incorrectly.Minor changes
Minor changes
Warning: <img> attribute "align" not allowed for HTML5
.R 4.2.0
.Minor changes
x
in evaluation()
and
expected
in planning()
is now automatically
ceiled (while throwing a warning) for
method = "hypergeometric"
.Major changes
jfaPredictive
. The probabilities for the prior and
posterior predictive distributions can be obtained by calling the
predict()
function.Minor changes
N.units
in auditPrior()
,
planning()
, and evaluation()
is now
automatically ceiled for likelihood
/method
=
'hypergeometric'
.likelihood
in
the prior
does not match with the
likelihood
/method
inputs for
planning()
and evaluation()
. The likelihood
from the prior is leading in these cases and will overrule the other
options.New features
randomize
to the
selection()
function, which allows the user to randomly
shuffle the items in the population before selection. Note that
specifying randomize = TRUE
overrules
order
.Bug fixes
planning
stopped at max
- 1).Major changes
order
argument in selection()
no
longer accepts a logical, but instead takes the column name of the
ranking variable in the data
.Minor changes
New features
alternative
with possible options
less
(default), two.sided
, and
greater
to the evaluation()
function that
allows control over the type of hypothesis test to perform and the type
of confidence / credible interval to calculate.predict.jfaPrior()
and
predict.jfaPosterior()
that produce predictions for the
data under the prior or posterior distribution.method = 'param'
to function
auditPrior()
which takes as input the raw
alpha
and beta
parameters of the prior
distribution.method = 'strict'
to function
auditPrior()
which constructs an (improper) prior
distribution that yields the same results (with respect to sample sizes
and upper limits) as classical procedures.method = 'sieve')
to selection()
.jfa
.auditPrior()
, planning()
, and
evaluation()
now contain information about the posterior
predictive distribution when N.units
is specified.Major changes
jfa
0.5.7 to jfa
0.6.0 there has been
a major overhaul in the names of function arguments. This is done so
that the calls integrate better with general R syntax and the package
gets more user-friendly. I apologize for any inconvenience this may
cause. The following names have been changed:
median
-> impartial
(in
auditPrior()
)sampleK
-> x
(in
auditPrior()
)sampleN
-> n
(in
auditPrior()
)N
-> N.units
(in
auditPrior()
)maxSize
-> max
(in
planning()
)increase
-> by
(in
planning()
)withReplacement
-> replace
(in
selection()
)ordered
-> order
(in
selection()
)ascending
-> decreasing
(in
selection()
)intervalStartingPoint
-> start
(in
selection()
)algorithm
-> method
(in
selection()
)expectedErrors
-> expected
(in
auditPrior()
and planning()
)confidence
-> conf.level
(in
auditPrior()
, planning()
, and
evaluation()
)pHmin
-> p.hmin
(in
auditPrior()
)minPrecision
-> min.precision
(in
auditPrior()
, planning()
, and
evaluation()
)population
-> data
(in
selection()
)kSumstats
-> x
(in
evaluation()
)nSumstats
-> n
(in
evaluation()
)sample
-> data
(in
evaluation()
)bookValues
-> values
(in
selection()
and evaluation()
)auditValues
-> values.audit
(in
evaluation()
)counts
-> times
(in
evaluation()
)popBookValues
-> N.units
(in
evaluation()
)rohrbachDelta
-> r.delta
(in
evaluation()
)momentPopType
-> m.type
(in
evaluation()
)csA
-> cs.a
(in
evaluation()
)csB
-> cs.b
(in
evaluation()
)csMu
-> cs.mu
(in
evaluation()
)records
-> items
(in
selection()
)mus
-> values
(in
selection()
)hypotheses
-> hyp
(in
auditPrior()
)poisson
is now the default likelihood / method for all
functions since it is the most conservative.method = 'interval'
is now the default selection
method.method = 'default'
or prior = TRUE
are now set
to the gamma(1, 1)
, beta(1,1)
, and
beta-binomial(1, 1)
priors.times
(former counts
) argument in
evaluation()
must now be indicated as a column name in the
data
instead of a vector.nPrior
and kPrior
have been removed from
the planning()
and evaluation()
functions. All
prior distributions must now be specified using
prior = TRUE
(noninformative priors) or using a call to
auditPrior()
.auditBF()
function since its value is
available through
evaluation(materiality = x, prior = auditPrior(method = 'impartial', materiality = x))
Minor changes
x
and n
to have the
same value in evaluation()
.Minor changes
?jfa-package
help
file.Bug fixes
print.jfaEvaluation()
call if there
was no performance materiality specified and
prior = TRUE
.New features
print()
functions now return a more concise
description of the relevant output.summary()
functions for all returned objects that
take over the former (elaborate) output of the print()
functions.auditBF()
which computes
Bayes factors from summary statistics of an audit sample.Bug fixes
evaluation()
in which the likelihood
stored in the prior was not properly passed to the function.Minor changes
New features
jfaPosterior
as returned by
evaluation()$posterior
and
planning()$expectedPosterior
can now be used as input for
the prior
argument in the planning()
and
evaluation()
functions.Bug fixes
method = 'bram'
in the
auditPrior()
function where the prior parameters would go
off to infinity when expectedError = 0
.Major changes
planning()
function does not
require a value for the materiality
anymore when planning
with the hypergeometric
likelihood.Minor changes
MUS
package to the unit
tests.New features
expectedErrors > 0
available for
method = 'hypotheses'
in the auditPrior()
function.method = 'hypotheses'
and
method = 'impartial'
in the auditPrior()
function available for likelihood = 'hypergeometric'
.bram
as a method for the
auditPrior()
function. method = 'bram'
computes a prior distribution with a given mode
(expectedError
) and upper bound (ub
).Bug fixes
evaluation()
function in which +1
was
added to the beta parameter, resulting in slightly lower modes than the
correct ones.N
has the correct
value of N = N - n
(current) instead of
N - n + k
(before).Major changes
confidence = 0.95
in all
applicable functions. confidence
currently has no default
value so that the user is required to give an input.likelihood = 'poisson'
in the
planning()
function to likelihood = 'binomial'
to be consistent across all functions.materiality
and minPrecision
are among the
first ones to be shown.Minor changes
New features
Bug fixes
phyper()
function instead of
the qhyper()
function, which resulted in lower bounds than
usual.Minor changes
Bug fixes
selection()
where if
population
is sorted or modified, bv
still
retained the old ordering and data. The resulting sample was
overweighted towards small values and/or still contained negative values
(Thanks to @alvanson).New features
report()
that automatically generates an
audit report.Major changes
sampling()
function, which is now replaced
entirely with the selection()
function.evaluation()
function when an
estimator is used.New features
digits
argument in the internal
jfa:::print.jfaPrior()
,
jfa:::print.jfaPlanning()
,
jfa:::print.jfaSelection()
, and
jfa:::print.jfaEvaluation()
functions to control rounding
in printing.description
, statistics
,
specifics
and hypotheses
to the output of the
auditPrior()
function.jfaPosterior
with print()
and
plot()
methods.expectedPosterior
of class
jfaPosterior
to the output of the planning()
function, includes description
, statistics
and
hypotheses
.posterior
of class jfaPosterior
to
the output of the evaluation()
function, includes
description
, statistics
and
hypotheses
.Bug fixes
auditPrior()
function for method = impartial
when expectedErrors > 0
.Major changes
sampling()
function that
it will be deprecated from 0.5.0 onward. You can use
selection()
instead, since sampling()
causes
namespace issues with other packages.Minor changes
jfaSampling
to
jfaSelection
. This should not have any consequences.Bug fixes
planning()
function that did not
allow the user to plan for a monetary sample when their population size
was too low.planning()
function that did not
allow the user to select a non-integer number of expected errors when
there was a prior involved.Minor changes
planning()
and evaluation()
functions against
benchmarks.New features
counts
in the
evaluation()
function that quantifies how many times each
observation should be evaluated due to being selected multiple times in
the selection stage.New features
default
,
impartial
, hypotheses
, sample
,
and factor
in the auditPrior()
function. In
addition to the already supported arm
method, these methods
allow the auditor to incorporate more sources of audit information into
the prior distribution.minPrecision
argument in the
planning()
function that allows auditors to calculate a
sample size so that the difference between the posterior upper
confidence bound and the most likely error is lower than the set minimum
precision. Also implemented in the evaluation()
function as
a requirement to approve the population.mle
from the evaluation()
function, which quantifies the most likely error. Also return the value
of the precision
from this function.increase
argument in the
planning()
function that allows the user to increase the
sample size with a set amount each step of the iterations.Minor changes
New features
jfa
package. The package provides
four functions: auditPrior()
, planning()
,
sampling()
, and evaluation()
.