# Panel Estimation

This tutorial should illustrate how to use bms with panel data. For the purpose of illustration we will use the data put forward in Moral-Benito (2011) and made publicly available at .

The data contains 35 variables (including the dependent variable, the growth rate of per capita GDP) for 73 countries and for the period 1960-2000. The dependent variable, GDP growth, is calculated for five year averages resulting into eight observations per country. Moral-Benito (2011) argues in favor of calculating averages of flow variables, while stock variables have been measured at the first year of each five-yer period. The data can be downloaded here paneldat.rda.

After havin started R and loaded the BMS library we can have a closer look at the data:
library(BMS)

The rownames of the data are a combination of the country code and the year of the observation. To estimate a country fixed effects panel we can make use of the Frisch-Waugh-Lovell Theorem and demean the data accordingly. That is, in the case of country fixed effecst, subtract from each observation (dependent and independent variable) the within country mean. For the case of time fixed effects, subtract from each observation the mean across countries per time period. We will start with the country fixed effecst first.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...