# Panel Estimation

(This article was first published on BMS Add-ons » BMS Blog, and kindly contributed to R-bloggers)

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)
head(panelDat)
```

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.

To leave a comment for the author, please follow the link and comment on their blog: BMS Add-ons » BMS Blog.

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

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags:

Comments are closed.

## Sponsors

Contact us if you wish to help support R-bloggers, and place your banner here.

# Never miss an update! Subscribe to R-bloggers to receive e-mails with the latest R posts.(You will not see this message again.)

Click here to close (This popup will not appear again)