Multiple-Linear-Regression-of-MacroEconomics-Data2

I try to find out the correlation between Economic growth of Germany towards some independent variables such as Trade Balance, FDI (Bil USD), and Tariff rates(%) data from 1988-2018. Using numpy, pandas, seaborn and matplotlib, the correlation could be presented and visualized comprehensively through tables and graphs.

  1. Download the data from the website and arrange into 1 file

www.macrotrends.net

dataMacroecon.xlsx

  1. Extracting into data panda frames

testimage1

3.Drop the date

testimage1

  1. Define X and Y variables through this line of code

Testimage1

  1. Run this code to get the result of OLS. We can see that only variable Tariff rates that is statistically significant. The R squared presents strong correlation by 70,4%. lm_multi = sn.OLS(y_multi, X_multi_cons).fit() lm_multi.summary()

Testimage1

  1. Visualize the graph in 3D graph

Testimage1 Testimage1