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.

The number of predictors, not counting the intercept.

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
Mean square regression MSRFinds the mean square of regressionRequires the regression sum of squares SSR and the regression degrees of freedom k
Regression sum of squares SSRFinds the regression sum of squares behind a known MSRRequires MSR and the regression degrees of freedom k
Regression degrees of freedomFinds the number of predictors that links SSR to MSRRequires SSR and MSR
ANOVA from sums of squaresBuilds 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 dataBuilds the same table from raw valuesRequires the observed y values, the fitted values from the regression, in the same order, and k
MSR from F and MSEFinds MSR from a reported F statisticRequires 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 = SSR ÷ k [1]
MSRMean square of regression, in squared units of the response
SSRRegression sum of squares
kRegression 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

SSR = MSR × k

An MSR of 15 with two predictors means SSR = 15 × 2 = 30.

Regression degrees of freedom

k = SSR ÷ MSR

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

MSE = SSE ÷ (n − k − 1)
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

SSR = Σ(ŷ − ȳ)²
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

MSR = F × 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