debit_map | R Documentation |
Call debit_map()
to use DEBIT on multiple combinations of
mean, sample standard deviation, and sample size of binary distributions.
Mapping function for debit()
.
For summary statistics, call audit()
on the results.
debit_map(
data,
x = NULL,
sd = NULL,
n = NULL,
rounding = "up_or_down",
threshold = 5,
symmetric = FALSE,
show_rec = TRUE,
extra = Inf
)
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. |
A tibble with (at least) these columns –
x
, sd
, n
: the inputs.
consistency
: DEBIT consistency of x
, sd
, and n
.
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_map
class, which is recognized by the audit()
generic.
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 mean x
(mean) value.
mean_sd
: the mean sd
value.
distinct_n
: the number of distinct n
values.
Heathers, James A. J., and Brown, Nicholas J. L. 2019. DEBIT: A Simple Consistency Test For Binary Data. https://osf.io/5vb3u/.
# 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.