View source: R/debit-explain.R
| debit_explain | R Documentation |
debit_explain() tests a single mean and SD of binary data
like debit() does, but also lays out the calculation in plain words:
which numbers of ones the mean allows, and whether the SD of any of them
would be reported as the given one.
The text is built from the numbers that decide the test itself, so it
always agrees with debit().
debit_explain(
x,
sd,
n,
digits_x,
digits_sd,
data_type,
sd_meaning = c("sd_sample", "sd_pop", "sd_sample_or_pop", "se"),
formula = c("exact", "mean_n"),
rounding = "up_or_down",
threshold = 5,
symmetric = FALSE
)
x |
Numeric. The reported mean of the binary data, between 0 and 1. |
sd |
Numeric. The reported standard deviation, between 0 and 1. |
n |
Integer. The reported sample size. |
digits_x, digits_sd |
Integer. The number of decimal places in |
data_type |
String. As in |
sd_meaning |
String. What |
formula |
String. Only |
rounding |
String. The rounding method assumed to have produced |
threshold, symmetric |
The same as in |
An object of class scrutiny_explain: a list with the result as
consistency (TRUE, FALSE, or NA), the explanation's paragraphs,
and the test and its inputs. It prints as the explanation.
debit_explain(
x = 0.36,
sd = 0.11,
n = 20,
digits_x = 2,
digits_sd = 2,
data_type = "integer"
)
debit_explain(
x = 0.35,
sd = 0.49,
n = 20,
digits_x = 2,
digits_sd = 2,
data_type = "integer"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.