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 data.

rounding, threshold, symmetric

Arguments passed on to debit(), with the same defaults.

show_rec

If set to FALSE, the resulting tibble only includes the columns x, sd, n, and consistency. Default is TRUE.

extra

Not currently used.

Value

A tibble with (at least) these columns –

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 —

  1. incons_cases: the number of DEBIT-inconsistent cases.

  2. all_cases: the total number of cases.

  3. incons_rate: the rate of inconsistent cases.

  4. mean_x: the mean x (mean) value.

  5. mean_sd: the mean sd value.

  6. distinct_n: the number of distinct n values.

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()

[Package scrutiny version 0.4.0 Index]