The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Fertility » R code for TFR estimation -SAE perspective (small area estimation at sub-county level )
R code for TFR estimation -SAE perspective [message #24732] Wed, 29 June 2022 10:18 Go to previous message
DIO is currently offline  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?
 
Read Message
Read Message
Previous Topic: Informed Choice (Method Information Index)
Next Topic: Proximate Determinants of Fertility, Nigeria: Stata Syntax
Goto Forum:
  


Current Time: Wed Dec 4 21:49:57 Coordinated Universal Time 2024