Hello,
I have a dataset of firms investments in different states: e.g. Firm A invests $1million in Nevada, which is identified by an unique number (a firm may have multiple investments in different states)
I need to create 0million observations for each neighboring state for each investment.
I have: a unique identifier for the investment, a list of neighboring states (in Excel) for each state
How do I expand my dataset such that for each investment I have the original observation plus n additional rows (one for each of the neighboring states) with the same investment id but with $0 for the added observations and the name of each neighboring state.
I am not sure how to organize my neighboring state data for Stata and how to go about creating such a database.
Any tips will be greatly appreciated!
Related Posts with Create observations for neighboring states
Post-hoc multiple comparison test with adjustment after Friedman's testHi all, Does anyone know if STATA has any post-hoc test available after Friedman's test, to get the…
Ordered Probit and EndogeneityHi all, I've tried to read through the forum to see if there were any similar posts, so I apologise …
Stata CodeHey Stata Community, I'm looking for a way to generate a variable depending on the "4 last letters…
Importing data conditional on somethingHi everyone! I am facing the following problem: I want to import an excel that is created by anothe…
clttest gives me different results every time I run itHi, I am running something like clttest truth, cluster(userid) by(envyfree) and every time I run t…
Subscribe to:
Post Comments (Atom)
0 Response to Create observations for neighboring states
Post a Comment