Hello, I have this panel data.
Array
I want to rank the variable (REV_CH_mean5) within each industry-year ( Year IndustryCode). Then, firms (Stkcd) with values of the variable in the highest quintile are assigned a score of 5, those in the next quintile receive a score of 4, etc., and those in the lowest quintile are assigned a score of 1.
Related Posts with ranking and creating a dummy variable based on quantiles
combining commands to keep and drop certain observationsI would be grateful for advice on whether I need to execute the commands step by step (in what seque…
Near perfect correlation between dummy variable and outcome variable, all checks on data indicate there is no problem with underlying data.I am facing a bit of a problem and I can't seem to figure out what the issue might be. I am currentl…
Using the foreach/forval commands for different categories of a categorical variableI have a panel dataset with the following key variables: race, wealth, year. Race is a string variab…
How to interpret results of regression with Box Cox transformed YHi everyone, Could please share your opinion on how should I interpret and explain the results of t…
Missing dataHello! I am currently figuring out how to deal with with missing data. According to the user guide,…
Subscribe to:
Post Comments (Atom)
0 Response to ranking and creating a dummy variable based on quantiles
Post a Comment