Purpose of this post is to explain Frisch-Waught in a very simple form as many a times students in econometric classes are used to memorize the concept \(y=\beta_0x+\beta_1x_1+\beta_2x_2+\epsilon\) Using the data set Growth described (description is provided in previous video), excluding the data for Malta, run the following five regressions: Growth on
(1) TradeShare and YearsSchool;
library(readxl)
library(dplyr)
library(moderndive)
library(gridExtra)
library(ggplot2)
library(stargazer)
Growth <- read_excel("C:/Users/hp/Dropbox/Applied Economics/Growth.xlsx")
glimpse(Growth)
## Observations: 65
## Variables: 7
## $ country_name <chr> "India", "Argentina", "Japan", "Brazil", "United Stat...
## $ growth <dbl> 1.9151680, 0.6176451, 4.3047590, 2.9300970, 1.7122650...
## $ rgdp60 <dbl> 765.9998, 4462.0010, 2954.0000, 1784.0000, 9895.0040,...
## $ tradeshare <dbl> 0.1405020, 0.1566230, 0.1577032, 0.1604051, 0.1608150...
## $ yearsschool <dbl> 1.45, 4.99, 6.71, 2.89, 8.66, 0.79, 3.80, 2.97, 3.02,...
## $ rev_coups <dbl> 0.1333333, 0.9333333, 0.0000000, 0.1000000, 0.0000000...
## $ assasinations <dbl> 0.8666667, 1.9333330, 0.2000000, 0.1000000, 0.4333333...
growth_malta<-Growth %>% filter(country_name!="Malta")
mod.lm1<-lm(growth~tradeshare+yearsschool,data = growth_malta)
#mod.lm2<-lm(growth~yearsschool,data = growth_malta)
#mod.lm3<-lm(tradeshare~yearsschool,data = growth_malta)
#gr_yrs<-mod.lm2$residuals
#trsh_yrs<-mod.lm3$residuals
#mod.lm4<-lm(gr_yrs~trsh_yrs)
#get_regression_table(mod.lm1)
#get_regression_table(mod.lm4)
#stargazer(mod.lm1,mod.lm4,type = "text")
Using the data set Growth described (description is provided in class notes), excluding the data for Malta, run the following five regressions: Growth on
(1) TradeShare and YearsSchool; (2) TradeShare and ln(YearsSchool); (3) TradeShare, ln(YearsSchool), Rev_Coups, Assassinations and ln(RGDP60); (4) TradeShare, ln(YearsSchool), Rev_Coups, Assassinations, ln(RGDP60), and TradeShare*Yearsschool; and
mod.lm1<-lm(growth~tradeshare+yearsschool,data = growth_malta)## Part_a
growth_malta<-growth_malta %>% mutate(lnYearSch=log(yearsschool),lnrgdp60=log(rgdp60))
mod.lm2<-lm(growth~tradeshare+lnYearSch,growth_malta) ##Part_b
mod.lm3<-lm(growth~tradeshare+lnYearSch+rev_coups+assasinations+lnrgdp60,data = growth_malta)
mod.lm4<-lm(growth~tradeshare+lnYearSch+rev_coups+assasinations+lnrgdp60+tradeshare*yearsschool,data = growth_malta)
stargazer(mod.lm1,mod.lm2,mod.lm3,mod.lm4,type = "text")
##
## ===============================================================================================================
## Dependent variable:
## ----------------------------------------------------------------------------------------
## growth
## (1) (2) (3) (4)
## ---------------------------------------------------------------------------------------------------------------
## tradeshare 1.898** 1.749** 1.104 1.640
## (0.936) (0.860) (0.833) (1.550)
##
## yearsschool 0.243*** -0.144
## (0.084) (0.248)
##
## tradeshare:yearsschool -0.201
## (0.329)
##
## lnYearSch 1.016*** 2.161*** 2.626***
## (0.223) (0.363) (0.495)
##
## rev_coups -2.300** -2.297**
## (1.004) (1.003)
##
## assasinations 0.228 0.061
## (0.434) (0.451)
##
## lnrgdp60 -1.621*** -1.406***
## (0.399) (0.433)
##
## Constant -0.122 -0.186 11.746*** 10.330***
## (0.663) (0.564) (2.920) (3.068)
##
## ---------------------------------------------------------------------------------------------------------------
## Observations 64 64 64 64
## R2 0.161 0.287 0.453 0.474
## Adjusted R2 0.133 0.264 0.406 0.408
## Residual Std. Error 1.691 (df = 61) 1.558 (df = 61) 1.400 (df = 58) 1.397 (df = 56)
## F Statistic 5.836*** (df = 2; 61) 12.287*** (df = 2; 61) 9.613*** (df = 5; 58) 7.208*** (df = 7; 56)
## ===============================================================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01