| debit_map {scrutiny} | R Documentation |
Apply DEBIT to many cases
Description
Call debit_map() to use DEBIT on multiple combinations of
mean, standard deviation, and sample size of binary distributions. Mapping
function for debit().
For summary statistics, call audit() on the results.
Usage
debit_map(
data,
x = NULL,
sd = NULL,
n = NULL,
rounding = "up_or_down",
threshold = 5,
symmetric = FALSE,
show_rec = TRUE,
extra = Inf
)
Arguments
data |
Data frame. |
x, sd, n |
Optionally, specify these arguments as column names in |
rounding, threshold, symmetric |
Arguments passed on to |
show_rec |
If set to |
extra |
Not currently used. |
Value
A tibble with (at least) these columns –
-
x,sd,n: the inputs. -
consistency: DEBIT consistency ofx,sd, andn.By default, the tibble also includes the rounding method, boundary values, and information about the boundary values being inclusive or not. The tibble has the
scr_debit_mapclass, which is recognized by theaudit()generic.
Summaries with audit()
There is an S3 method for the
audit() generic, so you can call audit() following debit_map().
It returns a tibble with these columns —
-
incons_cases: the number of DEBIT-inconsistent cases. -
all_cases: the total number of cases. -
incons_rate: the rate of inconsistent cases. -
mean_x: the meanx(mean) value. -
mean_sd: the meansdvalue. -
distinct_n: the number of distinctnvalues.
References
Heathers, James A. J., and Brown, Nicholas J. L. 2019. DEBIT: A Simple Consistency Test For Binary Data. https://osf.io/5vb3u/.
Examples
# Call `debit_map()` on binary summary
# data such as these:
pigs3
# The `consistency` column shows
# whether the values to its left
# are DEBIT-consistent:
pigs3 %>%
debit_map()
# Get test summaries with `audit()`:
pigs3 %>%
debit_map() %>%
audit()