Say your data is at individual level, instrument and independent variable at city level, data on 2 years, t and t+1. If you want to include city and year fixed effects, city-year fixed effects, and cluster SE on city year, what should be the code. xi: ivreg would not let me do a GMM or specify MLE stuff like ivreg 2sls does. If I use xtivreg it does not allow me to cluster SE with fe option I guess, nor does it love my i.year*i.city sort of syntax.
I want to run either some sort of this command:
egen cityear=group(city year)
xtivreg y i.year i.city i.city*i.year w u v (x=z ), fe cluster(cityear)
or
ivregress 2sls y i.year i.city i.city*i.year w u v (x=z ), fe cluster(cityear)
Can someone please tell me the appropriate code?
and I have another issue, when my data is xtset at individual id-year xtivreg returns the following error:
the sample specifies cross-sectional data
xtivreg is not designed for cross-sectional data
use ivregress with cross-sectional data
Related Posts with Individual level data, Clustering Standard Error at city level, IV regression need syntax help
Percentage change using a baseHi, I have a panel with items and prices. I have one group of items that belongs to one geographical…
Is there any function to compute cosine similarity scoreI would like to compute cosine similarity score by using Term Frequency-Inverse Document Frequency (…
reshape help pleaseHello, I am looking to reshape the dataset below (i used dataex but the variable names are not matc…
Matching within strata with PSMatch2Hello, I am implementing the following routine found in psmath2 help file because I have few variab…
Is there a way (portable between operating environments) for accessing file attributes in Stata?Hello All. The following has been bugging me ((based on my extensive experience of creating webs pag…
Subscribe to:
Post Comments (Atom)
0 Response to Individual level data, Clustering Standard Error at city level, IV regression need syntax help
Post a Comment