how to declare lagged variables as instrumental variables in unbalanced panel data in MatLab?
7 views (last 30 days)
Show older comments
Dear All,
this is the example of panel dataset:

I would like to use the lagged once of 'Var' as the instrument for 'Var' itself. For instance,

or we say, in the regressin model, Var_i(t-1) is the instrument for Var_it. Since the observation for Panel one at year 1999 does not have lagged observation so in the instrument matrix, this will be a missing value. Therefore, I replace the missing with zeros. Anyone knows how to express or declare this sort of laggs of variables within each panel in the panel dataset? By the way, is there any panel data processing tutorials in MatLab?
Best wishes Zhixiao
simply speaking, 'Var' is the name of the variable in the third column. There are three panels here: firm1 firm2 firm3 (ID). Also, each firm has different number of observations, for example, firm1 exist from 1999 to 2001. And the corresponding value of variable 'Var' at year 1999 for the firm1 is 22. Then, I want to take lags of variable 'Var' within each panel(for firm1 firm2 firm3). Of course, in the dataset, I have many many firms, this is just an example. I would like to concentrate on the third column, but the variable in the third column is actually classified according to the first (firm indicator) and second (year indicator) columns. Hope this time I have clarified my questions :)
2 Comments
Image Analyst
on 11 Dec 2014
I don't understand. What is Var_i, and Var_it? And what is a "lagged observation" and a "lagged once"? Is a "lagged observation" the "Instruments", in other words, it's column 3? What do you want as the output for these two input arrays?
Answers (0)
See Also
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!