calculateCIs | R Documentation |
This function calculates confidence intervals for correlation coefficients using different methods.
calculateCIs(
tbl,
rho_var,
se_var,
doubleentered = FALSE,
method = "raykov",
adjust_base = 1,
design_effect_m = NULL,
design_effect_rho = NULL,
design_effect_m_col = NULL,
design_effect_rho_col = NULL,
conf_level = 0.95
)
tbl |
A data frame or tibble containing the correlation coefficient and standard error variables. |
rho_var |
The name of the column in |
se_var |
The name of the column in |
doubleentered |
Logical. If |
method |
The method to use for calculating the confidence intervals. Options are "raykov", "fisherz", "doubleenteredconserv", or "doubleentered". |
adjust_base |
A numeric value to adjust the standard errors. Default is 1. |
design_effect_m |
A numeric value for the design effect related to the mean. Default is |
design_effect_rho |
A numeric value for the design effect related to the correlation. Default is |
design_effect_m_col |
A character string specifying the column name for the design effect related to the mean. Default is |
design_effect_rho_col |
A character string specifying the column name for the design effect related to the correlation. Default is |
conf_level |
The confidence level for the intervals. Default is 0.95. |
A modified version of tbl
with additional columns for the confidence intervals and related statistics.
Everything uses adjusted standard errors, including confidence intervals, z-tests, and p-values.
tbl <- data.frame(rho = c(0.5, 0.7, 0.3), se = c(0.1, 0.2, 0.05))
calculateCIs(tbl, rho_var = "rho", se_var = "se", method = "raykov")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.