Home » Topics » Nutrition and Anthropometry » calculation of exclusive breastfeeding
Re: calculation of exclusive breastfeeding [message #8761 is a reply to message #8221] |
Mon, 14 December 2015 11:44 |
Lupe
Messages: 11 Registered: June 2013 Location: Lima
|
Member |
|
|
Hello
I just do it, it was hard.
*LACTANCIA MATERNA EXCLUSICA MENORES DE 6 MESES
*Ubicando la carpeta donde se trabajara
cd "C:\Users\lvidal\Documents\ENDES\endes 2014\bases stata14"
******************************************
*ORDENANDO LOS ARCHIVOS DE DATOS
*Abrir archivo con información del hogar de la base REC0111 (95var)
use REC0111, clear
sort CASEID
save REC0111_tmp, replace
*Abrir archivo con información de reproductivo historia de nacimientos REC21 (19)
use REC21, clear
sort CASEID BIDX
rename BIDX MIDX
save REC21_tmp, replace
*Abrir archivo con información de STI, AIDS, CPN, know Violencia Dome REC91 (318)
use REC91, clear
sort CASEID
save REC91_tmp, replace
*Abrir archivo con información de maternidad REC41 (146)
use REC41, clear
sort CASEID MIDX
save REC41_tmp, replace
*UNIENDO LOS ARCHIVOS
merge m:1 CASEID MIDX using REC21_tmp.dta
keep if _merge==3
drop _merge
save REC41_tmp, replace
tab MIDX, mis
tab M4, mis
***SELECCIONAR LOS QUE VIVEN CON LAS MADRES
*La preg 211 ahora me gustaria conversar acerca de todos sus hijos e hijas
*La pregunta en el cuestionario es si vive con ud
*B9=child lives with whom renpondent=0 live elsewhere=4
tab B9
*selecionar solo a los que viven con sus madres
keep if B9==0
*se elimino 277 observaciones
*usando el valor minimo de MIDX=el valor minimo del indice de la historia de nacimiento
collapse (min) MIDX, by(CASEID)
*guardamos el nuevo archivo
save aggr, replace
tab MIDX
use aggr, replace
*unimos al archivo pre_natal_post
merge m:1 CASEID MIDX using REC41_tmp.dta
keep if _merge==3
drop _merge
*ordenamos y guardamos el archivo con el mismo nombre
sort CASEID
save REC41_tmp, replace
tab M4
tab MIDX
*Cargamos el archivo con información de lactancia y salud del niño REC42 ordenamos y guardamos
use REC42,replace
sort CASEID
*Unimos al archivo caracthogar
merge m:1 CASEID using REC0111_tmp.dta
keep if _merge==3
drop _merge
tab V401, mis
*unimos el archivo pre_natal_post
merge m:1 CASEID using REC41_tmp.dta
tab V401, mis
*keep if _merge==3
drop _merge
*igual en spss
*unimo el archivo cpn_its_violen
merge 1:1 CASEID using REC91_tmp.dta
keep if _merge==3
drop _merge
tab V401, mis
*guardar el archivo final que llameremos lactancia
save REC42_tmp, replace
************************************************************ ******************
*Estableciendo el tipo de muestra
*estableciendo los pesos
gen peso=v005/1000000
*cambiando la provincia del Callao por departamento de Lima
recode V024 (7=15)
*para sacar los valores igual a spsss se utiliza el comando
table V024 [pweight = peso]
************************************************************ ******************
*GENERANDO LA VARIABLE LACTANCIA
*recodificando la variable M4=duración de la lactancia del niño en meses
*M4:
tab M4
*con este comando salen los mismos valores del spss
table M4 [pweight = peso]
*94 Never breastfed
*95 Still breastfeeding
*98 DK
gen lacta=.
replace lacta=1 if M4!=. & M4<=94
replace lacta=2 if M4!=. & M4==95
table lacta, mis
*para sacar los valores igual a spsss se utiliza el comando
table lacta [pweight = peso]
*Incluyendo las variables de consumo de alimentos
foreach x of varlist V409-V414U {
replace lacta =1 if `x'==1 & `x'!=.
}
table lacta [pweight = peso]
label define lacta 1 "No lacta,lacta y otro alim" 2 "Solo lacta"
label values lacta lacta
************************************************************ ******************
*GENRANDO LA VARIABLE LACTANCIA EXCLUSIVA
*Generando la edad
gen edadm=V008-B3
recode edadm (0/3=1 "0a3 meses") ( 4/5=2 "4a5 meses") if edadm<6 , gen(EDAD2)
recode edadm (0/6=1 "0a6 meses") if edadm<7 , gen(EDAD_0a6)
*para sacar los valores igual a spsss se utiliza el comando
table EDAD2 [pweight = peso]
table EDAD_0a6 [pweight = peso]
*generando la variable lactancia exclusiva
gen lacta_xcl=.
replace lacta_xcl=2 if edadm<36 & lacta==1
replace lacta_xcl=1 if edadm<36 & lacta==2
label define lacta_xcl 1"Solo lacta y tiene 0-6m" 2 "No lacta exclusivamente o > 6m"
label values lacta_xcl lacta_xcl
table lacta_xcl [pweight = peso]
************************************************************ ******************
svyset V001 [pw=peso], strata(V022)
*Lactancia materna exclusiva a nivel nacional en <6m
svy: tabulate lacta_xcl if edadm<6
*Lactancia matenar exclusica a nivel urbano y rural en <6m
svy: tabulate V025 lacta_xcl if edadm<6, row
*Lactancia matenar exclusica en regiones en <6m
svy: tabulate sregion lacta_xcl if edadm<6, row
*Lactancia matenar exclusica en pobreza en <6m
svy: tabulate V190 lacta_xcl if edadm<6, row
*Lactancia matenar exclusica por departamento en <6m
svy: tabulate V024 lacta_xcl if edadm<6, row
|
|
|
|
|
calculation of exclusive breastfeeding
By: Shree on Fri, 07 June 2013 08:55
|
|
|
Re: calculation of exclusive breastfeeding
By: Liz-DHS on Tue, 25 June 2013 10:42
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
Re: calculation of exclusive breastfeeding
By: thebull on Wed, 24 September 2014 19:06
|
|
|
Re: calculation of exclusive breastfeeding
By: Liz-DHS on Thu, 25 September 2014 09:37
|
|
|
Re: calculation of exclusive breastfeeding
By: Shek on Thu, 27 November 2014 21:43
|
|
|
Re: calculation of exclusive breastfeeding
By: Shek on Thu, 27 November 2014 21:44
|
|
|
Re: calculation of exclusive breastfeeding
By: Liz-DHS on Thu, 29 January 2015 12:19
|
|
|
Re: calculation of exclusive breastfeeding
By: danafer on Thu, 17 September 2015 10:09
|
|
|
Re: calculation of exclusive breastfeeding
By: Lupe on Mon, 14 December 2015 11:44
|
|
|
Re: calculation of exclusive breastfeeding
By: tony on Mon, 22 February 2016 10:41
|
|
|
Re: calculation of exclusive breastfeeding
By: Lupe on Tue, 23 February 2016 08:15
|
|
|
Re: calculation of exclusive breastfeeding
By: tony on Tue, 23 February 2016 09:43
|
|
|
Re: calculation of exclusive breastfeeding
By: tony on Sat, 27 February 2016 09:51
|
|
|
Re: calculation of exclusive breastfeeding
By: tony on Sat, 27 February 2016 14:27
|
|
|
Re: calculation of exclusive breastfeeding
By: shyam on Fri, 04 February 2022 08:50
|
|
|
Re: calculation of exclusive breastfeeding
By: Mon lay on Thu, 25 November 2021 03:53
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
calculation of exclusive breastfeeding
By: anuth on Sat, 30 January 2016 11:27
|
|
|
Re: calculation of exclusive breastfeeding
By: Liz-DHS on Wed, 10 February 2016 15:03
|
|
|
Re: calculation of exclusive breastfeeding
By: Lupe on Wed, 10 February 2016 15:41
|
|
|
Re: calculation of exclusive breastfeeding
By: Putri on Sat, 12 March 2016 11:37
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
Re: calculation of exclusive breastfeeding
By: Lupe on Wed, 30 March 2016 12:59
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
Re: calculation of exclusive breastfeeding
By: anuth on Tue, 08 November 2016 11:14
|
|
|
Re: calculation of exclusive breastfeeding
By: Lupe on Tue, 08 November 2016 11:53
|
|
|
Re: calculation of exclusive breastfeeding
By: anuth on Tue, 08 November 2016 13:29
|
|
|
Re: calculation of exclusive breastfeeding
By: Roselync on Sun, 18 December 2016 06:28
|
|
|
Re: calculation of exclusive breastfeeding
By: Sajhama on Wed, 25 October 2017 14:29
|
|
|
Re: calculation of exclusive breastfeeding
By: Lupe on Thu, 26 October 2017 11:25
|
|
|
Re: calculation of exclusive breastfeeding
By: Sajhama on Thu, 26 October 2017 11:48
|
|
|
Re: calculation of exclusive breastfeeding
By: haseena on Fri, 05 February 2021 14:46
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
Re: calculation of exclusive breastfeeding
By: Lupe on Sat, 06 February 2021 02:58
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
Re: calculation of exclusive breastfeeding
|
|
|
Re: calculation of exclusive breastfeeding
By: Roselync on Sun, 18 December 2016 19:14
|
|
|
Re: calculation of exclusive breastfeeding
By: Roselync on Sun, 18 December 2016 19:20
|
|
|
Re: calculation of exclusive breastfeeding
|
Goto Forum:
Current Time: Tue Nov 26 02:12:42 Coordinated Universal Time 2024
|