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
Question on select data for a specific periodHi! I'm having trouble with data cleaning. My time_var data is in long format (eg. 31may2011) and af…
npregress intro manual replicate figuresHi, I'm looking for the code behind the figures in npregress intro manual https://www.stata.com/manu…
Sample Cross-CorrelationDear All, I am currently working on an event-study related topic and stumbled accross a significance…
Combining codes of different do filesI am trying to run the codes of two separate do files, combining them into the same do files. Each d…
Moving entire folders to different directoriesHello: I am trying to use the command -mvfiles- which seems to be a good way to move/copy files from…
Subscribe to:
Post Comments (Atom)
0 Response to Reverse a numeric variable
Post a Comment