Panel data with binary dependent variable in R

Abiel picture Abiel · May 10, 2010 · Viewed 8.3k times · Source

Is it possible to do regressions in R using a panel data set with a binary dependent variable? I am familiar with using glm for logit and probit and plm for panel data, but am not sure how to combine the two. Are there any existing code examples?

EDIT

It would also be helpful if I could figure out how to extract the matrix that plm() is using when it does a regression. For instance, you could use plm to do fixed effects, or you could create a matrix with the appropriate dummy variables and then run that through glm(). In a case like this, however, it is annoying to generate the dummies yourself and it would be easier to have plm do it for you.

Answer

Fan Wang picture Fan Wang · Jan 21, 2014

The package "pglm" might be what you need.

http://cran.r-project.org/web/packages/pglm/pglm.pdf

This package offers some functions of glm-like models for panel data.