Packages:
library(ggstats)
library(likert)
library(ggplot2)
library(patchwork)The main plot - uses the ggstats package and the Likert_CFB_formed dataset.
library(dplyr)
library(ggplot2)
library(ggh4x)
library(geomtextpath)
set.seed(12345)
N <- 150
data <- data.frame(response = c(rnorm(N, mean = 1, sd = 1),You probably heard about the Anscombe's quartet. It's almost a textbook justification for looking at the data first and not trusting solely descriptive statistics!
I decided to make my own, Olszewski's quartet! It shows 4 faces in different moods. The mean and variance of the Y coordinate is exactly (NOT approximately!) the same for all 4 faces. Also, the Pearson's correlation is almost 0.
Despite the widespread and nonsensical claim, that "logistic regression is not a regression", it constitutes one of the key regression and hypothesis testing tools used in the experimental research (like clinical trials).
Let me show you how the logistic regression (with a few extensions) can be used to test hypotheses about fractions (%) of successes, repacling the classic "test for proportions". Namely, it can replicate the results of:
prop.test() does in R)| Despite a common claim that Mann-Whitney (Wilcoxon), Kruskal-Wallis, Fligner-Poicello and other rank-based tests compare medians, | |
| **this is a widespread misconception when considered in general**, i.e. unless strong IID condition is met, resulting in the location-shift case, consistent with the proportional-odds model. | |
| This misconception has been spread so widely, so many textbooks, free and paid courses, even academic lecturers repeat it. | |
| This is by-definition (by construction) a test of stochastic equivalence vs superiority, i.e. whether P(B>A) + 0.5*P(B=A) = 0.5. | |
| Such superiority may occur for a difference in any properties of the compared samples: | |
| - **locations** (means, medians, Hodges-Lehman 2-sample pseudo-median and other measures), | |
| - **dispersions** (variances, general scale parameter, range), | |
| - **shapes** (skewness, kurtosis) |