Senin, 12 November 2012
FIXED, RANDOM & MIXED MODELS
Outline’s
Introduction
Single Factor Models Two Factor Models
EMS (Expected Mean Square) Rules EMS (Expected Mean Square) Rules The Pseudo-F Test
Introduction
Setiap peneliti sebelum me-running
eksperimen harus menentukan jenis
levelnya.
Introduction Fixed
Level ditentukan oleh eksperimenter.
Kesimpulan hanya berlaku untuk level yg telah ditentukan.
Tidak bisa digeneralisasi untuk populasi. Tidak bisa digeneralisasi untuk populasi. Biasanya : level terdiri dari ekstrim bawah, tengah, atas
Introduction
RANDOM
Experimenter tidak menentukan level
Kesimpulan : bisa digeneralisasi untuk populasi Kelemahan : level yang terpilih tdk
mencerminkan kondisi sebenarnya. mencerminkan kondisi sebenarnya.
Untuk kasus single faktor, perbedaannya hanya terkait dengan generalisasi kesimpulan.
Introduction MIXED
Kombinasi Fixed dan Random
Menutup kelemahan masing-masing Lebih sesuai dengan kondisi nyata Lebih sesuai dengan kondisi nyata
Single Factor Models
Model Matematika Completely Random Design ( Bab III , Hicks )
ij j
ij
Y
=
µ
+
τ
+
ε
Fix atau RandomSingle Factor Models Level jenis Fixed :
Masih INGAT CONTOH 3.1 di BAB III , Hicks halaman 50-51 ? ( resistance to abrasion )
halaman 50-51 ? ( resistance to abrasion )
Single Factor Models
ij j
ij
Y
=
µ
+
τ
+
ε
Fix atau RandomLevel jenis Fixed :
Asumsi pada Fix ( ) 0 1 1 = − =
∑
∑
= =µ
µ
τ
k j j k j jSingle Factor Models
Level jenis Fixed :
Cara Analisis ( Lihat BAB III , Hicks ) Expected Mean Square ( EMS )
EMS df Source Hipotesis j semua untuk , 0 : 0 j = H τ 2 2 ) 1 ( 1 ε τ ε σ ε φ σ τ − + − n k n k ij j
Single Factor Models Level jenis Random :
Masih INGAT CONTOH 3.2 di BAB III , Hicks halaman 65-66 ? ( quality of the incoming material )
Single Factor Models
ij j
ij
Y
=
µ
+
τ
+
ε
Fix atau RandomLevel jenis Random :
Random
NID
(
0
,
σ
2τ)
Normal and Independent Disitribution
Single Factor Models Level jenis Random :
Cara Analisis ( Lihat BAB III , Hicks ) Expected Mean Square ( EMS )
EMS df Source Hipotesis 0 : 2 0 στ = H 2 2 2 ) 1 ( 1 ε τ ε σ ε σ σ τ − + − n k n k ij j
Two Factor Models
Model Matematika ( Bab VI , Hicks , hal. 159-160 )
AB
B
A
Y
ij=
µ
+
i+
j+
ij+
ε
(k)ijn
k
b
j
a
i
=
1
,
2
,..,
=
1
,
2
,....,
=
1
,
2
,...,
Expected Mean Square (EMS)
Penting untuk eksperimen yg kompleks (ex : random, mixed).
EMS untuk menguji signifikasi suatu faktor (melakukan uji pseudo-F ).
(melakukan uji pseudo-F ).
EMS berfungsi sebagai denominator (pembagi) dalam uji pseudo-F
Langkah-Langkah Merumuskan EMS
1. Tulis sumber variasi pd kolom paling kiri.
2. Tulis indeks sbg judul kolom (i,j,k), diatas indeks
ditulis jenis levelnya ( F u / fixed, & R u / Random), diatasnya lagi tulis masing-masing jumlah levelnya (di atas I,j) dan jumlah replikasi (diatas K).
diatasnya lagi tulis masing-masing jumlah levelnya (di atas I,j) dan jumlah replikasi (diatas K).
3. Tulis (kopi )jumlah level ke dalam tabel. Syarat :
jumlah level tdk boleh muncul di baris yang ada
indeks bersangkutan. Di kolom k, ditulis replikasinya saja.
Langkah-Langkah Merumuskan EMS
4.Tulis angka 1 pada baris dimana indeks ditulis dalam tanda “ ( )”.
5. Isi sel yg lain dgn angka 0 & 1. Angka 0 u/ jika level pd kolom tsb fixed, dan angka 1 jika levelnya random.
Langkah-Langkah Merumuskan EMS
6. Rumus EMS :
a. EMS dihitung baris demi baris.
b. Tutup kolom, jk indeks kolom muncul pd baris yg
sedang dicari.
c. Kalikan angka-angka yg ada. Akan mjd koef. Pd rumus c. Kalikan angka-angka yg ada. Akan mjd koef. Pd rumus
Contoh 1 ( Hicks, hal 163)
Viskositas sebuah slurry diuji oleh 4 laboran yang dipilih secara random. Material yang diuji oleh laboran dimasukan dalam botol dan diuji viskositasnya dengan 5 mesin yang ada. Masing-masing laboran menguji sebanyak 2 kali.
masing laboran menguji sebanyak 2 kali. Laboran ( Technician = T ) → Random
Deciding What to Use as the Denominator of Your F-test
For an all fixed model the Error MS is the denominator of all F-tests.
For an all random or mix model,
1. Ignore the last component of the expected mean square. 2. Look for the expected mean square that now looks this
expected mean square. expected mean square.
3. The mean square associated with this expected mean square
will be the denominator of the F-test.
4. If you can’t find an expected mean square that matches the
one mentioned above, then you need to develop a Synthetic Error Term
Contoh 1 ( Hicks, hal 163) 2 2 / 10 2 5 1 3 F EMS k j i df Source R F R 2 5 4 σ σ MS MS T + 2 ) ( 2 2 2 2 2 2 1 1 1 20 / 2 2 0 1 12 / 8 2 2 0 4 4 / 10 2 5 1 3 ε ε ε ε σ ε σ σ φ σ σ σ σ ij k error TM TM ij TM M TM ij error T T j MS MS TM MS MS M M MS MS T + + + + Perhatikan :
Uji F ( Uji pseudo F ) untuk M bukan dibagi dengan MS error
Example 4 : ( Stat485 Lecture)
In this Example a Taxi company is interested in comparing the effects of three brands of tires (A, B and C) on
mileage (mpg). Mileage will also be effected by driver. The company selects at random b = 4 drivers at random from its collection of drivers. Each driver has n = 3 opportunities to use each brand of tire in which mileage is measured.
to use each brand of tire in which mileage is measured. Dependent
Mileage
Independent
Tire brand (A, B, C),
Fixed Effect Factor
Driver (1, 2, 3, 4),
The Data
Driver Tire Mileage Driver Tire Mileage 1 A 39.6 3 A 33.9 1 A 38.6 3 A 43.2 1 A 41.9 3 A 41.3 1 B 18.1 3 B 17.8 1 B 20.4 3 B 21.3 1 B 19 3 B 22.3 1 C 31.1 3 C 31.3 1 C 29.8 3 C 28.7 1 C 26.6 3 C 29.7 1 C 26.6 3 C 29.7 2 A 38.1 4 A 36.9 2 A 35.4 4 A 30.3 2 A 38.8 4 A 35 2 B 18.2 4 B 17.8 2 B 14 4 B 21.2 2 B 15.6 4 B 24.3 2 C 30.2 4 C 27.4 2 C 27.9 4 C 26.6 2 C 27.2 4 C 21
The Output
Tests of Between-Subjects Effects
Dependent Variable: MILEAGE
28928.340 1 28928.340 1270.836 .000 68.290 3 22.763a 2072.931 2 1036.465 71.374 .000 87.129 6 14.522b Source Hypothesis Error Intercept Hypothesis Error TIRE Type III Sum of Squares df Mean Square F Sig. 87.129 6 14.522 68.290 3 22.763 1.568 .292 87.129 6 14.522b 87.129 6 14.522 2.039 .099 170.940 24 7.123c Error Hypothesis Error DRIVER Hypothesis Error TIRE * DRIVER MS(DRIVER) a. MS(TIRE * DRIVER) b. MS(Error) c.
The divisor for both the fixed and the random main effect is MSAB This is contrary to the advice of some texts
The Anova table for the two factor model (A – fixed, B - random)
( )
ij ijk j i ijk y = µ +α + β + αβ + ε Source SS df MS EMS F A SSA a -1 MSA MSA/MSAB B SSA b - 1 MSB MSB/MSError ( − )∑= + + a i i AB a nb n 1 2 2 2 1 α σ σ 2 2 B naσ σ + B SSA b - 1 MSB MSB/MSError AB SSAB (a -1)(b -1) MSAB MSAB/MSErrorError SSError ab(n – 1) MSError σ2
B naσ σ + 2 2 AB nσ σ +
Note: The divisor for testing the main effects of A is no longer
MSError but MSAB.
The Anova table for the two factor model (A – fixed, B - random)
( )
ij ijk j i ijk y = µ +α + β + αβ + ε Source SS df MS EMS F A SSA a -1 MSA MSA/MSAB B SSA b - 1 MSB MSB/MSAB ( − )∑= + + a i i AB a nb n 1 2 2 2 1 α σ σ 2 2 2 B AB na nσ σ σ + + B SSA b - 1 MSB MSB/MSAB AB SSAB (a -1)(b -1) MSAB MSAB/MSErrorError SSError ab(n – 1) MSError σ2
B AB na nσ σ σ + + 2 2 AB nσ σ +
Note: In this case the divisor for testing the main effects of A is
MSAB . This is the approach used by SPSS.