Hi,

I have an unbalanced panel dataset. I am looking to carry out Vector Autoregression (VAR) for each panel (i.e. for each country in the panel dataset). I would really appreciate if you can help me with the codes for this.

My data is in this format (the number of observations for each country is larger. The data below is only for demonstration):
date country VariableA VariableB
2002-03-31 00:00:00 Argentina 0.9836 0.611964
2002-06-30 00:00:00 Argentina 0.9836 0.611964
2002-03-31 00:00:00 Austria 0.000236 0.000371
2002-06-30 00:00:00 Austria 0.000303 0.0005
2002-09-30 00:00:00 Austria 0.0003 0.0005
2002-12-31 00:00:00 Austria 0.000279 0.0004
2003-03-31 00:00:00 Austria 0.000243 0.000445
2003-06-30 00:00:00 Austria 0.000253 0.00039
2003-09-30 00:00:00 Austria 0.000236 0.000355
2002-03-31 00:00:00 Belgium 0.000375
2002-06-30 00:00:00 Belgium 0.000183 0.000388
2002-09-30 00:00:00 Belgium 0.000213 0.000388
Thank you very much.


Best Regards,
RR