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
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
Comment