FIXED, RANDOM & MIXED MODELS Senin, 12 November 2012
Outline’s Introduction Single Factor Models Two Factor Models EMS (Expected Mean Square) Rules The Pseudo-F Test
Introduction
Setiap peneliti sebelum me-running eksperimen harus menentukan jenis levelnya. Jenis level yaitu Fixed, Random atau Mixed
Introduction Fixed Level ditentukan oleh eksperimenter. Kesimpulan hanya berlaku untuk level yg telah ditentukan. 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. 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
Single Factor Models Model Matematika Completely Random Design ( Bab III , Hicks )
Yij = µ + τ j + ε ij Asumsi pada
Fix atau Random
Single Factor Models Level jenis Fixed :
Masih INGAT CONTOH 3.1 di BAB III , Hicks halaman 50-51 ? ( resistance to abrasion ) Kenapa levelnya termasuk jenis fixed ?
Single Factor Models Level jenis Fixed :
Yij = µ + τ j + ε ij
Fix atau Random
Asumsi pada k
Fix
∑τ j =1
j
=
k
∑ (µ j =1
j
− µ) = 0
Single Factor Models Level jenis Fixed :
Cara Analisis ( Lihat BAB III , Hicks ) Expected Mean Square ( EMS )
Source
τ
df k −1
j
ε ij
k ( n − 1)
EMS
σ ε2 + n φ τ σ ε2
Hipotesis
H 0 : τ j = 0 , untuk semua j
Single Factor Models Level jenis Random :
Masih INGAT CONTOH 3.2 di BAB III , Hicks halaman 65-66 ? ( quality of the incoming material )
Kenapa levelnya termasuk jenis random ?
Single Factor Models Level jenis Random :
Yij = µ + τ j + ε ij
Fix atau Random
Asumsi pada
Random
NID ( 0 , σ
2
τ
)
Normal and Independent Disitribution
Single Factor Models Level jenis Random : Cara Analisis ( Lihat BAB III , Hicks ) Expected Mean Square ( EMS )
Source
τ
j
ε ij Hipotesis
df k −1 k ( n − 1)
H 0 : σ τ2 = 0
EMS
σ ε2 + n σ τ2 σ ε2
Two Factor Models Model Matematika ( Bab VI , Hicks , hal. 159-160 )
Yij = µ + Ai + B j + ABij + ε ( k )ij i = 1,2,.., a j = 1,2,...., b k = 1,2,..., n
Two Factor Models
Two Factor Models
Two Factor Models
Expected Mean Square (EMS) Penting untuk eksperimen yg kompleks (ex : random, mixed). EMS untuk menguji signifikasi suatu faktor (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).
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 EMS.
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. Masingmasing laboran menguji sebanyak 2 kali. Laboran ( Technician = T ) → Random Mesin ( Machine = M → Fixed
Contoh 1 ( Hicks, hal 163)
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. 2. 3. 4.
Ignore the last component of the expected mean square. Look for the expected mean square that now looks this expected mean square. The mean square associated with this expected mean square will be the denominator of the F-test. 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)
df
4 R i
5 F j
2 R k
Tj
3
1
5
2
σ ε2 + 10σ T2
MS T / MS error
M ij
4
4
0
2
2 + 8φM σ ε2 + 2σ TM
MS M / MS TM
TM ij
12
1
0
2
2 σ ε2 + 2σ TM
MS TM / MS error
ε k ( ij )
20
1
1
1
Source
EMS
F
σ ε2 Perhatikan : Uji F ( Uji pseudo F ) untuk M bukan dibagi dengan MS error
Contoh 2
Contoh 2
Contoh 3 :
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. Dependent Mileage
Independent Tire brand (A, B, C), Fixed Effect Factor
Driver (1, 2, 3, 4), Random Effects factor
The Data Driver 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2
Tire A A A B B B C C C A A A B B B C C C
Mileage 39.6 38.6 41.9 18.1 20.4 19 31.1 29.8 26.6 38.1 35.4 38.8 18.2 14 15.6 30.2 27.9 27.2
Driver 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4
Tire A A A B B B C C C A A A B B B C C C
Mileage 33.9 43.2 41.3 17.8 21.3 22.3 31.3 28.7 29.7 36.9 30.3 35 17.8 21.2 24.3 27.4 26.6 21
Asking SPSS to perform Univariate ANOVA
Select the dependent variable, fixed factors, random factors
The Output Tests of Between-Subjects Effects Dependent Variable: MILEAGE
Source Intercept TIRE DRIVER TIRE * DRIVER
Hypothesis Error Hypothesis Error Hypothesis Error Hypothesis Error
Type III Sum of Squares 28928.340 68.290 2072.931 87.129 68.290 87.129 87.129 170.940
df 1 3 2 6 3 6 6 24
Mean Square 28928.340 22.763a 1036.465 14.522b 22.763 14.522b 14.522 7.123c
F 1270.836
Sig. .000
71.374
.000
1.568
.292
2.039
.099
a. MS(DRIVER) b. MS(TIRE * DRIVER) c. MS(Error)
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)
yijk = µ + α i + β j + (αβ )ij + ε ijk Source
SS
df
MS
EMS
A
SSA
a -1
MSA
B
SSA
b-1
MSB
σ 2 + naσ B2
MSB/MSError
AB
SSAB
(a -1)(b -1)
MSAB
2 σ 2 + nσ AB
MSAB/MSError
Error
SSError
ab(n – 1)
MSError
σ2
2 + σ 2 + nσ AB
F nb a 2 αi (a − 1) ∑ i =1
MSA/MSAB
Note: The divisor for testing the main effects of A is no longer MSError but MSAB. References Guenther, W. C. “Analysis of Variance” Prentice Hall, 1964
The Anova table for the two factor model (A – fixed, B - random)
yijk = µ + α i + β j + (αβ )ij + ε ijk Source
SS
df
MS
EMS
A
SSA
a -1
MSA
B
SSA
b-1
MSB
2 σ 2 + nσ AB + naσ B2
MSB/MSAB
AB
SSAB
(a -1)(b -1)
MSAB
2 σ 2 + nσ AB
MSAB/MSError
Error
SSError
ab(n – 1)
MSError
σ2
2 + σ 2 + nσ AB
F nb a 2 αi (a − 1) ∑ i =1
MSA/MSAB
Note: In this case the divisor for testing the main effects of A is MSAB . This is the approach used by SPSS. References Searle “Linear Models” John Wiley, 1964
Pseudo – F Test
Pseudo – F Test
Pseudo – F Test
Pseudo – F Test
Pseudo – F Test
Pseudo – F Test
Pseudo – F Test
Inspirasi Hari Ini
http://www.stat.purdue.edu/~kuczek/stat514/