# Analysis of variance to linear regression

In the article discussing 1-way analysis of variance (ANOVA), we compared the forces generated by 3 orthodontic wires. I used a sample of about 10 wires per group and measured the forces generated on a testing machine. Then I used 1-way ANOVA to assess whether there is a difference on average in the forces generated among any of the 3 wires.

Table I shows the ANOVA output and has been already interpreted in detail in the previous article.

Table I
One-way ANOVA output for the effect of wire type on forces generated
Source SS df MS F P value
Between groups 0.43 2 0.22 7.40 0.003
Within groups 0.76 26 0.03
Total 1.19 0.4

SS , Sum of squares; df , degrees of freedom; MS , mean square.

Briefly, the output indicates that there is a significant difference ( P = 0.003) in the forces generated between at least 2 wires.

Table II uses the same data set and variables to explore the same research question with a simple linear regression model instead of 1-way ANOVA. The findings are the same, but also the regression model includes estimates and confidence intervals that are always of interest.

Table II
Linear regression output for the effect of wire type on forces generated
Wire type β -coefficient 95% CI P value
Constant 0.96 0.85, 1.07
Wire_2 0.29 0.12, 0.46 0.001
Wire_3 0.22 0.07, 0.38 0.006

The interpretation of the regression model in Table II is similar to the previously discussed regression model. To clarify, please note that under the β-coefficient column, there are 2 values (wire_2 and wire_3) and the constant. The P values shown in the regression output are from the Wald test and correspond to the difference of each wire level to the baseline of the variable (wire_1). In Table I , the P value indicates the overall effect of wire type on the forces generated. The ANOVA P value indicates that the type of wire is a significant predictor of the forces generated; however, it does not tell us for which wires the forces generated differ significantly from each other. In the regression output, wire 1 is the reference category, and the coefficient values for wires 2 and 3 indicate the difference in forces generated between those wires and wire 1. Therefore, the force generated by wire 2 is 0.29 units higher than that of wire 1, and the force generated by wire 3 is 0.22 units higher than that of wire 1. The constant indicates the force generated by wire 1 (baseline or reference), and we can use this formula:

force = _cons + 0 . 29 *wire 2 + 0 . 22 *wire 3