Beruflich Dokumente
Kultur Dokumente
4
ก
ก!ก!"
ก
4 ก
!"# ก$ก$#% &'#()
) #*#
ก+)#"
1. ก
.%
!"#/)0* summarize
2. ก$ก$#%/)0* tab1
3. ก$ก$#%#.#/)0* tab2
1.1
+@ 0 .+0#A +.#.B) C.B) age, sysbp, diasbp, chol
1.
stata command M
MC.# 1. M! ก$ก+0$C
clear [Enter]
2. *. Click
File/Open 2. M!W)(U *! ex4_1.dta $ก()
look in: !ก C:\data C:\data
File Name: !ก(U ex4_1
*.
ก.
BV OK
3.
stata command M
MC.# 3. ก++@ 0 .+0#A
summarize age sysbp diasbp [Enter] +.#.B) C.B) age, sysbp, diasbp
!*
-Statistics/Summaried, tables & tests M dialog box summarize-Summary statistics
/tables/Multiple one-way tables
26
a ก
() /)0* summarize @M+@ 0 (mean) .+0#-
A (Std. Dev.) +C.B) (min) +.#.B) (max)
+"!#ก+.%
!"#
!f B ,detail #C.# summarize
กE
FG"H ! !ก Statistics/Summaried, tables & tests/Summary
statistics/summary statistics/ M dialog box summarize !ก.g$
!ก display additional statistics
age
-------------------------------------------------------------
Percentiles Smallest
1% 31 24
5% 37 27
10% 40 28 Obs 700
25% 45 29 Sum of Wgt. 700
| occ
sex | 1 2 3 4 | Total
-----------+--------------------------------------------+----------
0 | 150 128 133 113 | 524
1 | 49 43 47 37 | 176
-----------+--------------------------------------------+----------
Total | 199 171 180 150 | 700
a ก
() /)0* tab2 .)#a @M%#
()B
+"
!#ก+!f *+0 !%B col ! row #C.#
กm* Statistics/Summaried, tables & tests/tables/Multiple one-way tables
! !ก !ก
Cell content Within column relative frequencies
Within row relative frequencies
29
. tab2 sex occ,row col
-> tabulation of sex by occ
| occ
sex | 1 2 3 4 | Total
-----------+--------------------------------------------+----------
0 | 150 128 133 113 | 524
| 28.63 24.43 25.38 21.56 | 100.00
| 75.38 74.85 73.89 75.33 | 74.86
-----------+--------------------------------------------+----------
1 | 49 43 47 37 | 176
| 27.84 24.43 26.70 21.02 | 100.00
| 24.62 25.15 26.11 24.67 | 25.14
-----------+--------------------------------------------+----------
Total | 199 171 180 150 | 700
| 28.43 24.43 25.71 21.43 | 100.00
| 100.00 100.00 100.00 100.00 | 100.00
J K
2.1 Cm+@ 0 r0A .+0#A +.#.B) C.B)
chol
chol
-------------------------------------------------------------
Percentiles Smallest
1% 181.5 85
5% 216 168
10% 235.5 173 Obs 700
25% 274 175 Sum of Wgt. 700
. tab1 coro
| coro
sex | 0 1 | Total
-----------+----------------------+----------
0 | 463 61 | 524
| 88.36 11.64 | 100.00
-----------+----------------------+----------
1 | 155 21 | 176
| 88.07 11.93 | 100.00
-----------+----------------------+----------
Total | 618 82 | 700
| 88.29 11.71 | 100.00