Model Log-Linear (Bagian 1) Dr. Kusman Sadik, M.Si Program Studi Magister (S2) Departemen Statistika IPB, 2017/2018

dokumen-dokumen yang mirip
Model Log-Linear (Bagian 2) Dr. Kusman Sadik, M.Si Program Studi Magister (S2) Departemen Statistika IPB, 2017/2018

Pemodelan Data Cacahan (Count Data) dalam GLM. Dr. Kusman Sadik, M.Si Sekolah Pascasarjana Departemen Statistika IPB Semester Genap 2017/2018

Dr. Kusman Sadik, M.Si Departemen Statistika IPB, 2017

Kasus. Survey terhadap remaja usia tahun apakah pernah melakukan kerja paruh waktu (part-time)??

Sering dibahas. Asosiasi 2 peubah Y Z

Pertemuan 10 STATISTIKA INDUSTRI 2. Multiple Linear Regression. Multiple Linear Regression. Multiple Linear Regression 19/04/2016

Regresi Logistik Nominal dengan Fungsi Hubung CLOGLOG

Model Regresi untuk Data Deret Waktu. Kuliah 8 Metode Peramalan Deret Waktu

Inferensia Statistik parametrik VALID?? darimana sampel diambil

BAB 4 HASIL DAN PEMBAHASAN. mahasiswa lulusan yang berasal dari School of Computer Science BINUS. datanya adalah seperti yang tertera pada Tabel 4.1.

Gambaran Duplikasi Penomoran Rekam Medis. Gambaran Kualifikasi Pendidikan. Gambaran Pengetahuan. Statistics pemberian nomor. N Valid 60.

E-Jurnal Matematika Vol. 2, No.2, Mei 2013, ISSN:

Statistik Bisnis. Week 13 Chi-Square Test

Marketing Research Data Analyses

Lampiran Hasil Output SPSS. Statistics. Skor Kepuasan Pasien Rawat Jalan. Valid 200 Missing 0 Mean Skor Kepuasan Pasien Rawat Jalan Frequenc y

Statistik Bisnis 1. Week 9 Discrete Probability

Analisis Chi-Square (x 2 )

Dr. Kusman Sadik, M.Si Departemen Statistika IPB, 2016

ANALISIS FAKTOR-FAKTOR YANG MEMPENGARUHI KEPUTUSAN KONSUMEN MEMBELI SUATU PRODUK DENGAN METODE ANALISIS REGRESI LOGISTIK ORDINAL

HUBUNGAN ANTAR PEUBAH

Lampiran 2. Fungsi dari masing-masing pernyataan yang digunakan dalam PROC MIXED

ANALISIS RANCANGAN BUJUR SANGKAR GRAECO LATIN

Statistik Bisnis 2. Week 6 Two-Sample Test Population Proportions and Variances

Statistika Farmasi

(Studi Kasus Siswa SMP Kelas VIII di SMPN 1 Tajinan Malang) *Wuri Graita Gayuh Palupi *Abadyo

Non Linear Estimation and Maximum Likelihood Estimation

Relevansi-Nilai Kredit. Tahun

Statistik Bisnis 2. Week 4 Fundamental of Hypothesis Testing Methodology

Statistik Bisnis 1. Week 9 Discrete Probability Binomial and Poisson Distribution

To test the significant effect of two independent variables to one dependent variable, and to test the significant interaction of the two independent

KUESIONER PENELITIAN

PENERAPAN REGRESI ZERO-INFLATED NEGATIVE BINOMIAL (ZINB) UNTUK PENDUGAAN KEMATIAN ANAK BALITA

GEOGRAPHICALLY WEIGHTED REGRESSION PRINCIPAL COMPONENT ANALYSIS (GWRPCA) PADA PEMODELAN PENDAPATAN ASLI DAERAH DI JAWA TENGAH

Data Structures. Class 4 Arrays. Pengampu : TATI ERLINA, M.I.T. Copyright 2006 by The McGraw-Hill Companies, Inc. All rights reserved.

UJI HOMOGENITAS MARGINAL DENGAN MODEL LOG LINIER PADA TABEL KONTINGENSI TIGA DIMENSI ATAU LEBIH

PEMAKAIAN VARIABEL INDIKATOR DALAM PEMODELAN. Mike Susmikanti *

E-Jurnal Matematika Vol. 3 (3), Agustus 2014, pp ISSN:

Statistik Bisnis 1. Week 2 Collecting and Organizing Data

LAMPIRAN. Universitas Sumatera Utara

METODE REGRESI DATA PANEL UNTUK PERAMALAN KONSUMSI ENERGI DI INDONESIA

DAFTAR LAMPIRAN. Wawancara Terhadap Bidang Standarisasi pada. LSP LSK TKI Sektor Tata Laksana Rumah Tangga : Ibu Etty. Meindrati

MENENTUKAN MODEL KOEFISIEN REGRESI MULTIPLE VARIABEL DENGAN MENGGUNAKAN MAKSIMUM LIKELIHOOD SKRIPSI BENNY SOFYAN SAMOSIR

PENDEKATAN MULTIPLE REGRESI PADA ANALISIS RAGAM KLASIFIKASI DUA ARAH SKRIPSI MARISA INDA PUTRI

Lampiran : 1 PERNYATAAN KESEDIAAN MENJADI RESPONDEN. Saya yang bertandatangan dibawah ini:

ABSTRAK. Kata-kata Kunci: Financial Distress, Rasio Keuangan, Altman Z-Score.

MODEL REGRESI PROBIT BIVARIAT

E-Jurnal Matematika Vol. 2, No.3, Agustus 2013, ISSN:

KUESIONER PENELITIAN

I. Identitas Responden

KUESIONER PENELITIAN

KEPERCAYAAN DIRI. Corrected Item-Total Correlation

Uji OR dan Regresi Logistik Sederhana

LEMBAR PENJELASAN KEPADA RESPONDEN. Saya bernama Desi Handayani Lubis adalah mahasiswa S2 Program Studi

Analisis Data Panel Tidak Lengkap Model Komponen Error Dua Arah dengan Metode Minimum Variance Quadratic Unbiased Estimation (MIVQUE) SKRIPSI

ANALYSIS OF VARIANCE (ANOVA)

PENGARUH GAYA HIDUP TERHADAP KEJADIAN HIPERTENSI DI RSUD Dr. H. KUMPULAN PANE TEBING TINGGI

FORMULIR PERSETUJUAN MENJADI PESERTA PENELITIAN (INFORMED CONSENT)

KUESIONER. a. Nama Responden : b. AlamatResponden : c. Jenis kelamin : d. Umur Responden : e. Pekerjaan : 1. Bekerja 2.

PEMODELAN REGRESI LINIER MULTIVARIAT DENGAN METODE PEMILIHAN MODEL FORWARD SELECTION

KUESIONER PENELITIAN PENGARUH PENGETAHUAN DAN MOTIF EKONOMI TERHADAP PENGGUNAAN FORMALIN DAN BORAKS OLEH PEDAGANG

Statistics for Managers Using Microsoft Excel Chapter 1 Introduction and Data Collection

DAFTAR ISI.. LEMBAR PENGESAHAN SURAT PERNYATAAN ABSTRAK.. ABSTRACT... DAFTAR TABEL.. DAFTAR PERSAMAAN..

PENDEKATAN REGRESI BERGANDA PADA ANALISIS VARIANS KLASIFIKASI DUA ARAH SKRIPSI ERNI SYAHPUTRI

Pemrograman Lanjut. Interface

LAMPIRAN 5. Gambaran Umum Responden

FORMULIR RESPONDEN PENELITIAN. 5. Riwayat Penyakit Dahulu : DM/HT/Jantung/ Ginjal/ lainnya: BMI :... BB:...kg TB:...cm

Resume 2 : Analysis of sex sequences by means of generalized linear mixed models. Yenni Angraini G

PERSEMBAHAN. Karya ini dipersembahkan untuk ibu, bapak, dan kakak yang selalu mendoakan dan memotivasiku untuk terus berjuang menyelesaikan skripsi.

ABSTRACT. Keywords: tax refund, fees for acquisition of land and buildings from sell-buy transaction. viii. Universitas Kristen Maranatha

KUESIONER PENELITIAN

Prosiding Statistika ISSN:

Optimalisasi Jumlah Batu Bata yang Pecah Menggunakan Desain Eksperimen Taguchi. (Studi Kasus: Usaha Batu Bata Bapak Kholil Ds.

KUESIONER PENGARUH KARAKTERISTIK KADER TERHADAP PELAKSANAAN PENIMBANGAN BALITA DI POSYANDU KABUPATEN PIDIE NANGGRO ACEH DARUSSALAM TAHUN 2010

PERBANDINGAN MODEL ARIMA DAN MODEL REGRESI DENGAN RESIDUAL ARIMA DALAM MENERANGKAN PERILAKU PELANGGAN LISTRIK DI KOTA PALOPO

DISAIN EKSPERIMENTAL STATISTIKA TEKNIK KIMIA

I. Identitas Responden 1. No. Responden : Nama responden : Jumlah anak :... (orang) 4. Pendidikan : Umur :...

REGRESI LOG-LOGISTIK UNTUK DATA TAHAN HIDUP TERSENSOR TIPE I. oleh NANDA HIDAYATI M

Variabel selain variabel dalam eksperimen (IV dan DV) yang bisa berpengaruh pada pemberian perlakuan pada subyek

PENERAPAN REGRESI LINIER MULTIVARIAT PADA DISTRIBUSI UJIAN NASIONAL 2014 (Studi Kasus Nilai Ujian Nasional 2014 SMP Negeri 1 Sayung)

Statistika Industri II TIP - FTP UB

LAMPIRAN. Lampiran 1. Ethical clearance

KUESIONER FAKTOR-FAKTOR YANG BERPENGARUH DENGAN RENDAHNYA PEMANFAATAN JAMPERSAL DI PUSKESMAS NAMORAMBE DAN PERSEPSI MASYARAKAT TERHADAP JKN

ANALISIS VARIAN DUA FAKTOR DALAM RANCANGAN PENGAMATAN BERULANG ( REPEATED MEASURES )

ESTIMASI PARAMETER DAN INTERVAL KREDIBEL DENGAN MODEL REGRESI LINIER BERGANDA BAYESIAN

Apa itu suatu Hypothesis?

3. Lama bekerja sebagai PSK.Tahun

ANALISIS DATA KATEGORI DENGAN LOG LINIER MENGGUNAKAN PRINSIP HIRARKI (STUDI KASUS JUMLAH KECELAKAAN LALU LINTAS DI KOTA MAKASSAR TAHUN 2011).

Instrumen Penelitian Kuisioner

Statistik Bisnis. Week 9 Confidence Interval Estimation

Senyawa Pembanding Parasetamol Dosis 50 mg/kgbb

METODE LENTH PADA RANCANGAN FAKTORIAL FRAKSIONAL DENGAN ESTIMASI EFEK ALGORITMA YATES

ABSTRAK. semua ditentukan oleh kualitas dari sumber daya manusia yang terdapat di suatu perusahaan

1/5. while and do Loops The remaining types of loops are while and do. As with for loops, while and do loops Praktikum Alpro Modul 3.

KUESIONER PENELITIAN PENGARUH FAKTOR INTERNAL DAN EKSTERNAL IBU TERHADAP PEMBERIAN MP-ASI PADA ANAK USIA 0-6 BULAN DI KOTA LANGSA TAHUN 2010

DIFFUSION TEST AS AN ALTERNATIVE INDICATOR FOR DURABILITY ASSESSMENT OF BITUMINOUS MIXTURES THESIS

FIXED, RANDOM & MIXED MODELS. Senin, 12 November 2012

Lampiran 1 Kuesioner Penelitian Yth. Responden Dalam rangka memenuhi penelitian, saya sebagai mahasiswa Universitas Katolik Widya Mandala Surabaya,

Universitas Sumatera Utara

JURUSAN TEKNIK SIPIL FT UJB NINDYOCAHYOKRESNANTO.WORDPRESS.COM

ESTIMAS) PARAMETER REGRES) LINtER BERGANDA DENGAN METODE ROBUST BERDASARKAN LEAST TRIMMED SQUARES SKRIPSI

Transkripsi:

Model Log-Linear (Bagian 1) Dr. Kusman Sadik, M.Si Program Studi Magister (S2) Departemen Statistika IPB, 2017/2018

Using a log-linear modeling approach is advantageous to conducting inferential tests of the associations in contingency tables because the models can handle more complicated situations. For example, the Breslow Day statistic is limited to 2x2xK tables and estimates of common odds ratios cannot be obtained for tables larger than 2x2. Conversely, a log-linear modeling approach is not restricted to two- or three-way tables so it can be used for testing homogeneous association and estimating common odds ratios in tables of any size. 2

Log-linear models are used to model the cell counts in contingency tables. The ultimate goal of fitting a log-linear model is to estimate parameters that describe the relationships between categorical variables. Specifically, for a set of categorical variables, log-linear models do not really distinguish between explanatory and response variables but rather treat all variables as response variables by modeling the cell counts for all combinations of the levels of the categorical variables included in the model. 3

In general, the number of parameters in a log-linear model depends on the number of categories of the variables of interest. More specifically, in any log-linear model the effect of a categorical variable with a total of C categories requires (C 1) unique parameters. For example, if variable X is gender (with two categories), then C = 2 and only one predictor, thus one parameter, is needed to model the effect of X. 4

When dummy coding is used, the last category of the variable is used as a reference category. Therefore, the parameter associated with the last category is set to zero, and each of the remaining parameters of the model is interpreted relative to the last category. For example, if male is the last category of the gender variable, then the one gender parameter in the log-linear model will be interpreted as the difference between females and males because the parameter reflects the odds for females relative to the reference category, males. 5

6

Instead of representing the parameter associated with the i th variable (X i ) as β i, in log-linear models this parameter is represented by the Greek letter lambda, λ, with the variable indicated in the superscript and the (dummy-coded) indicator of the variable in the subscript. For example, if the variable X has a total of I categories (i = 1, 2,, I), λ i x is the parameter associated with the i th indicator (dummy variable) for X. Similarly, if the variable Y has a total of J categories (j = 1, 2,, J), then λ jy is the parameter associated with the j th indicator for Y. 7

For two categorical variables, the expected cell counts, denoted by μ ij for the cell in the i th row and j th column, are the outcome values from a log-linear model. μij = Eij = (ni+) (n+j)/ (n++) 8

9

In general, main effects in log-linear models are interpreted as odds. The (exponentiated) parameter values associated with X, λ i x, can be interpreted as the odds of being in the i th row versus being in the last row of the table regardless of the value of the other variable, Y. Likewise, the (exponentiated) parameter values associated with Y, λ jy, can be interpreted as the odds of being in the j th column versus being in the last column of the table regardless of the value of the other variable, X. 10

Lihat : Azen, hlm. 140 11

i = 1, 2,..., k : kategori terakhir (i = k) sebagai referensi j = 1, 2,..., m : kategori terakhir (j = m) sebagai referensi λ i X = log odds i = log P X=i P X=k λ j Y = log odds j = log P Y=j P Y=m = log n i./n.. n k. /n.. = log n.j /n.. n.m /n.. 12

Data : Azen, Table.7.2 λ i X = log odds i = log P X=i P X=k = log n i./n.. n k. /n.. λ 1 X = log P X=1 P X=3 λ 2 X = log P X=2 P X=3 λ 3 X = log P X=3 P X=3 = log n 1./n.. = log 450/1776 n 3. /n.. 698/1776 = log n 2./n.. = log 628/1776 n 3. /n.. 698/1776 = log n 3./n.. n 3. /n.. = log 1 = 0 = 0.43897 = 0.10568 13

λ j Y = log odds j = log P Y=j P Y=m = log n.j /n.. n.m /n.. λ 1 Y = log P Y=1 P Y=3 λ 2 Y = log P Y=2 P Y=3 λ 3 Y = log P Y=3 P Y=3 = log n.1/n.. = log 647/1776 n.3 /n.. 274/1776 = log n.2/n.. = log 855/1776 n.3 /n.. 274/1776 = log n.3/n.. n.3 /n.. = log 1 = 0 = 0.859218 = 1.137973 14

Bagaimana menduga λ? Gunakan kategori terakhir untuk X dan Y, untuk data di atas (i=3 dan j=3), sehingga: log(μ 33 ) = λ, karena λ 3 X = λ 3 Y = 0 μ 33 = (n 3. ) (n.3 )/ (n.. ) = (274)(698)/(1776) = 107.6869 λ = log(μ 33 ) = log(107.6869) = 4.67923 15

16

17

18

Program R : Wajib Program SAS : Tambahan 19

** Model Log-Linear untuk Data Tabel 7.2 (Azen, hlm.140) ** ** relevel --> Memilih Kategori Referensi ** ** Model 1 : Tanpa Interaksi ** pol <- factor(rep(c("1lib","2mod","3con"),3)) pre <- factor(rep(c("1bus","2cli","3per"),rep(3,3))) count <- c(70, 195, 382, 324, 332, 199, 56, 101, 117) pol pre <- relevel(pol, ref="3con") <- relevel(pre, ref="3per") data.frame(pol, pre, count) model1 <- glm(count ~ pol + pre, family=poisson("link"=log)) summary(model1) dugaan <- round(fitted(model1),2) data.frame(pol,pre, count, dugaan) 20

pol pre count 1 1Lib 1Bus 70 2 2Mod 1Bus 195 3 3Con 1Bus 382 4 1Lib 2Cli 324 5 2Mod 2Cli 332 6 3Con 2Cli 199 7 1Lib 3Per 56 8 2Mod 3Per 101 9 3Con 3Per 117 21

Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) 4.67923 0.06723 69.605 < 2e-16 *** pol1lib -0.43897 0.06045-7.261 3.84e-13 *** pol2mod -0.10568 0.05500-1.921 0.0547. pre1bus 0.85922 0.07208 11.921 < 2e-16 *** pre2cli 1.13797 0.06942 16.392 < 2e-16 *** --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05. 0.1 1 (Dispersion parameter for poisson family taken to be 1) Null deviance: 626.32 on 8 degrees of freedom Residual deviance: 247.70 on 4 degrees of freedom AIC: 320 22

pol pre count dugaan 1 1Lib 1Bus 70 163.94 2 2Mod 1Bus 195 228.78 3 3Con 1Bus 382 254.28 4 1Lib 2Cli 324 216.64 5 2Mod 2Cli 332 302.33 6 3Con 2Cli 199 336.03 7 1Lib 3Per 56 69.43 8 2Mod 3Per 101 96.89 9 3Con 3Per 117 107.69 23

When there is evidence for dependency between the row and column variables of a two-way table, the dependency is modeled using two-way interaction terms in the log-linear modeling framework. However, fitting a log-linear model with a two-way interaction to a two-way contingency table is analogous to fitting the saturated model. To illustrate the saturated model using the previous example: 24

25

26

** Model Log-Linear untuk Data Tabel 7.2 (Azen, hlm.140) ** ** relevel --> Memilih Kategori Referensi ** ** Model 2 : Ada Interaksi ** pol <- factor(rep(c("1lib","2mod","3con"),3)) pre <- factor(rep(c("1bus","2cli","3per"),rep(3,3))) count <- c(70, 195, 382, 324, 332, 199, 56, 101, 117) pol pre <- relevel(pol, ref="3con") <- relevel(pre, ref="3per") data.frame(pol, pre, count) Model1 <- glm(count ~ pol + pre + pol*pre, family=poisson("link"=log)) summary(model1) dugaan <- round(fitted(model1),2) data.frame(pol,pre, count, dugaan) 27

Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) 4.76217 0.09245 51.511 < 2e-16 *** pol1lib -0.73682 0.16249-4.534 5.77e-06 *** pol2mod -0.14705 0.13582-1.083 0.27895 pre1bus 1.18325 0.10566 11.198 < 2e-16 *** pre2cli 0.53113 0.11650 4.559 5.14e-06 *** pol1lib:pre1bus -0.96010 0.20810-4.614 3.96e-06 *** pol2mod:pre1bus -0.52537 0.16185-3.246 0.00117 ** pol1lib:pre2cli 1.22426 0.18578 6.590 4.41e-11 *** pol2mod:pre2cli 0.65888 0.16274 4.049 5.15e-05 *** --- Signif.codes: 0 *** 0.001 ** 0.01 * 0.05. 0.1 1 (Dispersion parameter for poisson family taken to be 1) Null deviance: 6.2632e+02 on 8 degrees of freedom Residual deviance: 9.5701e-14 on 0 degrees of freedom AIC: 80.301 28

29

1. Gunakan Program R untuk menganalisis data yang terdapat pada Tabel 7.2 (Azen, hlm.140) : a. Lakukan pemodelan log-linear dengan menjadikan Conservative dan Perot sebagai pembanding/referensi. Apa interpretasinya? b. Lakukan pemodelan log-linear dengan menjadikan Liberal dan Bush sebagai pembanding/referensi. Apa interpretasinya? c. Berdasarkan dua pendekatan tersebut (a dan b), tentukan penduga bagi ij, untuk i = 1, 2, 3 dan j = 1, 2, 3. Apakah hasilnya berbeda antara (a) dan (b) di atas? d. Lakukan uji hipotesis untuk mengetahui ada tidaknya hubungan antara afiliasi politik dengan pilihan menggunakan model penuh (saturated model). Apa kesimpulan Anda? 30

2. Gunakan Program R untuk melakukan analisis data pada Tabel 2 dibawah ini: a. Tentukan model log-linear dan dugaan parameternya. Apa interpretasinya? b. Berdasarkan model tersebut, tentukan penduga bagi ij, untuk i = 1, 2, 3 dan j = 1, 2, 3, 4. c. Lakukan uji hipotesis untuk mengetahui ada tidaknya hubungan antara afiliasi politik dengan umur menggunakan model penuh (saturated model). Apa kesimpulan Anda? 31

2. 32

Pustaka 1. Azen, R. dan Walker, C.R. (2011). Categorical Data Analysis for the Behavioral and Social Sciences. Routledge, Taylor and Francis Group, New York. 2. Agresti, A. (2002). Categorical Data Analysis 2 nd. New York: Wiley. 3. Pustaka lain yang relevan. 33

Bisa di-download di kusmansadik.wordpress.com 34

Terima Kasih 35