[[https://stats.libretexts.org/Bookshelves/Introductory_Statistics/OpenIntro_Statistics_(Diez_et_al)./06%3A_Inference_for_Categorical_Data | Inference for Categorical Variables]] ===== General Tips ===== * if you can, pick a continuous outcome over a binary outcome * Why? For a binary outcome, you'll need a much larger sample size. Continuous outcomes also allow more precision. * logistic regressions stink! logistic regression = linear model for the log-odds of the outcome === analyzing relationship between categorical outcome and a continuous covariate === ===effect modification vs confounding=== if we don't take effect modification into account, we get an over-generalized estimate of the relationship between the outcome and the exposure for the entire co-hort * Breslow-Day Test examines if evidence of a differential association between two variables across the level of a third variable * similar limitations to Cochran-Mantel-Haenszel test ==== Cochran-Mantel_haenszel test ==== * limitations * can only adjust for one variable at a time looks at two binary categorical variables while adjusting for the value of a third categorical variable ==== Parametric One-Sample Inference of Categorical Variables==== * one-sample proportion test * do NOT use Yate's continuity, so specify: * prop.test(..., correct = FALSE) * $\Chi^2$ goodness of fit test * to ensure sufficient sample size: $n \cdotp_{0} > 5$ * don't use continunity corrections! * chisq.test(..., correct = FALSE) **NOTE**: //one-sample single proportion test// gives a 95% CI -- $\Chi^2$ does not! ==== Types of Probabilites === [[https://sites.nicholas.duke.edu/statsreview/jmc/ | Joint, Marginal and Conditional Probabilities]] * QI * [[https://www.squire-statement.org/index.cfm?fuseaction=page.viewPage&pageID=471&nodeID=1 | SQUIRE 2.0 for QI Reporting]] * Stepped-wedge trial * [[https://en.wikipedia.org/wiki/Stepped-wedge_trial | Link]] * Linear regression * [[https://en.wikipedia.org/wiki/Q%E2%80%93Q_plot | Q-Q plot]] * plot of residuals * [[https://en.wikipedia.org/wiki/Cook's_distance | Cook's Distance]] * these are different! * correlative * descriptive * predictive * associative * confounding vs. effect modification __to assess a paired difference__ * create histogram * plot as box plot * make [[https://en.wikipedia.org/wiki/Q%E2%80%93Q_plot | Q-Q plot]]