Announcement

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

  • adjusting for sample design

    Hello.
    I would like to analyze a subset of my data (teenagers). However, I am utilizing a command that does not accept the subpop option with svy. Therefore, I would like to adjust for weights, clustering, and strata and use the "if" option. I know how to adjust for weights and clustering without svyset, but is there any way to also adjust for strata? I also tried to use the "over()" option, but did not have any success. I am using Stata 15.
    Thank you,
    Pina

  • #2
    Pina, hi. To provide you with guidance more easily, if possible, it is always a good strategy to describe the command you have been using and give us an example of dataset.
    Last edited by Tiago Pereira; 23 Aug 2023, 08:18.

    Comment


    • #3
      I agree with Tiago Pereira - note that if you are using the "svy" prefix, subpop is an option to that prefix and thus is always available; we need to know exactly what you are telling Stata

      Comment


      • #4
        Thank you both for the reply. I am using “mvdcmp” -- this is a user-written program from ssc for a decomposition analysis.

        When I run the following code:

        Code:
        mvdcmpDev groupvar: svylogit anyuse famst, subpop(age1519)
        I get the following:

        option subpop() not allowed
        r(198);

        Comment


        • #5
          first, "mvdcmpDev" looks like a typo to me

          second, -svylogit- was long ago replaced with -svy: logit-, and there the subpop option comes before the command; what version of Stata are you using?

          I am not familiar with mvdcmp and do not know how 2 prefix commands should be used together; you might want to try tech support for this or the author of mvdcmp

          Comment


          • #6
            Thanks, Rich.

            mvdcmpDev is correct -- it's an update to the original.

            I am using Stata 15. I will check with the author since, to my knowledge, the updated command accepts -svylogit-

            Comment


            • #7
              Hello. I wanted to follow up on this post. I confirmed with the author that subpop cannot be used with this command. The "if" statement also cannot be used, though even if it could, documentation for the data I am using indicates it should not be used anyway.

              Is there anything else I can do to run my analysis on a subpopulation without the subpop command?

              Comment

              Working...
              X