Calculate MSR (mean square regression) by dividing SSR by its degrees of freedom, or get MSE, the F statistic and p-value from a full regression ANOVA.
- All Statistics Calculators
- Conditional Probability Calculator
- QC Range Calculator
- Trimmed Mean Calculator
Calculator Functions
| Function | What it does | What it requires |
|---|---|---|
| Mean square regression MSR | Finds the mean square of regression | Requires the regression sum of squares SSR and the regression degrees of freedom k |
| Regression sum of squares SSR | Finds the regression sum of squares behind a known MSR | Requires MSR and the regression degrees of freedom k |
| Regression degrees of freedom | Finds the number of predictors that links SSR to MSR | Requires SSR and MSR |
| ANOVA from sums of squares | Builds the regression ANOVA table: MSR, MSE, the F statistic, its p value, R² and adjusted R² | Requires SSR, the error sum of squares SSE, the sample size n and k |
| ANOVA from observed and fitted data | Builds the same table from raw values | Requires the observed y values, the fitted values from the regression, in the same order, and k |
| MSR from F and MSE | Finds MSR from a reported F statistic | Requires the F statistic and the mean square error MSE, with k and n optional |
k is the number of predictors, not counting the intercept. Results are rounded to 4 decimal places unless another setting from 2 to 8 is chosen.
MSR Formulas
| MSR | Mean square of regression, in squared units of the response |
| SSR | Regression sum of squares |
| k | Regression degrees of freedom, p − 1 for a model with p coefficients including the intercept [1] |
Mean square regression MSR
A regression with SSR = 30 and two predictors has MSR = 30 ÷ 2 = 15.
Regression sum of squares SSR
An MSR of 15 with two predictors means SSR = 15 × 2 = 30.
Regression degrees of freedom
An SSR of 30 and an MSR of 15 mean k = 2. The answer has to be a whole number, so a pair such as 30 and 14 is rejected.
ANOVA from sums of squares
F = MSR ÷ MSE [1]
In the regression ANOVA table the regression row has p − 1 degrees of freedom and the error row has n − p, and F is the ratio of the two mean squares [1]. With p = k + 1 the error degrees of freedom are n − k − 1. For SSR = 30, SSE = 20, n = 13 and k = 2, MSR is 15, MSE is 20 ÷ 10 = 2 and F is 7.5. The right-tail p value from the F distribution with 2 and 10 degrees of freedom is 0.0102. R² is 30 ÷ 50 = 0.6 and adjusted R² is 1 − 2 ÷ (50 ÷ 12) = 0.52.
ANOVA from observed and fitted data
SSE = Σ(y − ŷ)²
ŷ is a fitted value and ȳ is the mean of the observed values. For y = 2, 4, 5, 4, 5 with fitted values 2.8, 3.4, 4.0, 4.6, 5.2 and one predictor, SSR is 3.6 and SSE is 2.4, so MSR = 3.6, MSE = 2.4 ÷ 3 = 0.8, F = 4.5 and R² = 0.6. The fitted values must come from a least-squares fit with an intercept on the same data. Values whose residuals do not sum to zero, or are not uncorrelated with the fit, are rejected.
MSR from F and MSE
An F of 7.5 with an MSE of 2 means MSR = 15. Adding k = 2 also returns SSR = 30, and adding n as well returns the p value.
Limits of This Estimate
- MSR on its own is not a test. It is compared with MSE through the F statistic [1].
- The F statistic and its p value assume a least-squares model with an intercept and errors that are independent, normally distributed and of equal variance. The calculator cannot check those from summary numbers.
- With a perfect fit SSE is zero, F is unbounded and the p value is reported as its limiting value of 0. With no variation in y, R² and F are undefined.
Sources
- Penn State Eberly College of Science, STAT 501 Regression Methods, Lesson 6: MLR Model Evaluation: regression ANOVA table, degrees of freedom and the F statistic
