Dear STATALIST forum,
I'm looking for ways of visually depicting the association between a dichotomous explanatory variable (parod1) and a continuous dependent variable (cacs_tot) in a box plot displaying the 75th, 85th and 95th percentile.
I tried a "normal" box plot but the results are not clearly visible due to a lot of outliers (please see the attached screenshot).
In the adjusted model, certain confounders are included ("ageatvisitone", diabetes (diab1) and smoking, as you can see in the example below).
The data is overdispersed and zero inflated (not due to missing, but simply most individuals have the value 0 for the dependent variable) so negative binomial regression (nbreg) was used for the analysis.
The mean and median dependent varible "cacs_tot" is 0 as you can see below. And the percentiles of the dependent variable is as follows:
percentiles: 10% 25% 50% 75% 90%
0 0 0 21 138
Code:
I have also conducted a quantlie regression to make inference on the 75th, 85th and 95th percentile, and the inference is statistically significant.
Regards,
Niko
I'm looking for ways of visually depicting the association between a dichotomous explanatory variable (parod1) and a continuous dependent variable (cacs_tot) in a box plot displaying the 75th, 85th and 95th percentile.
I tried a "normal" box plot but the results are not clearly visible due to a lot of outliers (please see the attached screenshot).
In the adjusted model, certain confounders are included ("ageatvisitone", diabetes (diab1) and smoking, as you can see in the example below).
The data is overdispersed and zero inflated (not due to missing, but simply most individuals have the value 0 for the dependent variable) so negative binomial regression (nbreg) was used for the analysis.
The mean and median dependent varible "cacs_tot" is 0 as you can see below. And the percentiles of the dependent variable is as follows:
percentiles: 10% 25% 50% 75% 90%
0 0 0 21 138
Code:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int cacs_tot float parod1 byte cqed001 float(ageatvisitone diab1 smoking bmi) byte(sex cqah001) float ldlformattedresult int sbp_mean float medhyp byte(intakta kvarvarande) 30 0 4 53.1 0 1 24.8 0 4 2.7 113 0 14 28 0 0 4 62 0 1 22.5 1 3 3.2 114 0 9 30 0 0 4 51.4 0 1 26 0 5 2.2 120 0 17 30 0 0 4 63.3 2 1 34.9 1 3 6 114 0 16 31 . 0 4 57.5 1 1 28.5 0 1 6.9 132 1 13 32 end
Regards,
Niko
Comment