Announcement

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

  • How to weight(iw) in tab2 command?

    tab ecn [iw=v52]
    here, ecn is a variable indicating economic activity(1=ecn, 2=non-ecn) and v52 is weight variable.
    The economically active population through this is the same as the official government figure.

    tab2 gender ecn [iw=v52]
    However, if the above command is used to view the gender of the economically active population, an error message is displayed stating that iw weights are not allowed.
    Therefore, I used the command tab2xl ecn gender [iw=v52] using "ecn.xlsx", row(1) col(1) sheet("ecn").
    However, the results show a very significant difference from the official government. figures
    wonder. What is the method of weighting with iw in the tab2 command?

  • #2
    The weights you have are probably post-stratification weights, so they are pweights not iweights. The table command can accomodate pweights, and the result can be exported to excel. The translation of your command to table is below:

    Code:
    table (ecn) (gender) [pweight=v52]
    collect export ecn.xlsx, cell(A1) sheet(ecn)
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Only fweights are allowed with tab2.

      Comment

      Working...
      X