Minsu Chang and Francis J. DiTraglia: "A Generalized Focused Information Criterion for GMM," Journal of Applied Econometrics, Vol. 33, No. 3, 2018, pp. 378-397. Description ----------- This archive contains five subdirectories containing code and data to replicate the results of the paper: (1) Table1 - code to replicate the simulation results in Table 1 from Section 6.1 of the paper. (2) Table2 - code to replicate the simulation results in Table 2 from Section 6.2 of the paper. (3) Table3 - code to replicate the empirical example in Table 3 from Section 7 of the paper. (4) OnlineAppendixB1 - code to replicate the supplementary simulation results from Section B1 of the online-only appendix. (5) OnlineAppendixB2 - code to replicate the supplementary simulation results from Section B2 of the online-only appendix. Replication Instructions ------------------------ To replicate a given set of results, navigate to the desired directory, e.g. "Table1," create an empty subdirectory called "results," and then run the script "RUN_ME.R". Required Software and Packages ------------------------------ Code for the simulations and empirical example are written in a mixture of R and C++ and use the package Rcpp as an interface to call C++ from R. A full list of the packages needed to replicate our results is as follows: * MASS * Matrix * Rcpp * RcppArmadillo * parallel * ggplot * RColorBrewer * tikzDevice * plm Note that plm is used only to load the data for our empirical example (see below for details) and ggplot, RcolorBrewer and tikzDevice are used only to generate the Figures (B1-B10) that appear in the online-only appendix. The package parallel is used only to generate the Random versus Fixed Effects results from the online-only appendix (Figures B1 and B2). For more information, see the comments beginning in line 15 of "simulations/REvsFE/RUN_ME.R" Data Description for the Empirical Example ------------------------------------------ Our empirical example uses the dataset of Baltagi and Levin (1992) and Griffin and Xiong (2000), as provided by the "plm" package in R. The dataset is a panel of 1309 observations for 46 U.S. states over the period 1963-1992 containing the following variables: * (1) state = State abbreviation. * (2) year = Year. * (3) price = Price per pack of cigarettes. * (4) pop = Population. * (5) pop16 = Population above the age of 16. * (6) cpi = Consumer price index with (1983=100). * (7) ndi = Per capita disposable income. * (8) sales = Cigarette sales in packs per capita. * (9) pimin = Minimum price in adjoining states per pack of cigarettes. Code to replicate the empirical example is contained in the directory "Table3." Our code loads the dataset directly from the "plm" package but we include a copy of the dataset in the file "Cigar.csv" located in the directory "Table3." To replicate the empirical example, navigate to the appropriate directory and run the script "RUN_ME.R"