Hi,
I have created an id variable for a pair of countries(exporter importer) based on their distance (DIST):
egen pair_id = group(DIST).
However, in my base, the distance ISR-JOR is not exactly the same distance JOR-ISR considering all the decimals.
What can I do?
exporter importer pair_id year DIST
ISR JOR 2 1990 114.6373
ISR JOR 2 1998 114.6373
ISR JOR 2 1986 114.6373
ISR JOR 2 1994 114.6373
ISR JOR 2 2002 114.6373
ISR JOR 2 2006 114.6373
JOR ISR 3 2002 114.6373
JOR ISR 3 1998 114.6373
JOR ISR 3 2006 114.6373
JOR ISR 3 1990 114.6373
JOR ISR 3 1986 114.6373
Thanks!
Related Posts with *egen pair_id = group(DIST).
How to flag observations that are repeated after a pre-specified length of time?Hi, Please consider this example data: Code: * Example generated by -dataex-. To install: ssc inst…
Change in the sign of a variable in a regression outputDear all, I am currently working on a regression. My aim is to assess whether ESG scores affect the…
omitted because of collinearityDear Stata friends I wanted to run the following regression with fixed effects: Code: reg Arbeits…
Using Reshape to sort wide into longHello Everyone, I want to convert my wide data into a long panel data for currency data. Currently…
How to create a dummy variable that tracks the repetition of other variablesHello all, I have a dataset on user ratings of golf courses and I am trying to create a dummy varia…
Subscribe to:
Post Comments (Atom)
0 Response to *egen pair_id = group(DIST).
Post a Comment