The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » calculation of exclusive breastfeeding
Re: calculation of exclusive breastfeeding [message #13347 is a reply to message #13342] Thu, 26 October 2017 11:25 Go to previous messageGo to previous message
Lupe is currently offline  Lupe
Messages: 11
Registered: June 2013
Location: Lima
Member
Dear Sanjhama

I send the sintax in spss:

1.3. LACTANCIA EXCLUSIVA EN MENORES DE 6 MESES
* INDICADOR:.
******************
* LACTANCIA EXCLUSIVA EN MENORES DE 6 MESES.
* NOTAS:.
******************
* Ruta donde se encuentran los archivos.
* C:\Endes\2008\Base de datos\.
* Año: 2008.
* JUNTANDO LAS BASES DE DATOS NECESARIAS.
************************************************************ ****.
GET FILE='C:\ENDES\2008\Base de Datos\REC0111.SAV'.
sort cases by caseid (A).
SAVE OUTFILE='C:\ENDES\2008\Base de Datos\REC0111_tmp.SAV'.
GET FILE='C:\ENDES\2008\Base de Datos\REC21.SAV'.
sort cases by caseid (A) bidx (A) .
SAVE OUTFILE='C:\ENDES\2008\Base de Datos\REC21_tmp.SAV'.
GET FILE='C:\ENDES\2008\Base de Datos\REC91.SAV'.
sort cases by caseid (A) .
SAVE OUTFILE='C:\ENDES\2008\Base de Datos\REC91_tmp.SAV'.
GET FILE='C:\ENDES\2008\Base de Datos\REC41.SAV'.
sort cases by caseid (A) midx (A) .
MATCH FILES /FILE=*
/TABLE='C:\ENDES\2008\Base de Datos\REC21_tmp.SAV'
/RENAME BIDX=MIDX
/BY CASEID MIDX.
EXECUTE.
SAVE OUTFILE='C:\ENDES\2008\Base de Datos\REC41_tmp.SAV'.
* Los que viven con la madre.
FILTER OFF.
USE ALL.
SELECT IF(B9=0).
EXECUTE .
AGGREGATE
/OUTFILE='C:\ENDES\2008\Base de Datos/aggr.sav'
/BREAK=CASEID
/MIDX = MIN(MIDX).
GET FILE='C:\ENDES\2008\Base de Datos\aggr.SAV'.
MATCH FILES /FILE=*
/TABLE='C:\ENDES\2008\Base de Datos\rec41_tmp.SAV'
/BY CASEID MIDX.
EXECUTE.
SAVE OUTFILE='C:\ENDES\2008\Base de Datos\REC41_tmp.SAV'.
*Ordenamos, hacemos un merger y guardamos.
GET FILE='C:\ENDES\2008\Base de Datos\REC42.SAV'.
sort cases by caseid (A) .
MATCH FILES /FILE=*
/TABLE='C:\ENDES\2008\Base de Datos\REC0111_tmp.SAV'
/BY CASEID.
EXECUTE.
MATCH FILES /FILE=*
/TABLE='C:\ENDES\2008\Base de Datos\REC41_tmp.SAV'
/BY CASEID.
EXECUTE.
MATCH FILES /FILE=*
/TABLE='C:\ENDES\2008\Base de Datos\REC91_tmp.SAV'
/BY CASEID .
EXECUTE.
SAVE OUTFILE='C:\ENDES\2008\Base de Datos\REC42_tmp.SAV'.
* GENERANDO LAS VARIABLES USADAS EN LOS TABULADOS .
************************************************************ ********************.
*Generando el PESO para luego expandirlo.
*Utilizar la variable V005A para calcular resultados departamentales.
COMPUTE PESO=V005/1000000.
WEIGHT BY PESO.
**Recodificando la región natural.
recode sregion (4,5=4).

I hope you find it useful

Lupe Vidal
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Tanzania 2015 DHS nutritional indicators recoding
Next Topic: underweight status according to child's living arrangements
Goto Forum:
  


Current Time: Tue Nov 26 09:57:07 Coordinated Universal Time 2024