Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trouble Generating Clear CDF Plots for First Order Stochastic Dominance Test

    Hello everyone,

    I'm working on a first-order stochastic dominance test for diet component variables. I am interested in examining differences between two ethnicities in my dataset. I've managed to run my stochastic dominance analysis, but I'm facing difficulties generating clear CDF plots in Stata. The issue is that the two CDF lines seem to merge or attach at the end, causing interpretation challenges.

    Here's the Stata code I used to produce the CDF plots:

    Code:
     cdfplot hei_c1, by (eth) title("Total Vegetables") xtitle("Component Score") ytitle("Cumulative Probability") legend(label(1 "NHW") label(2 "NHB"))
     graph export "$graphs\Veg_cdfplot.pdf", replace
    I've attached an image of the resulting graph for clarity. As you can see, the CDF lines for the two ethnicities converge right at the highest values .


    Despite multiple attempts to modify my code, I haven't been able to generate distinct CDFs for each ethnicity without this merging effect at the end.

    I would truly appreciate any insights, suggestions, or potential solutions to rectify this issue.

    Thank you so much for your time and help!
    Attached Files
    Last edited by Avisha Raj; 29 Aug 2023, 15:21.
Working...
X