Hi,
I have 842 continuous variables and I need to turn them into a catagorical variable. Each of them has its own cutoff value (I got the cutoff value by using cutpt command in a loop).
I know how to do this for one variable without a loop using the gen and replace commands and then assigning labels to the values but I don't know how to write a loop without typing cutoff value.
Can someone assist me with how to accomplish this more quickly using a loop for all 842 variables? thank you!
Related Posts with Loops for creating categorical variables using different cutoff
How to break down the values of one columns to different columns?Hi In my survey, I had a ranked order question. I asked the participants to rank 6 variables from 1 …
Fixed effects corner solution response model (Tobit)Dear Statalist community, I would like to request your help for implementation of a specific econom…
Reshape data to create a stacked horizontal bar-graph, such as catplot from ssc, for several variablesDear all, First of all, I am really sorry this post is so long winded. I was not sure how much info…
How to compute average of two values within the same cell?Hi I have a variable named age_range (with storage type: str5) as you can see in the following tabl…
Can we do a Latent Profile Analysis in Stata15?I wonder if we can run a latent profile analysis in Stata15. If we can, could you recommend any web …
Subscribe to:
Post Comments (Atom)
0 Response to Loops for creating categorical variables using different cutoff
Post a Comment