Announcement

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

  • Comparing median at 2 points

    Dear Stata users,

    I am wondering, is it possible to compare the median of continuous variable (V1-slope) at 2 different points of V2 (compare median of slope at 8 and 10)? And what kind of statistical test can be applied for this analysis?

    Click image for larger version

Name:	for Statalist_test for diff.png
Views:	1
Size:	213.5 KB
ID:	1501831

    Thank you.
    Best wishes

  • #2
    Well, looking closely at your scatter plot, there are only a very few points with baseline viral load = 8 or = 10 exactly. So I doubt that doing this would be fruitful. But if you wanted to compare median slope with viral load close to 8 compared to viral load close to 10, where "close" is defined liberally enough to leave you with a decent number of data points, that might work out.

    So you might try
    Code:
    gen byte bv_approx = 8 if inrange(baseline_viral_load, 7.5, 8.5)
    replace bv_approx = 10 if inrange(baseline_viral_load, 9.5, 10.5)
    
    tabstat slope, by(bv_approx) statistics(p50)
    median slope, by(bv_approx)
    Read -help median- for more information about the test of equality of medians.

    Comment


    • #3


      As always, thank you so much for your help prof.Schechter.

      Comment


      • #4
        Dear Stata users,

        I am trying to run the following code:

        set seed 1000

        sqreg FV_index i.CQFIN i.age i.gender i.employment i.location i.CINCOME i.education i.marital Fin_literacy_index i.social_grants, q(.25 .50 .75 .95) reps(1000)

        where: FV_index is an index of financial vulnerability and i.CQFIN are quintiles of financial inclusion index


        After estimating the model, i have attempted to run the slope equality test for the quintiles of financial inclusion index (CQFIN) but it giving me an error.

        Can one do slope equality test on quintiles?

        Comment


        • #5
          Kudakwashe Chipunza , please start a new thread with your question as it has nothing to do with the original question here.

          Comment

          Working...
          X