The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Applying weights to multilevel hazard analysis using Cox regression
Re: Applying weights to multilevel hazard analysis using Cox regression [message #23956 is a reply to message #23954] Thu, 20 January 2022 17:19 Go to previous messageGo to previous message
Ugonna is currently offline  Ugonna
Messages: 26
Registered: June 2020
Member
Thanks Bridgette and Tom for the response.

The only difference from my syntax and the one in DHS methodological report #27 is the psu. I understand I can either use v001 or v021 as the psu. Correct me if I'm wrong please.

The svyset command executed and showed this result:

'Note: Stage 1 is sampled with replacement; further stages will be ignored for variance
estimation.

pweight: <none>
VCE: linearized
Single unit: centered
Strata 1: v022
SU 1: v021
FPC 1: <zero>
Weight 1: wt2_1
Strata 2: <one>
SU 2: <observations>
FPC 2: <zero>
Weight 2: wt1_1'

When I run the syntax "svy: stcox i.w_quintile elect i.anc i.v024 v025 poverty_prop sec_edu_prop || v021:" without the shared option it returns this error message:
'variable wt1_1*wt2_1 not found'.

And then when I run it without the svy option 'stcox i.w_quintile elect i.anc i.v024 v025 poverty_prop sec_edu_prop, efron shared(v021)' it executes successfully, even though it takes a long time to do that.

I also observed that I could run this 'svy: melogit inf_death i.w_quintile elect || v021:' successfully, although that is not what I'm using in my analysis.

Could it be that 'svy' is not needed when running a Cox multilevel regression?

I have also posted the question on Stata forum.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SUEST
Next Topic: underfive children HW data: why missing a lot in IR files
Goto Forum:
  


Current Time: Sun Dec 1 18:23:58 Coordinated Universal Time 2024