Home » Topics » Reproductive Health » Matching most recent sexual activity (women) in India_2019/21 (Matching most recent sexual activity (women) in India calculated from 2019/21 DHS survey data with that in the report of India)
Re: Matching most recent sexual activity (women) in India_2019/21 [message #25100 is a reply to message #25009] |
Wed, 31 August 2022 09:27 |
mahfuz.ru.pops@gmail.com
Messages: 16 Registered: July 2022
|
Member |
|
|
Hi Bridgette,
I ran the code exactly you gave me, but my output did not match with that you explained after the code (i don't know why). Although you suggested to use tab1 for calculating the frequencies and percentages, the tabe1 was not running in presence of "iweight". For this reason I used Table for calculating the frequencies and percentages and using "iweight". My entire output and codes are presented in the attachement.
Wednesday August 31 14:31:18 2022 Page 1
___ ____ ____ ____ ____(R)
/__ / ____/ / ____/
___/ / /___/ / /___/
Statistics/Data Analysis
1 . gen time=6 if v536==0
(723892 missing values generated)
2 .
3 . replace time=1 if v527<107
(33603 real changes made)
4 .
5 . replace time=2 if v527>=107 & v527<128
(5277 real changes made)
6 .
7 . replace time=3 if v527>=128 & v527<400
(30185 real changes made)
8 .
9 . replace time=4 if v527>=400 & v527<998
(7422 real changes made)
10 .
11 . replace time=5 if v527==998
(6172 real changes made)
12 .
13 .
14 .
15 . label define time 1 "<1 week" 2 ">1 week, <1 month" 3 ">1 month, <1 year" 4 "1+ years" 5 "Missing" 6 "Ne
label time already defined
r(110);
16 .
17 . label values time time
18 .
19 .
20 .
21 . gen time12=0 if time<=6
(641233 missing values generated)
22 .
23 . replace time12=1 if time<=2
(38880 real changes made)
24 .
25 . label variable time12 "< 1 month"
26 .
27 .
28 .
29 . gen time123=0 if time<=6
(641233 missing values generated)
30 .
31 . replace time123=1 if time<=3
(69065 real changes made)
Wednesday August 31 14:31:32 2022 Page 2
32 .
33 . label variable time123 "< 1 year"
34 . table time [iweight=v005/1000000]
time Freq.
<1 week 32,975.4
>1 week, <1 month 5,419.79
>1 month, <1 year 31,956.7
1+ years 8,070.33
Missing 4,909.21
Never 237.8367
35 . table time12 [iweight=v005/1000000]
< 1 month Freq.
0 45,174.1
1 38,395.2
36 .
37 . table time123 [iweight=v005/1000000]
< 1 year Freq.
0 13,217.4
1 70,351.9
38 .
|
|
|
Goto Forum:
Current Time: Fri Nov 29 21:00:02 Coordinated Universal Time 2024
|