Вы находитесь на странице: 1из 6

___ ____ ____ ____ ____ (R)

/__
/
____/
/
____/
___/
/
/___/
/
/___/
12.0
Statistics/Data Analysis
Special Edition

Copyright 1985-2011 StataCorp LP


StataCorp
4905 Lakeway Drive
College Station, Texas 77845 USA
800-STATA-PC
http://www.stata.com
979-696-4600
stata@stata.com
979-696-4601 (fax)

Single-user Stata network perpetual license:


Serial number: 93611859953
Licensed to: Hafidha
Private
Notes:
1.

(/v# option or -set maxvar-) 5000 maximum variables

. use "C:\data\fika.dta", clear

UJI INDEPENDENSI
. tab frek kebiasaan, exp all exact
+--------------------+
| Key
|
|--------------------|
|
frequency
|
| expected frequency |
+--------------------+
Enumerating sample-space
stage 4: enumerations =
stage 3: enumerations =
stage 2: enumerations =
stage 1: enumerations =

combinations:
1
84
4263
0

|
kebiasaan
frek |
0
1
2
3 |
Total
-----------+--------------------------------------------+---------0 |
33
0
0
0 |
33
|
13.6
12.8
4.1
2.5 |
33.0
-----------+--------------------------------------------+---------1 |
0
10
4
3 |
17
|
7.0
6.6
2.1
1.3 |
17.0
-----------+--------------------------------------------+---------2 |
0
6
1
0 |
7
|
2.9
2.7
0.9
0.5 |
7.0
-----------+--------------------------------------------+---------3 |
0
15
5
3 |
23
|
9.5
8.9
2.9
1.7 |
23.0
-----------+--------------------------------------------+---------Total |
33
31
10
6 |
80
|
33.0
31.0
10.0
6.0 |
80.0
Pearson chi2(9)
likelihood-ratio chi2(9)
Cramr's V
gamma
Kendall's tau-b
Fisher's exact

. tab frek

= 83.3417
= 111.2524
=
0.5893
=
0.8089
=
0.7043
=

Pr = 0.000
Pr = 0.000
ASE = 0.064
ASE = 0.064
0.000

timing, exp all exact

+--------------------+
| Key
|
|--------------------|
|
frequency
|
| expected frequency |
+--------------------+

Enumerating sample-space
stage 4: enumerations =
stage 3: enumerations =
stage 2: enumerations =
stage 1: enumerations =

combinations:
1
36
516
0

|
timing
frek |
0
1
2 |
Total
-----------+---------------------------------+---------0 |
33
0
0 |
33
|
13.6
6.6
12.8 |
33.0
-----------+---------------------------------+---------1 |
0
7
10 |
17
|
7.0
3.4
6.6 |
17.0
-----------+---------------------------------+---------2 |
0
1
6 |
7
|
2.9
1.4
2.7 |
7.0
-----------+---------------------------------+---------3 |
0
8
15 |
23
|
9.5
4.6
8.9 |
23.0
-----------+---------------------------------+---------Total |
33
16
31 |
80
|
33.0
16.0
31.0 |
80.0
Pearson chi2(6)
likelihood-ratio chi2(6)
Cramr's V
gamma
Kendall's tau-b
Fisher's exact

. tab frek

= 82.7367
= 110.2281
=
0.7191
=
0.8509
=
0.7385
=

Pr = 0.000
Pr = 0.000
ASE = 0.053
ASE = 0.059
0.000

durasi, exp all exact

+--------------------+
| Key
|
|--------------------|
|
frequency
|
| expected frequency |
+--------------------+
Enumerating sample-space
stage 6: enumerations =
stage 5: enumerations =
stage 4: enumerations =
stage 3: enumerations =
stage 2: enumerations =
stage 1: enumerations =

combinations:
1
4
271
13270
76895
0

|
durasi
frek |
0
1
2
3
4
5 |
Total
-----------+------------------------------------------------------------------+---------0 |
33
0
0
0
0
0 |
33
|
13.6
2.5
0.4
3.3
4.1
9.1 |
33.0
-----------+------------------------------------------------------------------+---------1 |
0
3
0
2
5
7 |
17
|
7.0
1.3
0.2
1.7
2.1
4.7 |
17.0
-----------+------------------------------------------------------------------+---------2 |
0
1
0
1
1
4 |
7
|
2.9
0.5
0.1
0.7
0.9
1.9 |
7.0
-----------+------------------------------------------------------------------+---------3 |
0
2
1
5
4
11 |
23
|
9.5
1.7
0.3
2.3
2.9
6.3 |
23.0
-----------+------------------------------------------------------------------+---------Total |
33
6
1
8
10
22 |
80
|
33.0
6.0
1.0
8.0
10.0
22.0 |
80.0
Pearson chi2(15)
likelihood-ratio chi2(15)
Cramr's V
gamma
Kendall's tau-b
Fisher's exact

= 85.8080
= 112.2230
=
0.5979
=
0.7798
=
0.6934
=

Pr = 0.000
Pr = 0.000
ASE = 0.060
ASE = 0.063
0.000

. tab kebiasaan

timing, exp all exact

+--------------------+
| Key
|
|--------------------|
|
frequency
|
| expected frequency |
+--------------------+
Enumerating sample-space
stage 4: enumerations =
stage 3: enumerations =
stage 2: enumerations =
stage 1: enumerations =

combinations:
1
1
1
0

|
timing
kebiasaan |
0
1
2 |
Total
-----------+---------------------------------+---------0 |
33
0
0 |
33
|
13.6
6.6
12.8 |
33.0
-----------+---------------------------------+---------1 |
0
0
31 |
31
|
12.8
6.2
12.0 |
31.0
-----------+---------------------------------+---------2 |
0
10
0 |
10
|
4.1
2.0
3.9 |
10.0
-----------+---------------------------------+---------3 |
0
6
0 |
6
|
2.5
1.2
2.3 |
6.0
-----------+---------------------------------+---------Total |
33
16
31 |
80
|
33.0
16.0
31.0 |
80.0
Pearson chi2(6)
likelihood-ratio chi2(6)
Cramr's V
gamma
Kendall's tau-b
Fisher's exact

. tab kebiasaan

= 160.0000
= 168.7247
=
1.0000
=
0.5154
=
0.5080
=

Pr = 0.000
Pr = 0.000
ASE = 0.091
ASE = 0.092
0.000

durasi, exp all exact

+--------------------+
| Key
|
|--------------------|
|
frequency
|
| expected frequency |
+--------------------+
Enumerating sample-space
stage 6: enumerations =
stage 5: enumerations =
stage 4: enumerations =
stage 3: enumerations =
stage 2: enumerations =
stage 1: enumerations =

combinations:
1
4
258
8751
34516
0

|
durasi
kebiasaan |
0
1
2
3
4
5 |
Total
-----------+------------------------------------------------------------------+---------0 |
33
0
0
0
0
0 |
33
|
13.6
2.5
0.4
3.3
4.1
9.1 |
33.0
-----------+------------------------------------------------------------------+---------1 |
0
6
1
5
7
12 |
31
|
12.8
2.3
0.4
3.1
3.9
8.5 |
31.0
-----------+------------------------------------------------------------------+---------2 |
0
0
0
2
1
7 |
10
|
4.1
0.8
0.1
1.0
1.3
2.8 |
10.0
-----------+------------------------------------------------------------------+---------3 |
0
0
0
1
2
3 |
6
|
2.5
0.5
0.1
0.6
0.8
1.6 |
6.0
-----------+------------------------------------------------------------------+---------Total |
33
6
1
8
10
22 |
80
|
33.0
6.0
1.0
8.0
10.0
22.0 |
80.0

Pearson chi2(15)
likelihood-ratio chi2(15)
Cramr's V
gamma
Kendall's tau-b
Fisher's exact

. tab timing

= 90.7384
= 116.9206
=
0.6149
=
0.8806
=
0.7683
=

Pr = 0.000
Pr = 0.000
ASE = 0.047
ASE = 0.049
0.000

durasi, exp all exact

+--------------------+
| Key
|
|--------------------|
|
frequency
|
| expected frequency |
+--------------------+
Enumerating sample-space
stage 6: enumerations =
stage 5: enumerations =
stage 4: enumerations =
stage 3: enumerations =
stage 2: enumerations =
stage 1: enumerations =

combinations:
1
3
72
1305
4045
0

|
durasi
timing |
0
1
2
3
4
5 |
Total
-----------+------------------------------------------------------------------+---------0 |
33
0
0
0
0
0 |
33
|
13.6
2.5
0.4
3.3
4.1
9.1 |
33.0
-----------+------------------------------------------------------------------+---------1 |
0
0
0
3
3
10 |
16
|
6.6
1.2
0.2
1.6
2.0
4.4 |
16.0
-----------+------------------------------------------------------------------+---------2 |
0
6
1
5
7
12 |
31
|
12.8
2.3
0.4
3.1
3.9
8.5 |
31.0
-----------+------------------------------------------------------------------+---------Total |
33
6
1
8
10
22 |
80
|
33.0
6.0
1.0
8.0
10.0
22.0 |
80.0
Pearson chi2(10)
likelihood-ratio chi2(10)
Cramr's V
gamma
Kendall's tau-b
Fisher's exact

= 88.5180
= 115.6060
=
0.7438
=
0.7388
=
0.6420
=

Pr = 0.000
Pr = 0.000
ASE = 0.068
ASE = 0.069
0.000

ANALISIS UNIVARIAT
. xi: clogit case_dbd i.frek, group(id_match) or
i.frek
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration

_Ifrek_0-3
0:
1:
2:
3:
4:
5:
6:
7:
8:

log
log
log
log
log
log
log
log
log

likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood

(naturally coded; _Ifrek_0 omitted)


=
=
=
=
=
=
=
=
=

-24.253167
-17.857681
-17.645093
-17.642848
-17.642424
-17.64233
-17.642308
-17.642303
-17.642302

Conditional (fixed-effects) logistic regression


Log likelihood = -17.642302

Number of obs
LR chi2(3)
Prob > chi2
Pseudo R2

=
=
=
=

80
20.17
0.0002
0.3637

-----------------------------------------------------------------------------case_dbd | Odds Ratio


Std. Err.
z
P>|z|
[95% Conf. Interval]
-------------+---------------------------------------------------------------_Ifrek_1 |
.1862933
.1620891
-1.93
0.053
.0338523
1.025195
_Ifrek_2 |
4.53e-09
.000017
-0.01
0.996
0
.
_Ifrek_3 |
.1183504
.0992388
-2.55
0.011
.0228783
.6122323
------------------------------------------------------------------------------

. xi: clogit case_dbd i.kebiasaan, group(id_match) or


i.kebiasaan
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration

0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:

_Ikebiasaan_0-3
log
log
log
log
log
log
log
log
log
log
log
log

likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood

=
=
=
=
=
=
=
=
=
=
=
=

(naturally coded; _Ikebiasaan_0 omitted)

-26.314408
-16.565895
-15.723729
-15.634734
-15.617396
-15.613846
-15.612973
-15.61279
-15.612752
-15.612743
-15.612741
-15.61274

Conditional (fixed-effects) logistic regression


Log likelihood =

-15.61274

Number of obs
LR chi2(3)
Prob > chi2
Pseudo R2

=
=
=
=

80
24.23
0.0000
0.4369

------------------------------------------------------------------------------case_dbd | Odds Ratio


Std. Err.
z
P>|z|
[95% Conf. Interval]
--------------+---------------------------------------------------------------_Ikebiasaan_1 |
.2222605
.1737395
-1.92
0.054
.0480268
1.028586
_Ikebiasaan_2 |
3.43e-09
.000012
-0.01
0.996
0
.
_Ikebiasaan_3 |
3.43e-09
.0000293
-0.00
0.998
0
.
-------------------------------------------------------------------------------

. xi: clogit case_dbd


i.timing
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration

i.timing, group(id_match) or

_Itiming_0-2
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:

log
log
log
log
log
log
log
log
log
log

likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood

=
=
=
=
=
=
=
=
=
=

(naturally coded; _Itiming_0 omitted)


-16.159846
-15.690357
-15.623022
-15.614561
-15.613168
-15.612833
-15.61276
-15.612743
-15.612741
-15.61274

Conditional (fixed-effects) logistic regression


Log likelihood =

-15.61274

Number of obs
LR chi2(2)
Prob > chi2
Pseudo R2

=
=
=
=

80
24.23
0.0000
0.4369

-----------------------------------------------------------------------------case_dbd | Odds Ratio


Std. Err.
z
P>|z|
[95% Conf. Interval]
-------------+---------------------------------------------------------------_Itiming_1 |
1.91e-09
8.25e-06
-0.00
0.996
0
.
_Itiming_2 |
.2221842
.1736988
-1.92
0.054
.0480023
1.028405
------------------------------------------------------------------------------

. xi: clogit case_dbd


i.durasi
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration

i.durasi, group(id_match) or

_Idurasi_0-5
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:

log
log
log
log
log
log
log
log
log
log
log
log
log

likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood

=
=
=
=
=
=
=
=
=
=
=
=
=

(naturally coded; _Idurasi_0 omitted)


-13.300041
-10.671574
-9.8885099
-9.6672773
-9.6153721
-9.6061335
-9.6040321
-9.6035166
-9.6034119
-9.6033896
-9.6033845
-9.6033833
-9.603383

Conditional (fixed-effects) logistic regression


Log likelihood =

-9.603383

Number of obs
LR chi2(5)
Prob > chi2
Pseudo R2

=
=
=
=

80
36.25
0.0000
0.6536

-----------------------------------------------------------------------------case_dbd | Odds Ratio


Std. Err.
z
P>|z|
[95% Conf. Interval]
-------------+---------------------------------------------------------------_Idurasi_1 |
2.07e-09
.0000243
-0.00
0.999
0
.
_Idurasi_2 |
1.56e-16
2.23e-11
-0.00
1.000
0
.
_Idurasi_3 |
.666505
.6084478
-0.44
0.657
.1113647
3.988957
_Idurasi_4 |
1.19e-17
2.11e-13
-0.00
0.998
0
.
_Idurasi_5 |
7.85e-27
1.95e-22
-0.00
0.998
0
.
------------------------------------------------------------------------------

ANALISIS MULTIVARIAT
. xi: clogit case_dbd i.frek i.kebiasaan i.timing, group(id_match) or
i.frek
_Ifrek_0-3
(naturally coded; _Ifrek_0 omitted)
i.kebiasaan
_Ikebiasaan_0-3
(naturally coded; _Ikebiasaan_0 omitted)
i.timing
_Itiming_0-2
(naturally coded; _Itiming_0 omitted)
note: _Ikebiasaan_3 omitted because of collinearity
note: _Itiming_1 omitted because of collinearity
note: _Itiming_2 omitted because of collinearity
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration

0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:

log
log
log
log
log
log
log
log
log
log
log
log

likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood
likelihood

=
=
=
=
=
=
=
=
=
=
=
=

-28.961713
-15.464245
-13.852717
-13.531761
-13.470935
-13.456488
-13.45412
-13.453551
-13.453427
-13.453399
-13.453394
-13.453394

Conditional (fixed-effects) logistic regression


Log likelihood = -13.453394

Number of obs
LR chi2(5)
Prob > chi2
Pseudo R2

=
=
=
=

80
28.54
0.0000
0.5148

------------------------------------------------------------------------------case_dbd | Odds Ratio


Std. Err.
z
P>|z|
[95% Conf. Interval]
--------------+---------------------------------------------------------------_Ifrek_1 |
1.81e-09
.0000247
-0.00
0.999
0
.
_Ifrek_2 |
1.21e-18
2.80e-14
-0.00
0.999
0
.
_Ifrek_3 |
1.19e-09
.0000162
-0.00
0.999
0
.
_Ikebiasaan_1 |
3.62e+08
4.93e+12
0.00
0.999
0
.
_Ikebiasaan_2 |
4.914913
69083.83
0.00
1.000
0
.
_Ikebiasaan_3 |
1 (omitted)
_Itiming_1 |
1 (omitted)
_Itiming_2 |
1 (omitted)
-------------------------------------------------------------------------------