THỐNG KÊ MÔ TẢ MỘT BIẾN ĐỊNH TÍNHVí dụ:.. tab1 sleep anxiety -> tabulation of sleep SLEEP | Freq.. Percent Valid Cum.. MÔ TẢ 01 BIẾN KẾT CỤC PHÂN LOẠI-01 BIẾN TIÊN ĐOÁN LIÊN TỤCSử dụng
Trang 1THỐNG KÊ MÔ TẢ MỘT BIẾN ĐỊNH TÍNH
Ví dụ:
tab depress
suynhuoc | Freq Percent Cum
khong | 26 23.64 23.64
nhe | 67 60.91 84.55
trungbinh | 17 15.45 100.00
Total | 110 100.00
tab1 sleep anxiety
-> tabulation of sleep
SLEEP | Freq Percent Cum
khong | 98 87.50 87.50
co | 14 12.50 100.00
Total | 112 100.00
-> tabulation of anxiety
ANXIETY | Freq Percent Cum
khong | 9 7.96 7.96
nhe | 62 54.87 62.83
vua | 38 33.63 96.46
nang | 4 3.54 100.00
Total | 113 100.00
tab1 kids- meetings
-> tabulation of kids
Have |
children |
<19 in |
town? | Freq Percent Cum
no | 63 41.18 41.18
yes | 90 58.82 100.00
Total | 153 100.00
Trang 2-> tabulation of educ
Highest |
year school |
completed | Freq Percent Cum
6 | 1 0.65 0.65
7 | 1 0.65 1.31
8 | 6 3.92 5.23
9 | 5 3.27 8.50
10 | 3 1.96 10.46
12 | 75 49.02 59.48
13 | 10 6.54 66.01
14 | 13 8.50 74.51
15 | 8 5.23 79.74
16 | 23 15.03 94.77
17 | 2 1.31 96.08
18 | 4 2.61 98.69
20 | 2 1.31 100.00 Total | 153 100.00
-> tabulation of meetings
Attended |
meetings on |
pollution | Freq Percent Cum
no | 106 69.28 69.28 yes | 47 30.72 100.00 Total | 153 100.00
Trang 3fre sex marital polviews
sex respondents sex
| Freq Percent Valid Cum
-+ -Valid 1 male | 1228 44.41 44.41 44.41 2 female | 1537 55.59 55.59 100.00 Total | 2765 100.00 100.00
-marital -marital status
| Freq Percent Valid Cum
-+ -Valid 1 married | 1269 45.90 45.90 45.90 2 widowed | 247 8.93 8.93 54.83 3 divorced | 445 16.09 16.09 70.92 4 separated | 96 3.47 3.47 74.39 5 never married | 708 25.61 25.61 100.00 Total | 2765 100.00 100.00
-polviews think of self as liberal or conservative
| Freq Percent Valid Cum
-+ -Valid 1 extremely liberal | 47 1.70 3.53 3.53 2 liberal | 143 5.17 10.74 14.27 3 slightly liberal | 159 5.75 11.95 26.22 4 moderate | 522 18.88 39.22 65.44 5 slghtly conservative | 209 7.56 15.70 81.14 6 conservative | 210 7.59 15.78 96.92 7 extrmly conservative | 41 1.48 3.08 100.00 Total | 1331 48.14 100.00
Missing | 1434 51.86
Total | 2765 100.00
- Cột valid chính là phần tram của các giá trị trong biến không tính các giá trị missing
Trang 4graph pie, over(marital) cw sort(marital) title(Marital status of US)
never married Marital status of US
histogram marital, discrete percent gap(10) addlabel xlabel(, angle(forty_five) valuelabel)
(start=1, width=1)
Trang 58.933
16.09
3.472
25.61
0
ma rrie
d
wi do
we d
div orc
ed
se pa
rat ed
ne ve
r m arr ied
marital status
Trang 6MÔ TẢ 01 BIẾN KẾT CỤC PHÂN LOẠI-01 BIẾN TIÊN ĐOÁN LIÊN TỤC
Sử dụng bảng
tabulate behpat wghtcat, column
+ -+
| Key |
| -|
| frequency |
| column percentage |
+ -+
Behavioral | Weight Category
Pattern | < 140 140-170 170-200 > 200 | Total
A1 | 20 125 98 21 | 264
| 8.62 8.13 8.37 9.86 | 8.37
A2 | 100 612 514 99 | 1,325
| 43.10 39.79 43.89 46.48 | 42.01
B3 | 90 610 443 73 | 1,216
| 38.79 39.66 37.83 34.27 | 38.55
B4 | 22 191 116 20 | 349
| 9.48 12.42 9.91 9.39 | 11.07
Total | 232 1,538 1,171 213 | 3,154
| 100.00 100.00 100.00 100.00 | 100.00
Trước hết chúng ta phải nhóm biến tiên đoán liên tục thành biến phân loại Biến wghtcat
là biến liên tục nhưng được nhóm thành 4 nhóm.
Vì biến wghtcat là biến tiên đoán do đó chúng ta phải báo cáo phần trăm theo cột chứ không phải theo hàng.
Trang 73.6 Thống kê mô tả 01 biến phụ thuộc định tính – 01 biến độc lập định tính
tab var1 var2 Mô tả bảng 2 x2 giữa hai biến định tính Biến phụ thuộc
sẽ được đặt trước (var1) và là biến hàng, còn biến độc lập sẽ được đặt sau (var2) và sẽ là biến cột
tab var1 var2, column Option column cho phép hiện phần trăm của biến độc
lập (biến cột) Phần trăm theo biến độc lập mới quan trọng vì giúp đọc kết quả trong các phép kiểm chi bình phương.
tab2 var1 var2 var3 Tạo bảng 2x2 giữa biến var1 & var2, var1 & var3, var2
& var3
Ví dụ:
tab meetings kids, column
+ -+
| Key |
| -|
| frequency |
| column percentage |
+ -+
Attended |
meetings | Have children <19 in
on | town?
pollution | no yes | Total
no | 52 54 | 106
| 82.54 60.00 | 69.28
yes | 11 36 | 47
Trang 8| 17.46 40.00 | 30.72 Total | 63 90 | 153 | 100.00 100.00 | 100.00
Trang 9tab2 meetings gender kids
-> tabulation of meetings by gender Attended |
meetings |
on | Respondent's gender
pollution | male female | Total
no | 42 64 | 106 yes | 18 29 | 47 Total | 60 93 | 153 -> tabulation of meetings by kids
Attended |
meetings | Have children <19 in
on | town?
pollution | no yes | Total
no | 52 54 | 106 yes | 11 36 | 47 Total | 63 90 | 153 -> tabulation of gender by kids
| Have children <19 in
Respondent | town?
's gender | no yes | Total
Trang 10male | 26 34 | 60 female | 37 56 | 93 Total | 63 90 | 153
Trang 11THỐNG KÊ MÔ TẢ TỪ BA BIẾN ĐỊNH TÍNH CÙNG LÚC TRỞ LÊN
Sử dụng bảng phân phối
by contam, sort:tab meetings kids, column
-> contam = no
+ -+
| Key |
| -|
| frequency |
| column percentage |
+ -+
Attended |
meetings | Have children <19 in
on | town?
pollution | no yes | Total
no | 42 44 | 86
| 91.30 68.75 | 78.18
yes | 4 20 | 24
| 8.70 31.25 | 21.82
Total | 46 64 | 110
| 100.00 100.00 | 100.00
-> contam = yes
+ -+
| Key |
| -|
| frequency |
| column percentage |
+ -+
Attended |
meetings | Have children <19 in
on | town?
pollution | no yes | Total
no | 10 10 | 20
| 58.82 38.46 | 46.51
yes | 7 16 | 23
| 41.18 61.54 | 53.49
Total | 17 26 | 43
| 100.00 100.00 | 100.00
Trang 12by gender contam, sort:tab meetings kids, column
-> gender = male, contam = no
Attended |
meetings | Have children <19 in
on | town?
pollution | no yes | Total
no | 18 18 | 36
| 90.00 72.00 | 80.00
yes | 2 7 | 9
| 10.00 28.00 | 20.00
Total | 20 25 | 45
| 100.00 100.00 | 100.00
-> gender = male, contam = yes
Attended |
meetings | Have children <19 in
on | town?
pollution | no yes | Total
no | 3 3 | 6
| 50.00 33.33 | 40.00
yes | 3 6 | 9
| 50.00 66.67 | 60.00
Total | 6 9 | 15
| 100.00 100.00 | 100.00
-> gender = female, contam = no
+ -+
| Key |
| -|
| frequency |
| column percentage |
+ -+
Attended |
meetings | Have children <19 in
on | town?
pollution | no yes | Total
no | 24 26 | 50
| 92.31 66.67 | 76.92
yes | 2 13 | 15
| 7.69 33.33 | 23.08
Total | 26 39 | 65
| 100.00 100.00 | 100.00
-> gender = female, contam = yes
Attended |
meetings | Have children <19 in
on | town?
pollution | no yes | Total
no | 7 7 | 14
| 63.64 41.18 | 50.00
yes | 4 10 | 14
| 36.36 58.82 | 50.00
Total | 11 17 | 28
| 100.00 100.00 | 100.00
Trang 13table meetings kids contam, contents(freq)
| Believe own
| property/water
Attended | contaminated and Have
meetings | children <19 in town?
on | - no - - yes
pollution | no yes no yes
no | 42 44 10 10
yes | 4 20 7 16