Error in computing TFR from DHS.rates package [message #25961] |
Tue, 17 January 2023 07:30  |
sarojaadhikari2@gmail.com
Messages: 2 Registered: May 2019
|
Member |
|
|
I am trying to compute TFrs by residence and education in DHS countries. However, I got the following error in many countries. How can I address this error? Please help.
Error in svydesign.default(id = ~v021, strata = ~v022, weights = ~rweight, :
Clusters not nested in strata at top level; you may want nest=TRUE.
|
|
|
|
|
Re: Error in computing TFR from DHS.rates package [message #26014 is a reply to message #26008] |
Fri, 27 January 2023 07:28  |
Janet-DHS
Messages: 286 Registered: April 2022
|
Senior Member |
|
|
Following is a response from DHS staff member, Tom Pullum:
I suspect the problem is that the case identifiers in all the India surveys must include the region variable, which is hv024 in the PR file and v024 in the IR file. The easiest way to take this into account could be as follows. Open the IR file and construct a new variable for cluster, called v001r, which is all combinations of v024 and v001 (in Stata this would be "egen v001r=group(v024 v001)"). Then replace v001 with v001r and save with a different filename. Run the rates program on this file. Please let us know whether this does or does not work.
|
|
|