Hi guys,
I just meet an interesting problem. My boss asked me to recode a continuous variable, for example, age.
The final goal is to cut the age into some intervals which maximizing the difference of wage among the intervals.
I just wonder that are there any user-written command which can automatically do that?
I found some information on the web, there are some algorithms called "chi2 algorithm" which can compare the distribution of adjacent intervals to combine some trivial intervals.
Any similar command in stata?
Related Posts with how to use stata discretizing a continuous variable optimally?
2 sequential loops, second loop only runs those instances that converged in the firstHello all, I'm running several instances of a maximum likelihood routines in a first set of loops. …
Keep only first part of string up until any number, comma, or before the state nameHi All, I am trying to separate an area name in a dataset so I just have the particular city and no…
Need help with i.year output in aregHello, Thanks for all the help I've received through this forum. I wanted to understand why I got 2 …
Merge based on time-range conditionHello everyone, I have 2 datasets that needed to be merged. Dataset A has unique IDs with multiple …
Creating*copies with missing valuesHi Stata users, I have a dataset as shown in the example below Code: * Example generated by -data…
Subscribe to:
Post Comments (Atom)
0 Response to how to use stata discretizing a continuous variable optimally?
Post a Comment