Hi all,
so i have a numeric variable with a lot of values, that are decimal:
4,626276
5,162374
5,612217
etc.
The lowest value is 4,626276 and the highest value is 79,43243.
Now, I want to reverse the variable so that it runs from highest to lowest (so that 79,43243 is the first value and 4,626276 the last value). I did it with the revrs command: revrs mcs_1st (mcs_1st is the name of the variable).
But now the problem: This isn't actually reversing the variable. So the new variable is the same as the old one.
So my question is? How can I reverse the variable without revrs? Is there a way?
I hope you understand what I mean.
Related Posts with Reverse a numeric variable
I CANT Dowland this code 'xtpanicca'ı tried to dowland Bai and NG Panic Unit root test for panel data, ı use this code to dowland ssc in…
Removing a single character from a stringHello, I am interested in removing the third character from a variable that looks like this: id 011…
Looping of a specific type of a variable listHey Stata users! I am trying to loop over a list of integer variables to replace missing values. I …
Counterfactual decomposition in StataI am trying to analyse the change in wage differentials between men and women in the Netherlands, us…
color macros for graphsI'm trying to setup macros to use across a set of graphs for cmyk colors. I've tried local mygray :…
Subscribe to:
Post Comments (Atom)
0 Response to Reverse a numeric variable
Post a Comment