View
212
Download
0
Category
Preview:
Citation preview
Regresi Logistik Ordinal
(Peubah Respon Multikategori : Ordinal)
Dr. Kusman Sadik, M.Si
Program Studi Pascasarjana
Departemen Statistika IPB, 2018/2019
2
The main feature of the ordinal logistic models is that
they predict the log odds, odds, or probability of a
response occurring at or below any given outcome
category.
For example, ordering the educational attainment
categories from lowest to highest (less than high
school, high school, junior college, bachelor’s degree,
graduate degree) we can use this model to predict the
probability of being (for example) at the bachelor’s
level or below from age at first marriage.
3
.... (a)
a
4
5
a
6
The slopes are assumed to be the same for all logits
and, under this assumption, the model is known as the
proportional odds model.
The underlying assumption of equivalent slopes across
all logits can, and should, be tested to verify that this
model is appropriate.
If this assumption appears to be violated, then one
could fit the nominal, or more complicated alternative
models.
7
We use data from the 2006 GSS to predict a
respondent’s educational attainment level (degree),
measured as either less than high school, high school,
junior college, bachelor’s degree, or graduate degree,
from the respondent’s age when first married
(agewed).
The outcome variable (educational attainment level) is
treated as ordinal, so the proportional odds model is
used.
8
# Model Logistik Ordinal untuk Data GSS (Azen, sub-bab 10.5)
# Data Respon : Harus Data Terurut
dataku <- read.csv(file=“Data-GSS-2006.csv", header=TRUE)
degree <- factor(dataku$degree)
degree.order <- factor(dataku$degree.order)
agewed <- dataku$agewed
data.frame(degree,degree.order,agewed)
# Package yang diperlukan #
library("foreign")
library("MASS")
library("nnet")
table(degree,degree.order)
model <- polr(degree.order ~ agewed, method="logistic")
summary(model)
9
degree degree.order agewed
1 HIGH SCHOOL 2 22
2 HIGH SCHOOL 2 23
3 HIGH SCHOOL 2 24
4 HIGH SCHOOL 2 22
5 LT HIGH SCHOOL 1 28
6 LT HIGH SCHOOL 1 21
7 HIGH SCHOOL 2 29
8 LT HIGH SCHOOL 1 19
9 LT HIGH SCHOOL 1 28
10 LT HIGH SCHOOL 1 29
.
.
.
1158 HIGH SCHOOL 2 21
1159 HIGH SCHOOL 2 22
1160 BACHELOR 4 28
Catatan : yang dipakai “degree.order” bukan
“degree”, karena “degree” belum terurut.
10
degree.order
degree 1 2 3 4 5
LT HIGH SCHOOL 195 0 0 0 0
BACHELOR 0 0 0 185 0
GRADUATE 0 0 0 0 104
HIGH SCHOOL 0 590 0 0 0
JUNIOR COLLEGE 0 0 86 0 0
11
Coefficients:
Value Std. Error t value
agewed 0.05059 0.01031 4.908
Intercepts:
Value Std. Error t value
1|2 -0.4549 0.2431 -1.8711
2|3 1.9226 0.2501 7.6886
3|4 2.2940 0.2530 9.0670
4|5 3.5242 0.2682 13.1389
Residual Deviance: 3096.156
AIC: 3106.156
12
Output SAS : Bandingkan dengan Output R
13
Output SAS : Bandingkan dengan Output R
14
Perbedaan Model antara R, SPSS, dan SAS
R dan SPSS
SAS
15
Perbedaan Model antara R, SPSS, dan SAS
16
Interpretasi dan Pengujin Parameter
17
Ilustrasi Interpretasi Parameter (Output R)
Coefficients:
Value Std. Error t value
agewed 0.05059 0.01031 4.908
Intercepts:
Value Std. Error t value
1|2 -0.4549 0.2431 -1.8711
2|3 1.9226 0.2501 7.6886
3|4 2.2940 0.2530 9.0670
4|5 3.5242 0.2682 13.1389
Nilai negatif dari β
18
Ilustrasi Interpretasi Parameter (Output R)
19
Ilustrasi Interpretasi Parameter (Output R)
20
21
1. Gunakan Program R untuk data Mental Impairment (Agresti, sub-
bab 7.2.4, hlm. 279 ) .
a. Bandingkan hasilnya dengan output SAS pada buku Agresti
tersebut serta berikan interpretasi pada tiap nilai dugaan
parameter model.
b. Berdasarkan hasil pada poin (a) di atas, tentukan nilai dugaan
P(Y = 1), P(Y = 3), dan P(Y > 2).
c. Tentukan model terbaik.
22
23
24
25
26
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 2nd. New
York: Wiley.
3. Pustaka lain yang relevan.
27
Bisa di-download di
kusmansadik.wordpress.com
28
Terima Kasih
Recommended