DHSRates R Standard Errors [message #28407] |
Fri, 29 December 2023 14:09 |
Anne Huercanos
Messages: 4 Registered: November 2023
|
Member |
|
|
Hello,
I am working with the R package DHS rates to produce subnational TFR estimates for several countries. The program seems to work for some countries, but not for others. For all regions in all countries, it produces TFR estimates, but it only produces SEs for some regions.
For example, using Benin 2017-18:
library(DHS.rates)
df <- read.dta("BJIR71FL.dta", convert.factors = FALSE)
df.subnat <- fert(df,Indicator="tfr", JK="Yes", Period= 36, Class="v024")
produces TFR estimates for all 12 regions, yet it only produces a SE for the first region. For all other regions, it produces a SE of 0. The same is true for a number of countries.
By contrast, it produces TFR estimates and SEs for all regions for the Rwanda 2019-20 data (and for some other countries). There seems to be no obvious reason or pattern between the countries for which it works and the countries for which it doesn't.
Please help,
Anne
|
|
|
|
|
Re: DHSRates R Standard Errors [message #28440 is a reply to message #28416] |
Mon, 08 January 2024 10:29 |
Janet-DHS
Messages: 891 Registered: April 2022
|
Senior Member |
|
|
Following is a response from DHS staff member, Tom Pullum:
I am sorry, but DHS staff cannot help with this issue, at least not quickly. This program was written by Mahmoud Elkasabi, who left DHS more than two years ago. The other fertility rates programs that we have posted on GitHub do not include the calculation of standard errors. I expect that they will eventually be updated to include standard errors, but not soon.
Your 3-step approach (which would be followed by taking the square root of the sum) has two problems with it. The first is that it ignores the covariances among the asfrs, and they can be non-negligible. The second issue is that the procedure should be on the scale of the logs of the rates.
|
|
|