How to estimate vector autoregression & impulse response function with panel data I am working on vector auto-regression (VARs) and impulse response function (IRFs) estimation based on panel data with 33 individuals over 77 quarters.  How should this type of situation be analyzed?  What algorithm's exist for this purpose?  I would prefer to conduct these analyses in R, so if anyone is familiar with R code or a package designed for this purpose that they could suggest, that would be especially helpful.  
 A: Common panel data vector autoregression models include the Arellano-Bond estimator (commonly referred to as "difference" GMM), the Blundell-Bond estimator (commonly referred to as "system" GMM) and the Arellano-Bover estimator. All use GMM, and begin with a model:
$$y_{it}=\sum_{l=1}^p\rho_ly_{i,t-l}+x_{i,t}'\beta+\alpha_i+\epsilon_{it}
$$
Arellano and Bond takes the first difference of $y_{i,t}$ to remove the fixed effect, $\alpha_i$ and then uses lagged levels as instruments:
$$ E[\Delta \epsilon_{it}y_{i,t-2}]=0$$
This is basically the same as the procedure detailed in this Holtz-Eakin Newey Rosen article, which also provides some instructions for implementation.
Blundell and Bond use lagged first differences as instruments for levels:
$$ E[\epsilon_{it}\Delta y_{i,t-1}]=0$$
The name "system" GMM usually means a mix of these instruments with those from Arellano Bond.
Arellano and Bover use the system GMM and also explore forward demeaning of variables, which to my knowledge is not directly implemented for R, but you can check out their paper for details.
In R, both Arellano-Bond and Blundell-Bond are implemented in the plm package, under the command pgmm. The documentation I've linked to provides instructions and examples for exactly how to implement them.
A: You can use a system of seemingly unrelated regression equations (using the package systemfit) after you convert the dataset with pdata.frame (plm package). You need to derive the impulse response functions by yourself. If you follow Hamilton's or Greene's textbook, it should not be too complicated.
A: I just found this paper "Panel Vector Autoregression in R: The Panelvar Package" (2017) by Michael Sigmund, Robert Ferstl and Daniel Unterkofler, which basically is a description of the methods implemented in R.
https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2896087
Additionally, there's another question here:
Panel vector autoregression models in R?
The authors are now in the process of publishing the code on CRAN, but already provide binary packages on researchgate. 
https://www.researchgate.net/project/Panel-Vector-Autoregression-Models-with-different-GMM-estimators
The binary panelvar package can be downloaded directly, I think sources should be available on CRAN in the near future.
https://www.researchgate.net/publication/322526372_panelvar_044
A: https://www.researchgate.net/publication/312165764_Panel_Vector_Autoregression_in_R_The_panelvar_Package
Here you will find the R-package and the link to the paper.
A: I would suggest using the {vars} library in R. It has a function for estimating a VAR-model and for estimating an impulse response function from this model and for investigating Granger causality etc.
I suggest you look into the following functions:
> VARselect()
> VAR()
> irf()
> causality()

A: Hi @Roman and every one else. I am also in panel VAR models and in my search, I came across this stata-based user-written commands pvar and xtvar. I have used pvar already and it seems quite okay. You can read more about it here, and a step-by-step application
