Testing regression coefficients

To test whether a regression coefficient is significantly different from zero is easy since this test is part of the output from Excel’s Regression data analysis tool or Real Statistics’ Multiple Linear Regression data analysis tool. E.g. for Example 2 of Multiple Regression Analysis in Excel, we see from Figure 3 of Multiple Regression Analysis in Excel that the coefficient for Infant Mortality is significantly different from zero, while the coefficient for White is not.

Test whether a regression coefficient equals a constant

It is pretty easy to test whether a regression coefficient is significantly different from any constant. E.g. for the multiple linear equation y = b2x + b1z + b0 to test whether b2 is significantly different from -1, you need to rewrite the regression equation as y+x = (b2+1)x + b1z + b0. This equation can be represented as Y = B2x + b1z + b0, which is a multiple regression model where Y = y+x the coefficient B2 = b2+1.

Note that b2 = -1 when B2 = b2 – 1 = 0, and since we know how to test whether the B2 coefficient is significantly different from zero, we have a test for whether b2 is significantly different from -1.

Example 1: Determine whether the x coefficient is significantly different from -1 for the linear regression model y = b2x + b1z + b0 based on the data in range A2:C7 of Figure 1.

Testing a regression coefficient

Figure 1 – Testing if x coefficient is significantly different from -1

We see from the regression analysis that the x coefficient is -.93099 (cell F5). From the revised regression analysis, based on the data in range A9:C14, we see that the x coefficient is .069008 with p-value = .85, indicating that coefficient B2 is not significantly different from 0, and so b2 is not significantly different from -1.

Test whether the intercept equals a constant

To test whether the intercept is equal to a specific constant is even easier. E.g. to test whether the constant for Example 1 is equal to 40, transform the regression equation to the equation (y-40) = b2x + b1z + (b0-40), which takes the form Y = b2x + b1z + B0 and test for B0 = 0.

Test whether two coefficients are equal

You can use a slightly more complicated trick to test whether two regression coefficients are equal. To test whether b2 is significantly different from b1 in y = b2x + b1z + b0, you need to rewrite the regression equation as y = B2(x+z) + B1(x-z) + b0. Expanding the equation results in y = (B1+B2)x + (B2B1)z + b0, and so we see that b2 = B1+B2 and b1 = B2B1. Thus, B1 = (b2b1)/2, which means that B1 = 0 is equivalent to b1 = b2.

Example 2: Determine whether the x and z are significantly different for the linear regression model y = b2x + b1z + b0 based on the data in range A2:C7 of Figure 1.

Comparing two regression coefficients

Figure 2 – Testing the equivalence of two coefficients

We see from the revised regression analysis that the p-value of the x-z coefficient is .02 (cell I29), which is a significant result. This indicates that the x and z coefficients in the original regression equation are significantly different.

Examples Workbook

Click here to download the Excel workbook with the examples described on this webpage.

Reference

Wheeler, A. P. (2016) Testing the equality of two regression coefficients
https://andrewpwheeler.com/2016/10/19/testing-the-equality-of-two-regression-coefficients/

4 thoughts on “Testing regression coefficients”

  1. Thanks a lot ! This information helped! However, I’m not sure if I am right to apply the above formula to my means. In a regression with 4 IVs, I have b1, b2, b3, and b4. In b2 is slightly greater than b1 (.094 versus .086) and much greater than the coefficients of b3, and b4.

    The research question was stated in a way that IV2 influences the DV more effectively than the other three IVs.

    My question now goes into the direction of asking whether b2 is signficantly more effective, i.e. whether the coefficients are “not equal”. However, I am not sure how to handle the equation with 4 IVs instead of your example with 2.

    Do I simply leave out IV3 and IV4 and calculate only IV1+IV2 as well as IV1-IV2 and run a regression on these numbers or do I have to consider IV3 and IV4 somehow?

    Thanks a lot!!

    Best regards!

    Reply

Leave a Comment