Re: Cox Model and Recoded Variables From BR File [message #20210 is a reply to message #20206] |
Thu, 08 October 2020 07:45 |
Bridgette-DHS
Messages: 3223 Registered: February 2013
|
Senior Member |
|
|
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:
Your recodes look fine. The problem is just with your specification of the subpop option for svy. What Stata expects for the argument (you have entered "subpopulationbw2") is a variable that has the value 1 for the subpopulation you want to restrict to. For example, you could have this line, "gen Punjab=1 if v024==1" and then specify the option with "subpop(Punjab)". Then to run the model for Sindh you would have "gen Sindh=1 if v024==2" and then specify the option with "subpop(Sindh)", etc. (If this doesn't work, try recoding as 0 or 1, but I think . or 1 is ok.) It's good that you are running the model with the subpop option rather than with "...if v024==1", etc. It's just that the specification of the argument is off.
|
|
|