Description Usage Arguments Details Value Examples
During Haldane zero-correction a value close to 0 is added to all cells (https://www.oxfordreference.com/view/10.1093/acref/9780199976720.001.0001/acref-9780199976720-e-1977). Most common is 0.5. This value eliminates the first order bias term.
1 2 3 4 5 6 7 8 9 10 | calculate_odds_ratio_parallel(
y_rep = NULL,
y = NULL,
zero_correction = "none",
ci_method = "Woolf",
ci_width = 0.89,
nsim_ci = 1e+07,
nsim_median = 1e+05,
cores = 4
)
|
y_rep |
(pers) x (item) x (rep) array; replicated data (can handle response data as dataframe or lists of dataframes as well) |
y |
(pers) x (item) dataframe; response data |
zero_correction |
character; 'none', 'Haldane', or 'Bayes' |
ci_method |
character; 'Woolf', 'unconditional', 'compromise', 'BayesEqTails' or 'BayesHDI' |
ci_width |
double |
nsim_ci |
integer; number of draws used to get a distribution of the odds ratio value to calculate CIs |
nsim_median |
integer; number of draws used to get a distribution of the odds ratio value to calculate the median |
cores |
int; number of CPU cores used for parallel processing |
Bayesian functions not checked for correct implementation with parallel function
tibble
1 2 3 4 5 6 7 8 | tibble::tribble(
~x, ~y,
0, 1,
1, 0,
1, 1,
0, 0,
1, 0
) %>% calculate_odds_ratio() # equals 0.5
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.