Hi all, I just a beginner using STATA and I need an help to solve a problem that probably seems simple to experts. I have a long data file that describes flight routes covered by different air carriers and I need to calculate the number of routes operated by more than one air carrer. To achieve this result I generate two dummy variables: the first one indentifies the same route and the second one indicates 0 when it is covered by a single carrier and 1 if the same route is covered by more than one carrier. Here a short example:
+------------------------------------------------------+
| F_Route AirCode No_Differ SameRoute |
|-------------------------------------------------------|
| ABQ-ATL DL 1 0 |
| ABQ-AUS G4 2 1 |
| ABQ-AUS WN 2 1 |
| ABQ-AUS WN 2 1 |
| ABQ-BNA WN 3 0 |
| ABQ-DEN UA 4 1 |
| ABQ-DEN WN 4 1 |
| ABQ-DEN AA 4 1 |
| ABQ-DEN UA 4 1 |
+------------------------------------------------------+
I am not able to find a STATA command able to count the number of F_Route by the SameRoute (in this sample the result is 2 because only ABQ-AUS and ABQ-DEN are covered by more than one air carrier).
Please do you have any suggestions to fixed this problem ? Thank you in advance for your help.
Giancarlo