## ---------------------------------------------------------------------------- ## Maddala (1977) -> Boot and De Wit (1960) / Grunfeld and Griliches (1960) ## ## data ## availability: printed ## firms: General Motors, US Steel, General Electric, Chrysler, Atlantic Refining, ## IBM, Union Oil, Westinghouse, Goodyear, Diamond Match ## errors: invest_AR,1953 = 81.90 (Atlantic Refining) ## capital_US,1946 = 232.6 (US Steel) BUT apparently not used for calculations ## calls Atlantic Refining Atlantic Richfield ## ## analysis ## result: exact at precision given ## (exceptions: last printed digit for sigma^2 for GE and IBM, and for ## correlation between AR,GY) ## compares results to Grunfeld and Griliches (1960), obtaining a different ## R^2 for General Motors (for unknown reason in G&G) and Atlantic Refining ## (due to data error for invest_AR,1953) ## ---------------------------------------------------------------------------- ## preliminaries source("start.R") ## data pre-processing gr <- subset(Grunfeld, firm %in% c("General Motors", "US Steel", "General Electric", "Chrysler", "Atlantic Refining", "IBM", "Union Oil", "Westinghouse", "Goodyear", "Diamond Match")) gr$firm <- factor(gr$firm) gr$invest[19] <- 81.90 pgr <- plm.data(gr, c("firm", "year")) gr_macro <- aggregate(gr[,-4], list(gr$year), sum)[,-1] ## Micro and macro regressions (Table 10-5, p. 216) sf <- systemfit(invest ~ value + capital, method = "OLS", data = pgr) gsummary(sf) structure(sapply(sf$eq, function(x) dwtest(x)$statistic), .Names = sapply(sf$eq, function(x) x$eqnLabel)) ## alternatively: lm_GM <- lm(invest ~ value + capital, data = gr, subset = firm == "General Motors") lm_US <- lm(invest ~ value + capital, data = gr, subset = firm == "US Steel") lm_GE <- lm(invest ~ value + capital, data = gr, subset = firm == "General Electric") lm_CH <- lm(invest ~ value + capital, data = gr, subset = firm == "Chrysler") lm_AR <- lm(invest ~ value + capital, data = gr, subset = firm == "Atlantic Refining") lm_IBM<- lm(invest ~ value + capital, data = gr, subset = firm == "IBM") lm_UO <- lm(invest ~ value + capital, data = gr, subset = firm == "Union Oil") lm_WH <- lm(invest ~ value + capital, data = gr, subset = firm == "Westinghouse") lm_GY <- lm(invest ~ value + capital, data = gr, subset = firm == "Goodyear") lm_DM <- lm(invest ~ value + capital, data = gr, subset = firm == "Diamond Match") ## macro regression lm_macro <- lm(invest ~ value + capital, data = gr_macro) gsummary(lm_macro) ## Table 10-6, p. 217 round(summary(sf)$residCor, 2)