The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Geographic Data » error after svyset for higher spatial resolution
error after svyset for higher spatial resolution [message #7026] Thu, 13 August 2015 10:35 Go to next message
fabienne is currently offline  fabienne
Messages: 6
Registered: March 2015
Member
Hello everyone

I am working with DHS VI from Guinea (2012), particularly with household-level data and I use Stata for statistical analyses.

The smallest geographical frame in the data is the region (ADM-1), but I need data at higher spatial resolution (ADM-2). I have therefore reclassified the cluster location by préfécture using the GIS data. I thus now have an additional variable which identifies the préfécture for each household. The minimum number of clusters I per préfécture is 2.

My aim is to produce summary estimates of variables such as hv204 or hv207 at préfécture level.

My syntax is:
svyset hv021 [pw=weight], strata(hv022)
svy:mean hv204, over(prefecture)

However I get an error message after this command:

no observations
r(2000);

If I ignore the svy design, I get estimates for all préféctures, I suspect it must be related to the svyset command? Is it because in one préfécture I have only 2 clusters?

Or I have to adjust the weights, or the strata(hv022) or the PSU (hv021) and if yes, how would I need to change it?

Of note, the error does not occur if I use a categorical variable for tabulation (using svy: tab prefecture hv025)

Thank you very much.
Kind regards, Fabienne
Re: error after svyset for higher spatial resolution [message #7027 is a reply to message #7026] Thu, 13 August 2015 10:51 Go to previous message
fabienne is currently offline  fabienne
Messages: 6
Registered: March 2015
Member
Never mind, I found the error:

the préfécture variable (as defined in the "over()" term) must be numerical, the command will not work if it is string.

Kind regards, Fabienne
Previous Topic: Calculate driving distance from 2 map points
Next Topic: Number of Districts in DHS Pakistan
Goto Forum:
  


Current Time: Thu Mar 28 07:36:49 Coordinated Universal Time 2024