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 #23957 is a reply to message #23956] Fri, 21 January 2022 08:05 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member

Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

Yes, for the cluster ID you can use either v021 and v001. When you get a Stata error message such as "variable wt1_1*wt2_1 not found" it means you have tried to do some algebra that is not allowed within a command. You would just need a line such as "gen wt_1= wt1_1*wt2_1" and then insert "wt_1" where you may have had "wt1_1*wt2_1". However, there may be a bigger issue. There are some instances in Stata in which two options are incompatible with each other, and you don't get an error message telling you that's why the command will not work.

It's very important to include as much of svyset as you can. I would try simplifying svyset, and/or simplifying the cox options, until you get a combination that works. Then proceed with your analysis. You will want to get as close as possible to your ideal combination of svyset and cox, but you may not be able to get all the way there.

 
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:11:35 Coordinated Universal Time 2024