View source: R/FINAL_FUNCTIONS_chi2_test.R
chi2_test_BFF | R Documentation |
chi2_test_BFF constructs BFFs based on the t test. BFFs depend on hyperparameters r and tau^2 which determine the shape and scale of the prior distributions which define the alternative hypotheses. By setting r > 1, we use higher-order moments for replicated studies. Fractional moments are set with r > 1 and r not an integer. All results are on the log scale.
chi2_test_BFF(
chi2_stat,
n,
df,
LRT = FALSE,
omega = NULL,
omega_sequence = if (is.null(omega)) seq(0.01, 1, by = 0.01),
r = 1
)
chi2_stat |
chi-square statistic |
n |
sample size (if one sample test) |
df |
degrees of freedom |
LRT |
should LRT be performed? Default is FALSE |
omega |
standardized effect size. For the chi^2-test, this is often called Cohen's w (can be a single entry or a vector of values) |
omega_sequence |
sequence of standardized effect sizes. If no omega is provided, omega_sequence is set to be seq(0.01, 1, by = 0.01) |
r |
variable controlling dispersion of non-local priors. Default is 1. r must be >= 1 |
Returns an S3 object of class 'BFF' (see 'BFF.object' for details).
chi2BFF = chi2_test_BFF(chi2_stat = 6.5, n = 10, df = 9)
chi2BFF
plot(chi2BFF)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.