Skip to content

Sample size: each design names the model the course fits - #48

Merged
PeterSlijkhuis merged 1 commit into
mainfrom
power-models
Sep 30, 2026
Merged

PeterSlijkhuis merged 1 commit into
mainfrom
power-models

Conversation

@PeterSlijkhuis

Copy link
Copy Markdown
Owner

Before: the design list on the sample size page named classic tests (t-test, ANOVA, chi-square), while the course teaches each of them as a linear model.

After: each option shows the R model the course fits, such as lm(outcome ~ group), lmer(outcome ~ time + (1 | person)) or glm(yes_no ~ group, family = binomial). The result adds a short "The model you will fit" section that says which test in that model the plan is for, with the lesson that shows it.

How: new model and modelNote fields on each design. I checked two claims in R: lm(y - 50 ~ 1) gives the one-sample t-test's p-value, and at the sample size from the two-proportion test the logistic Wald test has 78 to 80% power instead of 80%.


Generated by Claude Code

@PeterSlijkhuis
PeterSlijkhuis merged commit 21a897c into main Sep 30, 2026
4 checks passed
@PeterSlijkhuis
PeterSlijkhuis deleted the power-models branch October 1, 2026 07:17

This branch was successfully deployed

1 active deployment
github-pages — 21a897cb Deployed Sep 30, 2026 by PeterSlijkhuis via deploy #126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant