Sunday, June 30, 2024
HomeMultiple Linear RegressionHow to Calculate bo, b1, and b2 Coefficient Manually in Multiple Linear...

How to Calculate bo, b1, and b2 Coefficient Manually in Multiple Linear Regression

It is essential to understand the calculation of the estimated Coefficient of multiple linear regression. Completing these calculations requires an understanding of how to calculate using a mathematical equation formula. But for most people, the manual calculation method is quite difficult.

Based on these conditions, on this occasion, I will discuss and provide a tutorial on how to calculate multiple linear regression coefficients easily. This time, the case example that I will use is multiple linear regression with two independent variables.

In the example case that I will discuss, it consists of: (a) rice consumption as the dependent variable; (b) Income as the 1st independent variable; and (c) Population as the 2nd independent variable. Based on the variables mentioned above, I want to know how income and population influence rice consumption in 15 countries.

Rice consumption is measured with million tons, income with million per capita, and population with million people. Next, I compiled the specifications of the multiple linear regression model, which can be seen in the equation below:

The Formula of Regression Coefficient Calculation

In calculating the estimated Coefficient of multiple linear regression, we need to calculate b1 and b2 first. The bo (intercept) Coefficient can only be calculated if the coefficients b1 and b2 have been obtained.

I have read the econometrics book by Koutsoyiannis (1977). I chose to use a more straightforward and easier formula to calculate in the book.

But first, we need to calculate the difference between the actual data and the average value. This calculation is carried out for rice consumption (Y), income (X1), and population (X2) variables.

Calculating the actual data is reduced by the average value; I use lowercase to distinguish from actual data. The formula for calculating multiple linear regression coefficients refers to the book written by Koutsoyiannis, which can be seen in the image below:

Exercises for Calculating b0, b1, and b2

After we have compiled the specifications for the multiple linear regression model and know the calculation formula, we practice calculating the values of b0, b1, and b2. To make it easier to practice counting, I will give an example of the data I have input in excel with n totaling 15, as can be seen in the table below:

To facilitate calculations and avoid errors in calculating, I use excel. Next, based on the formula presented in the previous paragraph, we need to create additional columns in excel. The additional columns are adjusted to the components of the calculation formulas b0, b1, and b2.

Based on the formula for b0, b1, and b2, I have created nine additional columns in excel and two additional rows to fill in Sum and Average. You can check the formula as shown in the image below:

In the next step, we can start doing calculations with mathematical operations. We can easily calculate it using excel formulas.

The calculations of b0, b1, and b2 that I have calculated can be seen in the image below:

Furthermore, the results of calculations using the formula obtained the following values:

To crosscheck the calculations, I have done an analysis using SPSS with the estimated coefficients as follows:

Well, that’s the tutorial and discussion this time I convey to you. Hopefully, it will provide a deeper understanding for you. See you in the following article!

RELATED ARTICLES

4 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments