Wald test
Models and regression · reference distribution: χ²(1) or N(0, 1)
When to use it
Test a coefficient of a model fitted by maximum likelihood using only the full model.
Null hypothesis
The coefficient is zero.
Assumptions
- Large sample
- May fail with perfect separation in logistic regression
Test statistic
W = \left(\dfrac{\hat{\beta}}{SE(\hat{\beta})}\right)^2Effect size
In logistic regression, the odds ratio of the coefficient.
OR = e^{\hat{\beta}}How to report it
b = 0.74, SE = 0.29, z = 2.55, p = .011, OR = 2.10
In R and Python
R
summary(glm(y ~ x, family = binomial, data = df))
Python
import statsmodels.formula.api as smf
smf.logit("y ~ x", data=df).fit().summary()
In Python, stats is scipy.stats and np is numpy.
Variants and alternatives
- Likelihood ratio, more reliable
Where it sits in the catalog
Models and regression. Tests run inside a fitted model: whether a coefficient matters, whether the model explains anything and whether the residuals meet the assumptions.
In the decision tree
- What do you want to do? Test a regression model
- What do you want to test? Whether an explanatory variable has an effect
- How was the model fitted? Maximum likelihood, such as logistic regression