Hi all,
I have a panel data and I want to run an instrumental variable regression on each individual. The code I am using is the following:
But I get the following error:
Shouldn't the "if person_id==7" solve the issue?
How can I solve this?
Alternatively, do you know a code that can do the trick, i.e. run an IV regression on each individual of a panel, with HAC s.e.?
Thank you!
I have a panel data and I want to run an instrumental variable regression on each individual. The code I am using is the following:
Code:
ivregress 2sls y (x = z) if person_id==7, vce(hac bartlett 12)
Code:
sample may not include multiple panels
How can I solve this?
Alternatively, do you know a code that can do the trick, i.e. run an IV regression on each individual of a panel, with HAC s.e.?
Thank you!
Comment