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
How to drop the duplicates with the fewest missing values?I have duplicates that share values, but some are missing. I would like to keep the observation of e…
command window (display actual commands not temp commands)Hi there When I run commands from a do file, the command window displays the commands a "temp" comma…
view underlying numeric value of dateHi there Just wondering if there is a quick way to view the underlying numeric value of a date in a …
Creating a new variable by count of specific disease IC9 code across multiple diagnosisHello, I am working on a dataset with almost 450,000 cases with several columns of diagnostic codes…
Keep specific rows in a variableHello, I have a dataset with two variables: time and title. Title refers to some headline news -- t…
Subscribe to:
Post Comments (Atom)
0 Response to Create observations for neighboring states
Post a Comment