Hello,
Can you please help me with the following issue: I want to form deciles based on the credit rating for different bonds.
The credit rating variable (rating_num) can take values between 1 and 22.
I tried 2 different methods and they yield the same result:
bys monthly_dates: astile decile_cr_monthly = rating_num, nq(10)
egen decile_r_num = xtile(rating_num ) , by(monthly_dates ) nq(10)
The problem is that in deciles 5 and 7 I have 0 observations.
I understand that this is due to the cutoff point.
I was wondering if there is a way to define the cutoff points such that I have observations in each of the 10 deciles?
Thank you very much for your help!
Related Posts with Form deciles with no 0 observations
Multiple RegressionHello guys, I will run the multiple regression and calculate the expected number of children EVER BO…
how to combine (as in overlap) multiple catplots?Hi Guys, Hope you're all well. Code: catplot letter if 2020dummy==1, percent hor var1opts(sort(1)…
Interpreting regression results if some clusters are not treatedI am a bit confused about how to interpret the regression results in the following scenario: I comp…
Graph export to a specific folderHi all, May I know how to export a graph as .png to a specific folder? The default location is the …
Meta - Forest plot - How do we get high-res figures in large meta-analyses?Dear statalisters, -meta- with the option forestplot is capable of producing great forest plots, wh…
Subscribe to:
Post Comments (Atom)
0 Response to Form deciles with no 0 observations
Post a Comment