Grunfeld {AER} | R Documentation |
Panel data on 11 large US manufacturing firms over 20 years, for the years 1935–1954.
data("Grunfeld")
A data frame containing 20 annual observations on 3 variables for 11 firms.
"General Motors"
, "US Steel"
,
"General Electric"
, "Chrysler"
, "Atlantic Refining"
, "IBM"
,
"Union Oil"
, "Westinghouse"
, "Goodyear"
, "Diamond Match"
,
"American Steel"
.
This is a popular data set for teaching purposes. Unfortunately, there exist several
different versions (see Kleiber and Zeileis, 2008, for a detailed discussion).
In particular, the version provided with Greene (2003) has a couple of errors
for "US Steel"
(firm 2):
investment in 1940 is 261.6 (instead of the correct 361.6),
investment in 1952 is 645.2 (instead of the correct 645.5),
capital in 1946 is 132.6 (instead of the correct 232.6).
Here, we provide the original data from Grunfeld (1958). The data for the first 10 firms are identical to those of Baltagi (2002) or Baltagi (2005), now also used by Greene (2008).
The data are taken from Grunfeld (1958, Appendix, Tables 2–9 and 11–13).
Baltagi, B.H. (2002). Econometrics, 3rd ed., Berlin: Springer-Verlag.
Baltagi, B.H. (2005). Econometric Analysis of Panel Data, 3rd ed. Chichester, UK: John Wiley.
Kleiber, C., and Zeileis, A. (2008). “The Grunfeld Data at 50.” Report 82, Department of Statistics and Mathematics, Wirtschaftsuniversität Wien, Research Report Series. http://epub.wu-wien.ac.at/.
Greene, W.H. (2003). Econometric Analysis, 5th edition. Upper Saddle River, NJ: Prentice Hall.
Greene, W.H. (2008). Econometric Analysis, 6th edition. Upper Saddle River, NJ: Prentice Hall.
Grunfeld, Y. (1958). The Determinants of Corporate Investment. Unpublished Ph.D. Dissertation, University of Chicago.
data("Grunfeld", package = "AER") ## Greene (2003) ## subset of data with mistakes ggr <- subset(Grunfeld, firm %in% c("General Motors", "US Steel", "General Electric", "Chrysler", "Westinghouse")) ggr[c(26, 38), 1] <- c(261.6, 645.2) ggr[32, 3] <- 232.6 ## Tab. 14.2, col. "GM" fm_gm <- lm(invest ~ value + capital, data = ggr, subset = firm == "General Motors") mean(residuals(fm_gm)^2) ## Greene uses MLE ## Tab. 14.2, col. "Pooled" fm_pool <- lm(invest ~ value + capital, data = ggr) ## equivalently library("plm") pggr <- plm.data(ggr, c("firm", "year")) library("systemfit") fm_ols <- systemfit(invest ~ value + capital, data = pggr, method = "OLS") fm_pols <- systemfit(invest ~ value + capital, data = pggr, method = "OLS", pooled = TRUE) ## Tab. 14.1 fm_sur <- systemfit(invest ~ value + capital, data = pggr, method = "SUR", methodResidCov = "noDfCor") fm_psur <- systemfit(invest ~ value + capital, data = pggr, method = "SUR", pooled = TRUE, methodResidCov = "noDfCor", residCovWeighted = TRUE) ## Further examples: ## help("Greene2003") ## Panel models library("plm") pg <- plm.data(subset(Grunfeld, firm != "American Steel"), c("firm", "year")) fm_fe <- plm(invest ~ value + capital, model = "within", data = pg) summary(fm_fe) coeftest(fm_fe, vcov = vcovHC) fm_reswar <- plm(invest ~ value + capital, data = pg, model = "random", random.method = "swar") summary(fm_reswar) ## testing for random effects fm_ols <- plm(invest ~ value + capital, data = pg, model = "pooling") plmtest(fm_ols, type = "bp") plmtest(fm_ols, type = "honda") ## Random effects models fm_ream <- plm(invest ~ value + capital, data = pg, model = "random", random.method = "amemiya") fm_rewh <- plm(invest ~ value + capital, data = pg, model = "random", random.method = "walhus") fm_rener <- plm(invest ~ value + capital, data = pg, model = "random", random.method = "nerlove") ## Baltagi (2005), Tab. 2.1 rbind( "OLS(pooled)" = coef(fm_ols), "FE" = c(NA, coef(fm_fe)), "RE-SwAr" = coef(fm_reswar), "RE-Amemiya" = coef(fm_ream), "RE-WalHus" = coef(fm_rewh), "RE-Nerlove" = coef(fm_rener)) ## Hausman test phtest(fm_fe, fm_reswar) ## Further examples: ## help("Baltagi2002") ## help("Greene2003")