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
Related Posts with How to count the number of the multiple observations into the same group once
interpreting logistic regression model with interaction terms, data-sparsity and collinearityHello, First off, I'm sorry to post such a basic question and basically ask someone to do my work f…
Elasticity from IV probitDear Altruist, 1. I could implement the following commands with success. (STATA-14.2) probit smk p…
Frequency tables for multi variablesHi, I am using stata 13, and I need to make a combined frequency table for many dependent variables,…
How to adjust the scala in a combined graph?Hi everyone, I have a problem with a combined graph. I want to adjust yscale but I do not occur any…
Canay's (2011) Fixed-Effect Quantile Panel Data Approach in the presence of some endogenous independent variablesDear Forum members, Let me apologize in advance if my question has been dealt with somewhere which …
Subscribe to:
Post Comments (Atom)
0 Response to How to count the number of the multiple observations into the same group once
Post a Comment