Announcement

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

  • Adding Weights to Regression Using Panel Data

    Hi there,

    I am currently using the UKHLS Understanding Society panel dataset. In particular I have merged waves A, C, F I and L.
    I am interested in the impact of a change in perceived social cohesion on life satisfaction.

    - lfsato: life satisfaction
    - NSC_index_nm: a balanced index consisting of 8 variables.

    I am trying to incorporate sample weights to circumvent biased estimates.
    UKHLS suggest using stata's svy suite ofcommandsso I ran the following:

    [svyset, clear
    svyset psu [pweight = l_indscus_lw], strata(strata)
    svy: xtreg lfsato NSC_index_nm i.wave, fe robust ]

    However, an error message appears that says xtreg is not supported by svy.

    Do you know of any commands that will work to run regressions on panel data incorporating probability weights?

    I have read that areg might work. Would the following code achieve what I am trying to do?

    [areg lfsato NSC_index_nm i.wave [aweight=l_indscus_lw], absorb(pidp) cluster(psu) // Use areg for fixed effects regression with weights and clustered standard errors - errors clustered around the primary sampling unit (households)]

    Thank you in advance for any advice you might be able to provide.

    Emma



  • #2
    I think you will need to do this via -sem- or -gsem-; you can start with examples 38g and 39g in
    Code:
    help sem_examples

    Comment


    • #3
      Thank you very much Rich!

      Comment

      Working...
      X