HIV and Child Mortality [message #18215] |
Tue, 15 October 2019 18:40 |
ericremera
Messages: 2 Registered: March 2013 Location: Kigali
|
Member |
|
|
I would like to measure the trend on child survival by mother HIV status. in Rwanda ( My Country).
I have got the analysis in attachment that did the same for 2005 and 2010. My i would like to add 2014/15 and to model child mortality.
I have used DHS.rates packages from R to measure the under five mortality for the HIV Negative mothers and HIV positive mothers each separately. This was successful for HIV negative mothers but unsuccessful for the HIV positive mothers using the code chmort () , given that some strata have only one PSU at stage 1. Surprisingly the code chmortp() runs for the HIV positive mothers.
I was able to calculate the mortality rate using the probability but i failed to get the standard error.
Kindly help me to sort this out.
Remera
|
|
|
Re: HIV and Child Mortality [message #18217 is a reply to message #18215] |
Wed, 16 October 2019 04:00 |
ericremera
Messages: 2 Registered: March 2013 Location: Kigali
|
Member |
|
|
Hi Again
I have tried to combine the stratum but i got another message that i should specify my data as nest=TRUE ( Error in svydesign.default(id = ~v021, strata = ~v022, weights = ~rweight, :Clusters not nested in strata at top level; you may want nest=TRUE.).
i have run the following conde : "dhsrw <- svydesign(id=~v021, strat=~v022, weight=~v005, data=rw2005pos, nest=TRUE) but unfortunately i'm getting another message that could not find function "svydesign".
Any one to help ?
Remera
|
|
|
Re: HIV and Child Mortality [message #18218 is a reply to message #18215] |
Wed, 16 October 2019 10:37 |
Liz-DHS
Messages: 1516 Registered: February 2013
|
Senior Member |
|
|
A response from Dr. Mahmoud Elkasabi:
Quote:Dear Eric,
The error is coming from a single PSU stratum. In these situations, the R "survey" package used by DHS.rates would give you this error. Functions from the survey package are used in developing the "chmort" but not in the "chmortp". This is why you did not see the problem in the chmortp function. The good news is that the error message indicated which stratum had this issue. A quick solution for this problem would be to combine stratum one with another stratum, let's say stratum 2. I assume both are in the same region, one is urban and the other is rural. Once you do this you will get rid of the single psu stratum and the code should work properly.
Best wishes,
Mahmoud
|
|
|