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.
Related Posts with Generating a 95th percentile indicator variable
Multicollinearity and dummy variablesHello, first time poster here. Having a little trouble with something and was looking for a bit of h…
Question about creating new values for each year, (summing issue)Hi, I am trying to create a new column where it shows the average value of another column for each …
How to get residuals series of many regressions?Hello, I want to run 500 regression in one command. dependent series are Y1 to Y500 and three indepe…
Use of binary explanatory (control) variables in Difference-in-Difference EstimationHi all, I am conducting a Diff-in-Diff with the following data, which is copied in here by using th…
replacing values in a loopDear All This is my first post on statalist. I have a household survey data (119,018 observations).…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a 95th percentile indicator variable
Post a Comment