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
dropping observations if 2 strings are emptyHi I want to drop all observations which don't have date in 2 string variables: for example if A =…
Plot Quantile RegressionHello, I would like to conduct a quantile regression and plot the regression afterwards. I am getti…
Noabsorb option for ivreghdfeBest users, A bit of a general question, but how come the code (xrd is the dependent variable and p…
predicted probabilities using xtlogit, fe: The state of the art?Dear Statalisters: There are a million threads on Statalist already for similar topics (e.g., https…
count variable and keep the firstDear statalist, I have a list of companies (isin) on different dates ( variable DATE format DD/MM/Y…
Subscribe to:
Post Comments (Atom)
0 Response to Loops for creating categorical variables using different cutoff
Post a Comment