You are on page 1of 10

Bautista, Shane Valerie G.

Tigno, Shalimar O.

1. Determine the number of variables of bioman coded.xls


. display c(k)
11

2. Label the following variables


 Barangay
 Sex
 Cs
 Educ
 Diabetes

. label define Barangay 1 "Ipil" 2 "Bayog"

. label define Sex 1 "Male" 2 "Female"

. label define Cs 1 "Single" 2 "Married" 3 "Widow" 4


"Separated"

. label define Educ 1 "Elementary" 2 "High School" 3


"Vocational" 4 "College"

. label define Diabetes 0 "Negative" 1 "Positive"

. label values Barangay Barangay

. label values Sex Sex

. label values Cs Cs

. label values Educ Educ

. label values Diabetes Diabetes

3. Cross tabulate sex with diabetes status.

. tabulate Diabetes Sex

4. Output the summary stat for all quantitative variables


. su
Bautista, Shane Valerie G.
Tigno, Shalimar O.

5. Output the summary stat for all quantitative variables by sex.


. bysort Sex :su

6. Determine the BMI of the respondents.


. gen bmi=.
Bautista, Shane Valerie G.
Tigno, Shalimar O.

(101 missing values generated)

. replace bmi= (w/(ht/100)^2)


(101 real changes made)

bmi
27.99
036
24.99
408
21.33
307
15.62
5
23.52
711
21.36
558
24.09
297
18.54
797
19.20
117
16.28
402
21.08
281
26.43
807
20.50
014
14.70
538
26.64
36
18.40
323
18.92
915
20.95
281
25.19
033
23.68
641
19.20
117
24.08
822
Bautista, Shane Valerie G.
Tigno, Shalimar O.

17.61
252
24.31
976
19.36
247
22.45
595
22.26
563
22.75
694
16.44
459
21.10
727
25.71
166
45.55
304
24.84
098
21.08
281
26.00
906
27.55
724
25.30
63
19.55
353
20.12
364
25.79
957
24.03
441
20.71
569
22.81
949
31.04
078
20.30
659
18.01
721
25.96
454
Bautista, Shane Valerie G.
Tigno, Shalimar O.

23.30
905
23.78
433
22.31
328
20.96
246
22.78
957
21.06
96
28.69
605
24.12
175
20.77
552
23.40
232
19.50
351
23.26
596
20.82
84
16.33
17
16.21
771
21.89
294
23.70
943
31.04
078
28.21
869
16.52
809
20.46
335
27.29
322
26.63
496
23.55
556
19.81
784
Bautista, Shane Valerie G.
Tigno, Shalimar O.

21.50
447
25.22
15
26.08
732
23.46
161
23.21
956
19.34
964
18.91
965
24.23
243
25.09
853
19.36
85
16.69
623
25.15
651
22.62
136
30.94
585
26.65
95
23.24
143
21.77
778
24.82
045
23.04
96
21.64
412
25.21
59
16.23
309
24.99
37
19.50
06
21.50
447
Bautista, Shane Valerie G.
Tigno, Shalimar O.

24.08
925
23.22
124
28.61
7
21.77
778

7. Categorize the respondents in obesity status.


. egen bmicat = cut(bmi), at(0, 18.5, 25, 30, 100) icodes

. label define bmicat 0 "Underweight" 1 "Normal" 2 "Overweight" 3


"Obese"

. label values bmicat bmicat

bmicat
Overwei
ght
Normal
Normal
Underwe
ight
Normal
Normal
Normal
Normal
Normal
Underwe
ight
Normal
Overwei
ght
Normal
Underwe
ight
Overwei
ght
Underwe
ight
Normal
Normal
Overwei
ght
Normal
Normal
Bautista, Shane Valerie G.
Tigno, Shalimar O.

Normal
Underwe
ight
Normal
Normal
Normal
Normal
Normal
Underwe
ight
Normal
Overwei
ght
Obese
Normal
Normal
Overwei
ght
Overwei
ght
Overwei
ght
Normal
Normal
Overwei
ght
Normal
Normal
Normal
Obese
Normal
Underwe
ight
Overwei
ght
Normal
Normal
Normal
Normal
Normal
Normal
Overwei
ght
Normal
Normal
Normal
Bautista, Shane Valerie G.
Tigno, Shalimar O.

Normal
Normal
Normal
Underwe
ight
Underwe
ight
Normal
Normal
Obese
Overwei
ght
Underwe
ight
Normal
Overwei
ght
Overwei
ght
Normal
Normal
Normal
Overwei
ght
Overwei
ght
Normal
Normal
Normal
Normal
Normal
Overwei
ght
Normal
Underwe
ight
Overwei
ght
Normal
Obese
Overwei
ght
Normal
Normal
Normal
Normal
Bautista, Shane Valerie G.
Tigno, Shalimar O.

Normal
Overwei
ght
Underwe
ight
Normal
Normal
Normal
Normal
Normal
Overwei
ght
Normal

You might also like