Hi, I am a senior in college working on an economics thesis.
I am trying to generate a dummy variable which would yield 1 if the observation is in the 95th percentile of the variable and a 0 otherwise. The variable in question is "inflation" and the new variable would be named "extremeinflation". The data is panel, not sure if this would make a difference in the syntax that I need.
I believe I should be using the command pctile in some kind of manner but I am confused on the exact syntax that I should be using.
Anything helps!
Thank you very much.
I am trying to generate a dummy variable which would yield 1 if the observation is in the 95th percentile of the variable and a 0 otherwise. The variable in question is "inflation" and the new variable would be named "extremeinflation". The data is panel, not sure if this would make a difference in the syntax that I need.
I believe I should be using the command pctile in some kind of manner but I am confused on the exact syntax that I should be using.
Anything helps!
Thank you very much.
Comment