--- title: "Effect sizes and association measures" output: rmarkdown::html_vignette: toc: true vignette: > %\VignetteIndexEntry{Effect sizes and association measures} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = requireNamespace("morie", quietly = TRUE) ) ``` # Overview Effect sizes complement p-values: they answer "how big is the effect?" rather than "is there an effect at all?". MORIE exposes the standard families used in carceral, public-health, and sociolegal research. # Cohen's d (continuous, two-group) ```{r cohens-d} library(morie) set.seed(7) group_a <- rnorm(60, mean = 0.0) group_b <- rnorm(60, mean = 0.6) d <- morie_cohens_d(group_a, group_b) d ``` Cohen's d expresses the difference between two means in pooled standard-deviation units. Conventional benchmarks: 0.2 small, 0.5 medium, 0.8 large. # Cramer's V (categorical association) ```{r cramers-v} tab <- matrix(c(20, 10, 30, 15, 25, 35), nrow = 2, byrow = TRUE) v <- morie_cramers_v(tab) v ``` Cramer's V scales the chi-square statistic to a 0--1 association measure for contingency tables. It is particularly useful for the provincial-vs-federal Mandela-rate cross-comparisons in MRM. # Omega-squared (one-way ANOVA) Omega-squared is a less-biased effect-size estimator than eta-squared for a one-way ANOVA design. ```{r omega-squared} morie_omega_squared(f_stat = 5.2, df_between = 2, df_within = 87, n = 90) ``` # Proportion confidence intervals For a binomial proportion, MORIE exposes Wilson, Clopper--Pearson exact, and Wald CIs. Wilson is the default and is what we recommend in published papers (it has better small-sample coverage than Wald). ```{r proportion-ci} morie_proportion_ci(35, 100) # Wilson, 95% CI morie_proportion_ci(35, 100, method = "exact") # Clopper-Pearson morie_proportion_ci(35, 100, method = "wald") # Wald ``` # E-value (sensitivity analysis) ```{r e-value, eval = exists("morie_e_value")} morie_e_value(rr = 2.0) ``` The E-value is the minimum strength of association that an unmeasured confounder would need on both treatment and outcome to fully explain away an observed risk ratio. # Where to go next - For survey-weighted versions of `morie_cohens_d` and `morie_cramers_v`, see the `survey-weighted` vignette. - For full causal-inference workflows that include ATE / ATT / ATC effect sizes with CIs, see the `causal-inference` vignette.