Hi, i have a variable x with 5 values (assume 1 to 5). When I do tab x I have that the value with higher frequency is 2 and the next value with higher frequency is 5. I want to recode 2 as 1, 5 as 2, and so on for all the values of my variable. Clearly I have to do that with many variables, that's why I cannot do it manually.
Related Posts with Changing variable's value by frequency order
Generating columns for each unique value within a groupHello, I have monthly individual program data with the following variables: individual identifiers …
How to resolve xtlogit issue with interaction?Hi I am new to Stata and the Forum and I also encounter issue with xtlogit. Appreciate any help: I r…
What is Stata's full algorithm for automatically labelling axes on plots?Hi all, For reasons that aren't really worth going into, I'm trying to reproduce the algorithm that…
Marginsplot legend labeling with plotoptsDear all, I'm want to plot an an interaction effect, with labels in the legend. Thus, I'm using thi…
Multilevel models with complex survey designHi, I was hoping that someone at Statalist could help me with this. I’m trying to use multilevel log…
Subscribe to:
Post Comments (Atom)
0 Response to Changing variable's value by frequency order
Post a Comment