Handcoding a Panel Model
The most basic panel estimation is the Pooled OLS model, this model combines all data across indices and performs a regular Ordinary Least Squares Estimation. {% highlight r %} load the PLM library for panel estimation library(plm) load the Crime data set data(Crime) {% endhighlight %} {% highlight r %} define the model m1 <- formula(crmrte ~ prbarr + prbconv + polpc) create a panel data.frame (pdata.frame) object PanelCrime <- pdata.frame(Crime, index=c(“county”, “year”) )