Announcement

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

  • Bivariate tests and median in a complex survey sub-sample

    Hi folks.

    I've been handling a complex survey dataset for a while now, and I can't find a way to compute median, SD, nor mann-whintey/qui/correlations tests for my weighted sub-sample. Any code suggestions?

  • #2
    The first part of your question is a FAQ: https://www.stata.com/support/faqs/s...r-survey-data/

    Also see https://www.statalist.org/forums/for...35#post1358235
    David Radwin
    Senior Researcher, California Competes
    californiacompetes.org
    Pronouns: He/Him

    Comment


    • #3
      Also see https://journals.sagepub.com/doi/10....867X1201200202 and https://www.stata-journal.com/articl...article=st0198 .
      David Radwin
      Senior Researcher, California Competes
      californiacompetes.org
      Pronouns: He/Him

      Comment


      • #4
        Thanks again David.

        Concerning SD, I managed to solve the problem.
        Concerning percentiles, I'm trying to install epctile.pkg, as we were talking in the other post.
        Concerning bivariate tests, thank you so much for the articles, specially the first one! It was really helpful to systematize ideas. Now, how can I compute the ranksum (or chis) in svy? Is it possible?

        Comment


        • #5
          I don't know of any way to use ranksum with complex samples (svy setting). If by "chis" you mean "perform a chi-square test," that can be done with svy: tab, such as this toy example:
          Code:
          . webuse nhanes2
          
          . svy: tab sex race
          (running tabulate on estimation sample)
          
          Number of strata = 31                            Number of obs   =      10,351
          Number of PSUs   = 62                            Population size = 117,157,513
                                                           Design df       =          31
          
          --------------------------------------
                    |            Race           
                Sex | White  Black  Other  Total
          ----------+---------------------------
               Male | .4225  .0435  .0133  .4794
             Female | .4566   .052   .012  .5206
                    | 
              Total | .8792  .0955  .0253      1
          --------------------------------------
          Key: Cell proportion
          
            Pearson:
              Uncorrected   chi2(2)         =    4.5159
              Design-based  F(1.93, 59.72)  =    1.2442     P = 0.2946
          David Radwin
          Senior Researcher, California Competes
          californiacompetes.org
          Pronouns: He/Him

          Comment

          Working...
          X