Announcement

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

  • Tab2 with survey weights and chi-squared results

    Hi,

    I am currently look at panel data for 10 countries using DHS data. I am hoping to run chi-squared tests for my bivariate logistic regressions in order to choose which variables to include in my multi-variate regression.

    Given I am running multiple multi-variate regressions (e.g. all countries and year, separate country for all years etc) I would like a quick way to get results.

    I know I can use 'tab2, first only' to do this - e.g. tab2 dead bednet electricity urban, chi2 firstonly. This command, however, does not take into account survey weights. I cannot put 'svy' infront of the command as tab2 is not supported by svy. I then thought to put [pweight=v005/1000000] instead of svy, however, pweights was not allowed nor was a/f/i weights.

    My question is, how can I run tab2, first only with survey data and results for chi-squared tests?

    Any assistance would be greatly appreciated.

    Best,

    Jane

  • #2
    Further to my query above, fweights seems to be the only weight supported by tab2 - however, DHS have non integer-weights. Given this is the only weight command supported, is my query even possible?

    Best,

    Jane

    Comment


    • #3
      I am not familiar with this data set; however, in general, tab can by used after the "svy:" prefix (you must svyset your data first); it will use the weights and will give you Pearson chi-squared results; see "h svyset" and "h svy"

      Comment


      • #4
        Hi Rich,

        Thank you for your email - tab does work with 'svy' but 'tab2 is not supported by svy...'. I'll keep playing with the data to see if anything works.

        Best,

        Jane

        Comment


        • #5
          I believe that tab2 is just a wrapper for tab; what do you think you get from tab2 that you don't get from tab?

          Comment


          • #6
            For whatever reason, the -svy- command does not differentiate -tab1- and -tab2-, and instead uses just -tabulate-. It should work if you simply drop the 2 and use -tab-.

            Comment


            • #7
              Thank you for emails. It is my understanding that only tab2 allows you to run multiple tabs at the same time, which is what I was hoping to do given I have a large number of variables that need to be tabulated against the one outcome variables. If I used tab, I would have to run each of them separately. Is that correct?

              Best,

              Jane

              Comment


              • #8
                put the set into a "foreach" loop (e.g., foreach var of varlist ...); see "h foreach"

                Comment

                Working...
                X