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
Plotting the slopeGood day Statalisters! Is there a command in Stata where I can plot a curve using the lower bound a…
Creation of Compound Interest variableGood evening everyone, I do have the closing prices NAV (net asset value) and I calculate the retur…
Regression with propensity scoreDear all I am trying to estimates the dynamic treatment effect while using propensity scores. I woul…
Comparing cox proportional hazard linear and non-linear (restricted cubic spline) models using likelihood ratio testHi folks - I am trying to understand and figure out how to actually code/test non-linearity between …
How can I create this variable?Hi, I have data for the total number of Corona cases and the total population. What should I do to c…
Subscribe to:
Post Comments (Atom)
0 Response to Form deciles with no 0 observations
Post a Comment