Announcement

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

  • Pooling Multimputation Variable Outputs

    Hello all!

    I am working with a complex survey dataset and have 1 variable, povcat, that needs to be imputed. Due to the complex survey design, I need to use *svy* before my commands, and due to the multimputation (with 6 implicates), I need to use *mi* before commands as well.

    Is there a way in Stata 17 to pool the tabulated data for an imputed variable (in my dataset, povcat_i) that comes from the *mi xeq* command? I have been doing that by hand by averaging the values from the 6 implicates, however this is very time consuming.

    Here is an example of the code for unpooled tabulate of the variable which runs well and outputs proportions:

    HTML Code:
    mi xeq: svy: tab povcat_i
    I am also wondering if there is a way to get the estimated weighted frequencies (rather than proportions) of an imputed variable like povcat_i?

    Any advice on working with a complex survey design while simultaneously working with multimputation would be great!

    Thank you!
    Maya

  • #2
    We’re you aware that you can use svyset within mi?
    Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

    When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

    Comment


    • #3
      When I tried using svyset within mi, I received this error:

      Code:
      mi est: svyset: tabulate povcat_i, count format (%12.3gc)
      command prefix svyset: not allowed
      r(198);
      Also, the dataex command gave me this error:

      Code:
      datasex
      input statement exceeds linesize limit. Try specifying fewer variables
      r(1000);
      My dataset has >400 variables and >100,000 observations. Is there a separate command or option that would enable me to give an example of data for this kind of dataset?

      Comment


      • #4
        I haven't personally done mi + svy before, so I hope this syntax is right. However, instead of svyset beforehand, you need to type mi svyset (svy parameters) to declare the data to be MI and svy data Note the lack of colons.

        Also, I just realize that you're tabulating the data. I don't know if svy's tabulate is considered to be an estimation command, and mi will only support estimation commands. If tabulate works, you'd type

        Code:
        mi est: svy: tabulate povcat_i
        That said, I am not sure it works. Now, you could get the mean of each category, I think, by

        Code:
        mi est: svy: regress i.povcat_i, nobase
        Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

        When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

        Comment

        Working...
        X