Announcement

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

  • How can I estimate correlations and their level of significance with survey data?

    Stata has this FAQ:

    http://www.stata.com/support/faqs/st...h-survey-data/

    However, it says "This FAQ is for users of Stata 11. It is not relevant for more recent versions."

    So, what is the new and improved way to do it?
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 19.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

  • #2
    I'll allow myself the luxury of one bump just in case the people who know the answer missed this earlier. The FAQ implies that there must be some new and improved way of doing this, but if so I can't figure out what it is.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 19.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      I would interpret the silence as a consensus that there isn't really a new and improved way of doing this in Stata 12+. That was my conclusion, anyway, but I was waiting to see if others would come up with something.

      The only definitive answer, I think, might come from contacting the person who authored that FAQ post.

      Comment


      • #4
        If there is a new and improved way, it is a well-hidden enhancement. I will send a note to Stata Tech support about it if nobody else chimes in soon. Thanks.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #5
          To my knowledge, there is no improved way of doing this since Stata 11.

          I'm not sure why it got flagged as no longer relevant beyond Stata 11.

          I will investigate, and probably have the note removed and links updated to reflect that this is still current.

          Comment


          • #6
            Isabel Canette (StataCorp) gave me an example, reminding me that SEM was
            a new feature added in Stata 12.

            Code:
            * infamous auto data
            sysuse auto
            
            * estimate a weighted correlation
            correlate mpg disp [aw=turn]
            
            * estimate a correlation with a linearized SE
            sem mpg disp [pw=turn], standardized
            
            * sem also supports the svy prefix
            svyset _n
            svy: sem mpg disp, standardized
            So we can use sem with the standardized option to estimate correlations
            and get robust/linearized estimates for their standard errors.

            Comment


            • #7
              Thanks! I don't think most people would guess that, so it might be nice to add it to the FAQ.
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              StataNow Version: 19.5 MP (2 processor)

              EMAIL: [email protected]
              WWW: https://www3.nd.edu/~rwilliam

              Comment


              • #8
                Reasonable request. I will see about adding something about sem for people with Stata 12 or newer.

                Comment


                • #9
                  FWIW that should be
                  svyset _n [pw=turn]
                  -- Stas Kolenikov || http://stas.kolenikov.name
                  -- Principal Survey Scientist, Abt SRBI
                  -- Opinions stated in this post are mine only

                  Comment


                  • #10
                    Hi, I am also hoping to get correlations weighted by (stratified) survey weights, using Stata 17. While the example above runs fine, I am unable to use svy: sem with my own weighted data. When I tried (as below),

                    svyset clust [pw=svyweight], strata(stratum) singleunit(centered)
                    svy: sem Zn r1Zn, standardized


                    I got this error:

                    model not identified;
                    no paths from latent variable Zn to observed variables
                    an error occurred when svy executed sem


                    Same error if I run this syntax instead:

                    svy: sem (<- Zn r1Zn), standardize

                    which I saw in a post about using SEM for weighted correlations in Stata 17 (https://stats.oarc.ucla.edu/stata/se...s-in-stata-17/).

                    Any idea what is going wrong? I have never used sem, and tried reading bits of the the (massive) document on it to no avail. Also -- Ideally I want to be obtain (and then export to latex, currently achieved using estpost, matrix after corr) a weighted correlation matrix, not individual correlations between 2 variables only. Not sure if that's possible, using sem, and but if so I'd love to know the syntax for obtaining that matrix.
                    Last edited by Leah Bevis; 25 May 2022, 12:35.

                    Comment

                    Working...
                    X