Forum: Fertility
|
Topic: R code for TFR estimation -SAE perspective
|
R code for TFR estimation -SAE perspective [message #24732] |
Wed, 29 June 2022 10:18 |
DIO
Messages: 2 Registered: March 2020
|
Member |
|
|
I am trying to calculate TFR in DHS.rates using Kenya DHS data 2014 with purpose of attempting further modelling in small area estimation (SAE). However I am getting the following error:
> setwd("~/scountytfr")
> library(DHS.rates)
> library(haven)
> KEIR2014sbset <- read_dta("C:/Users/DAVID/Documents/scountytfr/KEIR2014sbset.dta ")
> fert(KEIR2014sbset,Indicator = "tfr", JK = "Yes", Class="Sub_Countyn")
The current function calculated TFR based on a reference period of 36 months
The reference period ended at the time of the interview, in 2014.58 OR May - Oct 2014
The average reference period is 2013.08
Error in matrix(0, nrow = max(as.numeric(Dat$DomID)), ncol = 10) :
invalid 'nrow' value (too large or NA)
What to do?
|
|
|
Forum: India
|
Topic: Merging BR and PR data
|
Merging BR and PR data [message #24727] |
Wed, 29 June 2022 06:14 |
hvs0013
Messages: 2 Registered: April 2022
|
Member |
|
|
Hi,
I am trying to merge the PR and the BR datasets for India. I used the variables v001, v002, b16 in the BR file and hv001, hv002, hvidx in the PR file to merge the data. Furthermore, I dropped b16=0 and b16=. before the merge. However, when I try to perform the merge, some observations from the BR file do not get merged to the PR file. I understand that many observations in the PR file will not get merged to the PR file as some people born have died or are not living in the household. But I am confused regarding why some observations in the BR file will not get merged to the PR file. Thank you
|
|
|
Forum: Weighting data
|
Topic: Weight to use for regression that has children and mother level variables
|
Weight to use for regression that has children and mother level variables [message #24717] |
Mon, 27 June 2022 19:07 |
hbsheldon
Messages: 4 Registered: July 2021
|
Member |
|
|
We are intending to run a child-level regression that also uses variables from the mother. For example, our dependent variable is the weight-for-age z-score and the independent variables are a combination of child level variables (ex: was the child breastfed) and mother level variables, such as her responses to questions on decision-making involvement.
Of course, mothers have different numbers of children. The guidance seems to be that it is ok to use the women's weight, but we have doubts about this because, for example, all women in a cluster share the same weight even if they have different numbers of children. Does this woman's weight account for the number of children a woman has in any way? If not, would a child-level regression with a mother's characteristics and survey weight succumb to the problem of "double-counting" (since some mothers have 10 kids and some have only 1, for example)? If yes, what is the best way to adjust for this?
|
|
|