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 Setiappeneliti sebelumme-running eksperimenharusmenentukanjenis levelnya. Jenis level yaitu Fixed, Randomatau Mixed
Introduction Fixed Level ditentukan oleh eksperimenter. Kesimpulan hanya berlaku untuk level yg telah ditentukan. Tidak bisa digeneralisasi untuk populasi. Biasanya: level terdiridariekstrim 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 MatematikaCompletely Random Design ( Bab III, Hicks ) Yij = µ + τ + ε Fix atau Random j ij Asumsi pada
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 = µ + τ + ε Fix atau Random j ij Asumsi pada k Fix τ j ( µ j µ ) = 0 j = 1 k = j = 1
Single Factor Models Level jenis Fixed : Cara Analisis ( Lihat BAB III, Hicks ) Expected Mean Square ( EMS ) Source df EMS τ j k 1 σ 2 ε + nφ τ ε ij k ( n 1) σ 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 = µ + τ + ε Fix atau Random j ij Asumsi pada σ 2 τ Random NID (0, ) Normal and Independent Disitribution
Single Factor Models Level jenis Random : Cara Analisis ( Lihat BAB III, Hicks ) Expected Mean Square ( EMS ) Source df EMS τ ε j ij k 1 k ( n 1) σ σ 2 ε 2 ε + nσ 2 τ Hipotesis 2 H 0 : σ τ = 0
Two Factor Models Model Matematika ( Bab VI, Hicks, hal. 159-160) Y = µ + A + B + AB + ε ij i j ij ( 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) Pentinguntukeksperimenygkompleks(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 ditulisjenislevelnya( 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 )jumlahlevel kedalamtabel. Syarat: jumlahlevel tdkbolehmunculdibarisyang 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. RumusEMS : 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. Masing- masing 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. Ignore the last component of the expected mean square. 2. Look for the expected mean square that now looks this 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) Source df 4 R i EMS 2 T j 3 1 5 2 ε + M ε ij TM ij k ( ij ) 4 12 20 4 1 1 5 F j 0 0 1 2 R k 2 2 1 σ σ σ σ 2 ε 2 ε 2 ε 10 σ + 2σ + 2σ 2 T 2 TM 2 TM + 8φM F MS MS MS T M / MS TM / / MS MS Perhatikan : Uji F ( Uji pseudo F ) untuk M bukan dibagi dengan MS error error TM 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 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 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
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 Hypothesis Error TIRE Hypothesis Error DRIVER Hypothesis Error TIRE * DRIVER Hypothesis Error a. MS(DRIVER) b. MS(TIRE * DRIVER) c. MS(Error) Type III Sum of Mean Squares df Square F Sig. 28928.340 1 28928.340 1270.836.000 68.290 3 22.763 a 2072.931 2 1036.465 71.374.000 87.129 6 14.522 b 68.290 3 22.763 1.568.292 87.129 6 14.522 b 87.129 6 14.522 2.039.099 170.940 24 7.123 c The divisor for both the fixed and the random main effect is MS AB This is contrary to the advice of some texts
The Anova table for the two factor model (A fixed, B - random) yijk = i j ( αβ ) ε ijk µ + α + β + + ij Source SS df MS EMS F A SS A a -1 MS A MS A /MS ( ) a 2 2 2 σ + nσ AB + αi AB a 1 i= 1 B SS 2 2 A b - 1 MS B σ + naσ MS B /MS Error σ + naσ B 2 2 AB SS AB (a -1)(b -1) MS AB σ + nσ AB MS AB /MS Error Error SS Error ab(n 1) MS 2 Error σ Note: The divisor for testing the main effects of A is no longer MS Error but MS AB. References Guenther, W. C. Analysis of Variance Prentice Hall, 1964 nb
The Anova table for the two factor model (A fixed, B - random) yijk = i j ( αβ ) ε ijk µ + α + β + + ij Source SS df MS EMS F A SS A a -1 MS A MS A /MS ( ) a 2 2 2 σ + nσ AB + αi AB a 1 i= 1 B SS 2 2 2 A b - 1 MS B σ + nσ + naσ MS B /MS AB 2 2 AB SS AB (a -1)(b -1) MS AB σ + nσ AB MS AB /MS Error Error SS Error ab(n 1) MS 2 Error σ Note: In this case the divisor for testing the main effects of A is MS AB. This is the approach used by SPSS. References Searle Linear Models John Wiley, 1964 AB nb B
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/