Announcement

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

  • -xtreg- and population weights

    Hello Statalisters,

    I am using repeated cross-sectional individual data where I set districts as the panel variable to look at a district-level policy change on individual outcomes. The sample size for all the surveys are massive but in two earlier waves of the cross-sectional surveys key info on education is missing for half the population. I also want to use population weights. However, I know svy commands do not work with xtreg. I feel like my estimates would be biased if I do not use population weights. I have psu information, could I use that as population weights with xtreg, if yes how do I do this?

    This is what my regression looks like (I am using district and year-fixed effects)

    Code:
    xtset districts 
    
    local yvar "attendany complete  enrol"
    
    xtreg `yvar' quartcyclepol age locality school_year religion hschool sexratio litrate popgr i.year, fe // quartcyclepol is the quartile change of policy coverage by districts over time
    Lori


  • #2
    Unless you have stratification, there is no need for -svy- as xtreg, fe supports weights.

    Fixed-effects (FE) model

    xtreg depvar [indepvars] [if] [in] [weight] , fe [FE_options]
    Even if you needed to use -svy-, it supports regress which can absorb the district indicators (see, e.g., #5 https://www.statalist.org/forums/for...r-svy-xtreg-fe).

    Comment


    • #3
      Thank you, Andrew, but I keep getting the error messages that weights are not constant within districts. This is indeed the case since I am using repeated cross-sections from two different survey waves.

      Comment


      • #4
        Try reghdfe from SSC.

        Comment

        Working...
        X