Sie sind auf Seite 1von 88

PAKET SPSS

LANJUT
ANOVA
 Menguji apakah rerata 1 variabel berbeda
secara bermakna pada lebih dari 2 kategori
(beda rerata kadar kolesterol antar 3 kategori
usia)
 Buka SPSS: file – data –dietstudy
 Analyze – Compare means – One-way ANOVA:
 Dependent List : data rasio (wg0)
 Factor : lebih 2 kategori (agegroup)
 Option:
 Statistics: descriptive dan homogeneity-of-variance
 Post-hoc: Bonferroni dan Tukey
 Continue
 OK
Tests of Normality
a
Kolmogorov-Smirnov Shapiro-Wilk
Statistic df Sig. Statistic df Sig.
Cholesterol .156 16 .200* .938 16 .320
*. This is a lower bound of the true significance.
a. Lilliefors Significance Correction

Descriptives

Cholesterol
95% Confidence Interval for
Mean
N Mean Std. Deviation Std. Error Lower Bound Upper Bound Minimum Maximum
<50 5 187.40 29.433 13.163 150.85 223.95 158 233
50-60 6 215.50 37.212 15.192 176.45 254.55 151 257
>60 5 188.80 29.987 13.410 151.57 226.03 157 222
Total 16 198.38 33.472 8.368 180.54 216.21 151 257
ANOVA

Cholesterol
Sum of
Squares df Mean Square F Sig.
Between Groups 2820.250 2 1410.125 1.311 .303
Within Groups 13985.500 13 1075.808
Total 16805.750 15

Multiple Comparisons

Dependent Variable: Cholesterol

Mean
Difference 95% Confidence Interval
(I) age grouping (J) age grouping (I-J) Std. Error Sig. Lower Bound Upper Bound
Tukey HSD <50 50-60 -28.10 19.861 .362 -80.54 24.34
>60 -1.40 20.744 .997 -56.17 53.37
50-60 <50 28.10 19.861 .362 -24.34 80.54
>60 26.70 19.861 .397 -25.74 79.14
>60 <50 1.40 20.744 .997 -53.37 56.17
50-60 -26.70 19.861 .397 -79.14 25.74
Bonferroni <50 50-60 -28.10 19.861 .542 -82.64 26.44
>60 -1.40 20.744 1.000 -58.36 55.56
50-60 <50 28.10 19.861 .542 -26.44 82.64
>60 26.70 19.861 .605 -27.84 81.24
>60 <50 1.40 20.744 1.000 -55.56 58.36
50-60 -26.70 19.861 .605 -81.24 27.84
GLM - univariat
 Menguji hubungan usia dengan kadar
kolesterol:
 Buka SPSS: file – data –dietstudy
 Analyze – General Linear Model – Univariate:
 Dependent variable: masukkan variabel wgt0 (data
rasio)
 Covariate: masukkan variabel age (data rasio)
sebagai variabel independen
 OK
GLM - univariat

Tests of Between-Subjects Effects

Dependent Variable: Cholesterol


Type III Sum
Source of Squares df Mean Square F Sig.
Corrected Model 306.756a 1 306.756 .260 .618
Intercept 12956.153 1 12956.153 10.994 .005
AGE 306.756 1 306.756 .260 .618
Error 16498.994 14 1178.500
Total 646448.000 16
Corrected Total 16805.750 15
a. R Squared = .018 (Adjusted R Squared = -.052)
GLM – univariat (options)

Parameter Estimates

Dependent Variable: Cholesterol


95% Confidence Interval
Parameter B Std. Error t Sig. Lower Bound Upper Bound
Intercept 234.135 70.614 3.316 .005 82.682 385.587
AGE -.654 1.282 -.510 .618 -3.403 2.095

 Kadar kolesterol darah = 234,135 – 0,654


usia
Correlations

Age in years Cholesterol


Age in years Pearson Correlation 1 -.135
Sig. (2-tailed) . .618
N 16 16
Cholesterol Pearson Correlation -.135 1
Sig. (2-tailed) .618 .
N 16 16


Linear Regression
250


 

225 

Cholesterol

200  

Chole s te rol = 234.13 + -0.65 * age


 R-Square = 0.02 
175

 

150

45 50 55 60

Age in years
GLM - univariat

 Menguji hubungan jenis kelamin dan kategori


usia dengan kadar kolesterol darah:
 Buka SPSS: file – data –dietstudy
 Analyze – General Linear Model – Univariate:
 Dependent variable: masukkan variabel wgt0 (data rasio)
 Fixed factors: masukkan variabel jenis kelamin dan kategori
usia (data nominal/ordinal)
 OK
GLM - univariat
Tests of Betw een-Subjects Effects

Dependent Variable: Cholesterol


Type III Sum
Source of Squares df Mean Square F Sig.
Corrected Model 13794.217a 5 2758.843 9.161 .002
Intercept 462728.955 1 462728.955 1536.523 .000
GENDER 10936.955 1 10936.955 36.317 .000
AGEGROUP 37.922 2 18.961 .063 .939
GENDER * AGEGROUP 491.654 2 245.827 .816 .469
Error 3011.533 10 301.153
Total 646448.000 16
Corrected Total 16805.750 15
a. R Squared = .821 (Adjusted R Squared = .731)
GLM – univariat (plots)
Estimated Marginal Means of Cholesterol
240

220

200
Estimated Marginal Means

180

Gender
160
Male

140 Female
<50 50-60 >60

age grouping
MANOVA (GLM-multivariate)

 Variabel dependen lebih dari 1 tapi


kelompok1, semisal:
 Bagaimana rata-rata kadar trigliserida dan
kolesterol (2 variabel dependen) berbeda secara
bermakna untuk tiap kelompok usia (1 kelompok)
MANOVA (GLM-multivariate)

 Variabel dependen lebih dari 1 tapi


kelompok1
 Buka SPSS: file – data –dietstudy
 Analyze – General Linear Model – Multivariate:
 Dependent variables: masukkan variabel kolesterol dan
trigliserida darah
 Fixed factor: masukkan variabel kategori usia

 Options - Display: aktifkan Homogenity test

 Continue dan OK
MANOVA (GLM-multivariate)

a
Box's Test of Equality of Covariance Matrices
Box's M .864
F .111
df1 6
df2 3329.708
Sig. .995
Tests the null hypothesis that the observed covariance
matrices of the dependent variables are equal across groups.
a. Design: Intercept+AGEGROUP
MANOVA (GLM-multivariate)

a
Levene's Test of Equality of Error Variances

F df1 df2 Sig.


Cholesterol .095 2 13 .910
Triglyceride .617 2 13 .555
Tests the null hypothesis that the error variance of the dependent
variable is equal across groups.
a. Design: Intercept+AGEGROUP
MANOVA (GLM-multivariate)
Multivariate Testsc

Effect Value F Hypothesis df Error df Sig.


Intercept Pillai's Trace .982 322.080a 2.000 12.000 .000
Wilks' Lambda .018 322.080a 2.000 12.000 .000
Hotelling's Trace 53.680 322.080a 2.000 12.000 .000
Roy's Largest Root 53.680 322.080a 2.000 12.000 .000
AGEGROUP Pillai's Trace .231 .849 4.000 26.000 .507
Wilks' Lambda .770 .838a 4.000 24.000 .515
Hotelling's Trace .298 .818 4.000 22.000 .527
Roy's Largest Root .293 1.905b 2.000 13.000 .188
a. Exact statistic
b. The statistic is an upper bound on F that yields a lower bound on the significance level.
c. Design: Intercept+AGEGROUP
MANOVA (GLM-multivariate)
Tests of Between-Subjects Effects

Type III Sum


Source Dependent Variable of Squares df Mean Square F Sig.
Corrected Model Cholesterol 2820.250a 2 1410.125 1.311 .303
Triglyceride 334.204b 2 167.102 .176 .840
Intercept Cholesterol 617839.218 1 617839.218 574.303 .000
Triglyceride 305882.549 1 305882.549 322.877 .000
AGEGROUP Cholesterol 2820.250 2 1410.125 1.311 .303
Triglyceride 334.204 2 167.102 .176 .840
Error Cholesterol 13985.500 13 1075.808
Triglyceride 12315.733 13 947.364
Total Cholesterol 646448.000 16
Triglyceride 319289.000 16
Corrected Total Cholesterol 16805.750 15
Triglyceride 12649.937 15
a. R Squared = .168 (Adjusted R Squared = .040)
b. R Squared = .026 (Adjusted R Squared = -.123)
MANOVA (GLM-multivariate)

 Hubungan gender dengan kadar


trigliserida dan kolesterol darah:
 Buka SPSS: file – data –dietstudy
 Analyze – General Linear Model – Multivariate:
 Dependent variables: masukkan variabel kolesterol dan
trigliserida darah
 Fixed factor: masukkan variabel gender

 Options - Display: aktifkan Homogenity test

 Continue dan OK
MANOVA (GLM-multivariate)

a
Box's Test of Equality of Covariance Matrices
Box's M .864
F .111
df1 6
df2 3329.708
Sig. .995
Tests the null hypothesis that the observed covariance
matrices of the dependent variables are equal across groups.
a. Design: Intercept+AGEGROUP
MANOVA (GLM-multivariate)

a
Levene's Test of Equality of Error Variances

F df1 df2 Sig.


Cholesterol 1.521 1 14 .238
Triglyceride .630 1 14 .440
Tests the null hypothesis that the error variance of the dependent
variable is equal across groups.
a. Design: Intercept+GENDER
MANOVA (GLM-multivariate)

Multivariate Testsb

Effect Value F Hypothesis df Error df Sig.


Intercept Pillai's Trace .996 1564.542a 2.000 13.000 .000
Wilks' Lambda .004 1564.542a 2.000 13.000 .000
Hotelling's Trace 240.699 1564.542a 2.000 13.000 .000
Roy's Largest Root 240.699 1564.542a 2.000 13.000 .000
GENDER Pillai's Trace .818 29.256a 2.000 13.000 .000
Wilks' Lambda .182 29.256a 2.000 13.000 .000
Hotelling's Trace 4.501 29.256a 2.000 13.000 .000
Roy's Largest Root 4.501 29.256a 2.000 13.000 .000
a. Exact statistic
b. Design: Intercept+GENDER
MANOVA (GLM-multivariate)
Tests of Between-Subjects Effects

Type III Sum


Source Dependent Variable of Squares df Mean Square F Sig.
Corrected Model Cholesterol 13274.766a 1 13274.766 52.633 .000
Triglyceride 1627.937b 1 1627.937 2.068 .172
Intercept Cholesterol 597334.766 1 597334.766 2368.373 .000
Triglyceride 296331.437 1 296331.437 376.396 .000
GENDER Cholesterol 13274.766 1 13274.766 52.633 .000
Triglyceride 1627.937 1 1627.937 2.068 .172
Error Cholesterol 3530.984 14 252.213
Triglyceride 11022.000 14 787.286
Total Cholesterol 646448.000 16
Triglyceride 319289.000 16
Corrected Total Cholesterol 16805.750 15
Triglyceride 12649.937 15
a. R Squared = .790 (Adjusted R Squared = .775)
b. R Squared = .129 (Adjusted R Squared = .066)
MANOVA (Factorial design)
 Variabel dependen lebih dari 1 dan
kelompok lebih dari 1, semisal:
 Bagaimana rata-rata kadar trigliserida dan
kolesterol (2 variabel dependen) berbeda secara
bermakna untuk tiap kelompok usia dan jenis
kelamin (2 kelompok)
MANOVA (Factorial design)
 Buka SPSS: file – data –dietstudy
 Analyze – general linear model –
multivariate:
 Dependent variable: TG0 dan WTG0
 Fixed factor: gender dan AGEGROUP
 Option – homogeneity test
 Continue- OK
MANOVA (Factorial design)
a
Box's Test of Equality of Covariance Matrices
Box's M 3.502
F .339
df1 6
df2 463.698
Sig. .916
Tests the null hypothesis that the observed covariance
matrices of the dependent variables are equal across groups.
a. Design: Intercept+GENDER+AGEGROUP+GENDER *
AGEGROUP
MANOVA (Factorial design)

a
Levene's Test of Equality of Error Variances

F df1 df2 Sig.


Cholesterol 1.852 5 10 .190
Triglyceride 1.091 5 10 .422
Tests the null hypothesis that the error variance of the dependent
variable is equal across groups.
a. Design: Intercept+GENDER+AGEGROUP+GENDER *
AGEGROUP
MANOVA (Factorial design)
Multivariate Testsc

Effect Value F Hypothesis df Error df Sig.


Intercept Pillai's Trace .996 1010.769a 2.000 9.000 .000
Wilks' Lambda .004 1010.769a 2.000 9.000 .000
Hotelling's Trace 224.615 1010.769a 2.000 9.000 .000
Roy's Largest Root 224.615 1010.769a 2.000 9.000 .000
GENDER Pillai's Trace .826 21.364a 2.000 9.000 .000
Wilks' Lambda .174 21.364a 2.000 9.000 .000
Hotelling's Trace 4.748 21.364a 2.000 9.000 .000
Roy's Largest Root 4.748 21.364a 2.000 9.000 .000
AGEGROUP Pillai's Trace .164 .448 4.000 20.000 .773
Wilks' Lambda .837 .420a 4.000 18.000 .792
Hotelling's Trace .194 .388 4.000 16.000 .814
Roy's Largest Root .188 .938b 2.000 10.000 .423
GENDER * AGEGROUP Pillai's Trace .199 .551 4.000 20.000 .701
Wilks' Lambda .808 .506a 4.000 18.000 .732
Hotelling's Trace .230 .459 4.000 16.000 .765
Roy's Largest Root .187 .933b 2.000 10.000 .425
a. Exact statistic
b. The statistic is an upper bound on F that yields a lower bound on the significance level.
c. Design: Intercept+GENDER+AGEGROUP+GENDER * AGEGROUP
MANOVA (Factorial design)
Tests of Between-Subjects Effects

Type III Sum


Source Dependent Variable of Squares df Mean Square F Sig.
Corrected Model Cholesterol 13794.217a 5 2758.843 9.161 .002
Triglyceride 3458.471b 5 691.694 .753 .603
Intercept Cholesterol 462728.955 1 462728.955 1536.523 .000
Triglyceride 234481.867 1 234481.867 255.108 .000
GENDER Cholesterol 10936.955 1 10936.955 36.317 .000
Triglyceride 2734.239 1 2734.239 2.975 .115
AGEGROUP Cholesterol 37.922 2 18.961 .063 .939
Triglyceride 1426.678 2 713.339 .776 .486
GENDER * AGEGROUP Cholesterol 491.654 2 245.827 .816 .469
Triglyceride 430.109 2 215.054 .234 .796
Error Cholesterol 3011.533 10 301.153
Triglyceride 9191.467 10 919.147
Total Cholesterol 646448.000 16
Triglyceride 319289.000 16
Corrected Total Cholesterol 16805.750 15
Triglyceride 12649.937 15
a. R Squared = .821 (Adjusted R Squared = .731)
b. R Squared = .273 (Adjusted R Squared = -.090)
MANOVA (Factorial design)

Estimated Marginal Means of Cholesterol Estimated Marginal Means of Triglyceride


240 180

220
160

200
Estimated Marginal Means

Estimated Marginal Means


140

180

Gender 120 Gender


160
Male Male

140 Female 100 Female


<50 50-60 >60 <50 50-60 >60

age grouping age grouping


PENGUKURAN BERULANG
 Mengetahui apakah ada perbedaan yang
bermakna pada suatu variabel yang diukur
secara berulang
PENGUKURAN BERULANG
 Buka SPSS: file – data –dietstudy
 Analyze – General Linear Model – Repeated Measures:
 Within subject factor name: ketik kolest
 Number of levels: ketik 5 (wgt0 – wgt4)
 Klik: Add – define:
 Within subject factor: pindahkan wgt0 s/d wgt4
 Between subject factor: pindahkan gender
 Klik: plot:
 Horizontal axis: gender
 Separate line: kolest
 Add dan Continue
 OK
PENGUKURAN BERULANG

Within-Subjects Factors

Measure: MEASURE_1
Dependent Betw een-Subjects Factors
KOLES Variable
1 WGT0 Value Label N
Gender 0 Male 9
2 WGT1
1 Female 7
3 WGT2
4 WGT3
5 WGT4
PENGUKURAN BERULANG
Multivariate Testsb

Effect Value F Hypothesis df Error df Sig.


KOLES Pillai's Trace .908 27.123a 4.000 11.000 .000
Wilks' Lambda .092 27.123a 4.000 11.000 .000
Hotelling's Trace 9.863 27.123a 4.000 11.000 .000
Roy's Largest Root 9.863 27.123a 4.000 11.000 .000
KOLES * GENDER Pillai's Trace .139 .444a 4.000 11.000 .775
Wilks' Lambda .861 .444a 4.000 11.000 .775
Hotelling's Trace .162 .444a 4.000 11.000 .775
Roy's Largest Root .162 .444a 4.000 11.000 .775
a. Exact statistic
b.
Design: Intercept+GENDER
Within Subjects Design: KOLES
PENGUKURAN BERULANG

Mauchly's Test of Sphericityb

Measure: MEASURE_1

a
Epsilon
Approx. Greenhous
Within Subjects Effect Mauchly's W Chi-Square df Sig. e-Geisser Huynh-Feldt Lower-bound
KOLES .399 11.423 9 .252 .763 1.000 .250
Tests the null hypothesis that the error covariance matrix of the orthonormalized transformed dependent variables is
proportional to an identity matrix.
a. May be used to adjust the degrees of freedom for the averaged tests of significance. Corrected tests are displayed in the
Tests of Within-Subjects Effects table.
b.
Design: Intercept+GENDER
Within Subjects Design: KOLES
PENGUKURAN BERULANG
Tests of Within-Subjects Effects

Measure: MEASURE_1
Type III Sum
Source of Squares df Mean Square F Sig.
KOLES Sphericity Assumed 639.892 4 159.973 57.534 .000
Greenhouse-Geisser 639.892 3.052 209.668 57.534 .000
Huynh-Feldt 639.892 4.000 159.973 57.534 .000
Lower-bound 639.892 1.000 639.892 57.534 .000
KOLES * GENDER Sphericity Assumed 2.142 4 .536 .193 .941
Greenhouse-Geisser 2.142 3.052 .702 .193 .904
Huynh-Feldt 2.142 4.000 .536 .193 .941
Lower-bound 2.142 1.000 2.142 .193 .667
Error(KOLES) Sphericity Assumed 155.708 56 2.780
Greenhouse-Geisser 155.708 42.727 3.644
Huynh-Feldt 155.708 56.000 2.780
Lower-bound 155.708 14.000 11.122
PENGUKURAN BERULANG
Tests of Within-Subjects Contrasts

Measure: MEASURE_1
Type III Sum
Source KOLES of Squares df Mean Square F Sig.
KOLES Linear 639.032 1 639.032 133.643 .000
Quadratic .737 1 .737 .479 .500
Cubic 9.921E-05 1 9.921E-05 .000 .996
Order 4 .123 1 .123 .089 .770
KOLES * GENDER Linear .032 1 .032 .007 .936
Quadratic .309 1 .309 .201 .661
Cubic .500 1 .500 .146 .708
Order 4 1.301 1 1.301 .947 .347
Error(KOLES) Linear 66.943 14 4.782
Quadratic 21.531 14 1.538
Cubic 47.994 14 3.428
Order 4 19.241 14 1.374
PENGUKURAN BERULANG

Tests of Between-Subjects Effects

Measure: MEASURE_1
Transformed Variable: Average
Type III Sum
Source of Squares df Mean Square F Sig.
Intercept 2860620.105 1 2860620.105 2162.867 .000
GENDER 66062.105 1 66062.105 49.948 .000
Error 18516.483 14 1322.606
PENGUKURAN BERULANG
Estimated Marginal Means of MEASURE_1
240

220

200
Estimated Marginal Means

180

Gender
160
Male

140 Female
1 2 3 4 5

KOLES
REGRESI BERGANDA
 Memprediksi besar variabel dependen
dengan menggunakan data variabel bebas
yang sudah diketahui besarnya
REGRESI BERGANDA
 Analyze – regression – linear:
 Dependent : WGT4
 Independent(s): WGT0, TG0, AGE
 Case labels: gender
 Method: enter
 OK
REGRESI BERGANDA
Variables Entered/Removedb

Variables Variables
Model Entered Removed Method
1 Cholestero
l, Age in
years, . Enter
Triglycerid
a
e
a. All requested variables entered.
b. Dependent Variable: Final cholesterol
REGRESI BERGANDA

Model Summary

Adjusted Std. Error of


Model R R Square R Square the Estimate
1 .997a .994 .992 2.953
a. Predictors: (Constant), Cholesterol, Age in years,
Triglyceride
REGRESI BERGANDA

ANOVAb

Sum of
Model Squares df Mean Square F Sig.
1 Regression 16736.790 3 5578.930 639.737 .000a
Residual 104.648 12 8.721
Total 16841.438 15
a. Predictors: (Constant), Cholesterol, Age in years, Triglyceride
b. Dependent Variable: Final cholesterol
REGRESI BERGANDA
Coefficientsa

Unstandardized Standardized
Coefficients Coefficients
Model B Std. Error Beta t Sig.
1 (Constant) 3.375 8.574 .394 .701
Age in years -.164 .111 -.034 -1.477 .165
Triglyceride -.010 .027 -.009 -.373 .716
Cholesterol .995 .024 .994 42.243 .000
a. Dependent Variable: Final cholesterol

Persamaan regresi:
Kadar kolesterol akhir = 3,375 – 0,164 usia – 0,10 kadar
trigliserida awal + 0,995 kadar kolesterol awal
REGRESI BERGANDA

Residuals Statisticsa

Minimum Maximum Mean Std. Deviation N


Predicted Value 142.66 249.33 190.31 33.403 16
Residual -5.05 4.88 .00 2.641 16
Std. Predicted Value -1.426 1.767 .000 1.000 16
Std. Residual -1.712 1.652 .000 .894 16
a. Dependent Variable: Final cholesterol
REGRESI BERGANDA
Variables Entered/Removedb

Variables Variables
Model Entered Removed Method
1 Cholestero
a . Enter
l
a. All requested variables entered.
b. Dependent Variable: Final cholesterol

Model Summaryb

Adjusted Std. Error of


Model R R Square R Square the Estimate
1 .996a .993 .992 2.986
a. Predictors: (Constant), Cholesterol
b. Dependent Variable: Final cholesterol
REGRESI BERGANDA

ANOVAb

Sum of
Model Squares df Mean Square F Sig.
1 Regression 16716.618 1 16716.618 1874.976 .000a
Residual 124.819 14 8.916
Total 16841.438 15
a. Predictors: (Constant), Cholesterol
b. Dependent Variable: Final cholesterol
REGRESI BERGANDA
Coefficientsa

Unstandardized Standardized
Coefficients Coefficients
Model B Std. Error Beta t Sig.
1 (Constant) -7.536 4.630 -1.628 .126
Cholesterol .997 .023 .996 43.301 .000
a. Dependent Variable: Final cholesterol

Persamaan regresi:
Kadar kolesterol akhir = -7,536 + 0,997 kadar kolesterol
awal
Correlations

Final
Cholesterol cholesterol
Cholesterol Pearson Correlation 1 .996**
Sig. (2-tailed) . .000
N 16 16
Final cholesterol Pearson Correlation .996** 1
Sig. (2-tailed) .000 .
N 16 16
**. Correlation is significant at the 0.01 level (2-tailed).

250 
Linear Regression
Final chole s te rol = -7.54 + 1.00 * w gt0
R-Square = 0.99

 
225
Final cholesterol



200


175 




150

150 175 200 225 250

Cholesterol
Uji regresi logistik binari
 Ingin memprediksi variabel dependen
yang berskala binari (ya=1 dan tidak=0)
dengan menggunakan data variabel
independen yang sudah diketahui
besarnya
Uji regresi logistik binari
 Buka SPSS: file – data –dietstudy
 Analyze – Regression – Binary logistic:
 Dependent: cholst0 (status kadar kolesterol
awal, 1=tinggi, 0=normal)
 Covariates: age dan TG0
 Options: Homer-Lemeshow goodness of fit
 OK
Uji regresi logistik binari

Case Processing Summary


a
Unweighted Cases N Percent
Selected Cases Included in Analysis 16 100.0
Missing Cases 0 .0
Total 16 100.0
Unselected Cases 0 .0
Total 16 100.0
a. If weight is in effect, see classification table for the total
number of cases.
Uji regresi logistik binari

Omnibus Tests of Model Coefficients

Chi-square df Sig.
Step 1 Step 1.902 2 .386
Block 1.902 2 .386
Model 1.902 2 .386
Uji regresi logistik binari
Model Summary

-2 Log Cox & Snell Nagelkerke


Step likelihood R Square R Square
1 20.028 .112 .150

Hosmer and Lemeshow Test

Step Chi-square df Sig.


1 9.129 6 .166
Uji regresi logistik binari
Contingency Table for Hosmer and Lemeshow Test

cholesterol status = cholesterol status =


normal high
Observed Expected Observed Expected Total
Step 1 2 1.570 0 .430 2
1 2 2 1.516 0 .484 2
3 1 1.453 1 .547 2
4 0 1.118 2 .882 2
5 0 1.024 2 .976 2
6 2 .920 0 1.080 2
7 1 .787 1 1.213 2
8 1 .613 1 1.387 2
Uji regresi logistik binari

Classification Tablea

Predicted

cholesterol status Percentage


Observed normal high Correct
Step 1 cholesterol status normal 5 4 55.6
high 4 3 42.9
Overall Percentage 50.0
a. The cut value is .500
Uji regresi logistik binari
Variables in the Equation

B S.E. Wald df Sig. Exp(B)


Step
a
AGE .042 .079 .277 1 .598 1.043
1 TG0 .025 .020 1.527 1 .217 1.025
Constant -5.970 5.416 1.215 1 .270 .003
a. Variable(s) entered on step 1: AGE, TG0.

Penafsiran dan prediksi:


Kadar kolesterol tinggi = -5,970 + 0,42 usia + 0,025
kadar trigliserida
REGRESI BERGANDA –
variabel dummy
 Memprediksi besar variabel dependen
dengan menggunakan data variabel bebas
dimana satu atau lebih variabel bebas
adalah variabel dummy (ya=1 dan tidak=0)
REGRESI BERGANDA –
variabel dummy
 Buka SPSS: file – data –dietstudy
 Analyze – Regression – Linier:
 Dependent: wgt4
 Independent: gender, cholst0, trigst0
 Methods: enter
 OK
REGRESI BERGANDA –
variabel dummy
Variables Entered/Removedb

Variables Variables
Model Entered Removed Method
1 triglyceride
status,
cholesterol . Enter
status, a
Gender
a. All requested variables entered.
b. Dependent Variable: Final cholesterol
REGRESI BERGANDA –
variabel dummy

Model Summary

Adjusted Std. Error of


Model R R Square R Square the Estimate
1 .932a .869 .836 13.551
a. Predictors: (Constant), triglyceride status, cholesterol
status, Gender
REGRESI BERGANDA –
variabel dummy

ANOVAb

Sum of
Model Squares df Mean Square F Sig.
1 Regression 14637.729 3 4879.243 26.569 .000a
Residual 2203.709 12 183.642
Total 16841.438 15
a. Predictors: (Constant), triglyceride status, cholesterol status, Gender
b. Dependent Variable: Final cholesterol
REGRESI BERGANDA –
variabel dummy

Coefficientsa

Unstandardized Standardized
Coefficients Coefficients
Model B Std. Error Beta t Sig.
1 (Constant) 194.020 10.219 18.987 .000
Gender -35.437 10.971 -.542 -3.230 .007
cholesterol status 30.003 10.877 .459 2.758 .017
triglyceride status -3.039 7.100 -.046 -.428 .676
a. Dependent Variable: Final cholesterol
REGRESI BERGANDA –
variabel dummy
Coefficientsa

Unstandardized Standardized
Coefficients Coefficients
Model B Std. Error Beta t Sig.
1 (Constant) 192.500 9.276 20.752 .000
Gender -34.786 10.518 -.532 -3.307 .006
cholesterol status 29.786 10.518 .455 2.832 .014
a. Dependent Variable: Final cholesterol

Penafsiran dan prediksi:


Kadar kolesterol akhir = 192,500 – 34,786 gender +
29,786 kadar kolesterol awal
Uji analisis faktor
 Ingin diketahui kadar kolesteol yang mana
yang menentukan kadar kolesterol akhir
dari beberapa data kadar kolesterol yang
ada?
Uji analisis faktor
 Buka SPSS: file – data –dietstudy
 Analyze – Data reduction - Factor:
 Wgt0 s/d wgt4
 Descriptives:
 Correlation matrix:
 KMO and Bartletts’s test of spherity
 Anti image

 Continue dan OK
Uji analisis faktor

KMO and Bartlett's Test


Kaiser-Meyer-Olkin Measure of Sampling
Adequacy. .894

Bartlett's Test of Approx. Chi-Square 294.198


Sphericity df 10
Sig. .000
Uji analisis faktor
Anti-image Matrices

1st interim 2nd interim 3rd interim Final


Cholesterol cholesterol cholesterol cholesterol cholesterol
Anti-image Covariance Cholesterol .003 .000 -.001 -.001 .001
1st interim cholesterol .000 .003 -.001 .000 -1.847E-05
2nd interim cholesterol -.001 -.001 .001 .000 -.001
3rd interim cholesterol -.001 .000 .000 .003 -.001
Final cholesterol .001 -1.847E-05 -.001 -.001 .003
Anti-image Correlation Cholesterol .899a -.092 -.536 -.248 .301
1st interim cholesterol -.092 .935a -.516 .065 -.007
2nd interim cholesterol -.536 -.516 .820a -.246 -.512
3rd interim cholesterol -.248 .065 -.246 .937a -.378
Final cholesterol .301 -.007 -.512 -.378 .889a
a. Measures of Sampling Adequacy(MSA)
Uji analisis faktor

Communalities

Initial Extraction
Cholesterol 1.000 .998
1st interim cholesterol 1.000 .998
2nd interim cholesterol 1.000 .999
3rd interim cholesterol 1.000 .998
Final cholesterol 1.000 .998
Extraction Method: Principal Component Analysis.
Uji analisis faktor

Total Variance Explained

Initial Eigenvalues Extraction Sums of Squared Loadings


Component Total % of Variance Cumulative % Total % of Variance Cumulative %
1 4.991 99.816 99.816 4.991 99.816 99.816
2 .004 .080 99.896
3 .003 .059 99.954
4 .002 .033 99.988
5 .001 .012 100.000
Extraction Method: Principal Component Analysis.
Uji analisis faktor
Scree Plot
6

2
Eigenvalue

0
1 2 3 4 5

Component Number
Uji analisis faktor
Component Matrixa

Compone
nt
1
Cholesterol .999
1st interim cholesterol .999
2nd interim cholesterol 1.000
3rd interim cholesterol .999
Final cholesterol .999
Extraction Method: Principal Component Analysis.
a. 1 components extracted.
ANALISIS DISKRIMINAN
 Ingin membuat model yang bisa secara
jelas menunjukkan perbedaan antar isi
variabel dependen, misal:
 Kadar kolesterol dan trigliserida pada
kelompok laki-laki (=0) dan perempuan (=1)
ANALISIS DISKRIMINAN
 Buka SPSS: file – data –dietstudy
 Analyze – Clasify - Discriminant:
 Grouping variable: gender
 Define range: 0 dan 1
 Independent: age, wgt0, tg0, wgt4 dan tg4
 Statistics:
 Descriptives: Means
 Function coefficients: Fisher’s dam Unstandardized
ANALISIS DISKRIMINAN
 Use stepwise method
 Method: Mahalanobis distance
 Criteria: use probability of F

 Clasify:
 Display: Casewise results, Leave-one-out-
classification
 Continue dan OK
ANALISIS DISKRIMINAN
Group Statistics

Valid N (listwise)
Gender Mean Std. Deviation Unweighted Weighted
Male Age in years 54.00 7.036 9 9.000
Triglyceride 147.33 26.847 9 9.000
Cholesterol 223.78 18.754 9 9.000
Final triglyceride 117.11 28.790 9 9.000
Final cholesterol 215.67 18.076 9 9.000
Female Age in years 55.57 7.208 7 7.000
Triglyceride 127.00 29.597 7 7.000
Cholesterol 165.71 10.935 7 7.000
Final triglyceride 133.71 29.607 7 7.000
Final cholesterol 157.71 12.932 7 7.000
Total Age in years 54.69 6.916 16 16.000
Triglyceride 138.44 29.040 16 16.000
Cholesterol 198.38 33.472 16 16.000
Final triglyceride 124.38 29.412 16 16.000
Final cholesterol 190.31 33.508 16 16.000
ANALISIS DISKRIMINAN
Variables Entered/Removeda,b,c,d

Min. D Squared

Between Exact F
Step Entered Statistic Groups Statistic df1 df2 Sig.
1 Cholester Male and
13.367 52.633 1 14.000 4.192E-06
ol Female
At each step, the variable that maximizes the Mahalanobis distance between the two closest
groups is entered.
a. Maximum number of steps is 10.
b. Maximum significance of F to enter is .05.
c. Minimum significance of F to remove is .10.
d. F level, tolerance, or VIN insufficient for further computation.
ANALISIS DISKRIMINAN

Variables in the Analysis

Sig. of F to
Step Tolerance Remove
1 Cholesterol 1.000 .000
ANALISIS DISKRIMINAN
Variables Not in the Analysis

Min. Sig. of F Min. D Between


Step Tolerance Tolerance to Enter Squared Groups
0 Age in years Male and
1.000 1.000 .668 .049
Female
Triglyceride Male and
1.000 1.000 .172 .525
Female
Cholesterol Male and
1.000 1.000 .000 13.367
Female
Final triglyceride Male and
1.000 1.000 .277 .325
Female
Final cholesterol Male and
1.000 1.000 .000 12.998
Female
1 Age in years Male and
.995 .995 .977 13.368
Female
Triglyceride Male and
.945 .945 .178 16.003
Female
Final triglyceride Male and
.957 .957 .869 13.404
Female
Final cholesterol Male and
.034 .034 .953 13.372
Female
ANALISIS DISKRIMINAN
Wilks' Lambda

Number of Exact F
Step Variables Lambda df1 df2 df3 Statistic df1 df2 Sig.
1 1 .210 1 1 14 52.633 1 14.000 .000

Eigenvalues

Canonical
Function Eigenvalue % of Variance Cumulative % Correlation
1 3.760a 100.0 100.0 .889
a. First 1 canonical discriminant functions were used in the
analysis.

Wilks' Lambda

Wilks'
Test of Function(s) Lambda Chi-square df Sig.
1 .210 21.062 1 .000
ANALISIS DISKRIMINAN
Structure Matrix

Function
1
Cholesterol 1.000
Final cholesterola .983
Triglyceridea -.234
Final triglyceridea -.207
Age in yearsa -.069
Pooled within-groups correlations between discriminating
variables and standardized canonical discriminant functions
Variables ordered by absolute size of correlation within function.
a. This variable not used in the analysis.
ANALISIS DISKRIMINAN
Canonical Discriminant Function Coefficients

Function
1
Cholesterol .063
(Constant) -12.491
Unstandardized coefficients
Skor Z = -12,491 + 0,063 kadar kolesterol awal
ANALISIS DISKRIMINAN

Functions at Group Centroids

Function
Gender 1
Male 1.600
Female -2.057
Unstandardized canonical discriminant
functions evaluated at group means
ANALISIS DISKRIMINAN

Prior Probabilities for Groups

Cases Used in Analysis


Gender Prior Unweighted Weighted
Male .500 9 9.000
Female .500 7 7.000
Total 1.000 16 16.000
ANALISIS DISKRIMINAN
Classification Function Coefficients

Gender
Male Female
Cholesterol .887 .657
(Constant) -99.967 -55.134
Fisher's linear discriminant functions

Skor kolesterol pada laki-laki = -99,967 + 0,887 kolesterol awal


Skor kolesterol pada perempuan = -55,134 + 0,657 kolesterol awal
Selisih antar keduanya (skor Z) = -44,833 + 0,23 kolesterol awal
Skor Z sebelumnya = -12,491 + 0,063 kolesterol awal
ANALISIS DISKRIMINAN Casewise Statistics

Discriminant
Highest Group Second Highest Group Scores

Squared Squared
Mahalanobis Mahalanobis
Predicted P(D>d | G=g) Distance to Distance to
Case Number Actual Group Group p df P(G=g | D=d) Centroid Group P(G=g | D=d) Centroid Function 1
Original 1 0 0 .105 1 .679 2.635 1 .321 4.133 -.024
2 0 0 .405 1 1.000 .693 1 .000 20.148 2.432
3 0 0 .561 1 1.000 .337 1 .000 17.951 2.180
4 1 1 .403 1 .974 .700 0 .026 7.950 -1.220
5 0 0 .764 1 .996 .091 1 .004 11.258 1.299
6 1 1 .836 1 .997 .043 0 .003 11.897 -1.850
7 0 0 .911 1 .998 .013 1 .002 12.561 1.488
8 1 1 .935 1 .998 .007 0 .002 12.782 -1.976
9 0 0 .119 1 .727 2.434 1 .273 4.393 .039
10 0 0 .561 1 1.000 .337 1 .000 17.951 2.180
11 1 1 .403 1 .974 .700 0 .026 7.950 -1.220
12 1 1 .627 1 1.000 .236 0 .000 17.155 -2.542
13 1 1 .583 1 1.000 .301 0 .000 17.681 -2.605
14 0 0 .624 1 .993 .240 1 .007 10.026 1.110
15 0 0 .036 1 1.000 4.376 1 .000 33.040 3.691
16 1 1 .354 1 1.000 .858 0 .000 21.001 -2.983
Cross-validated a 1 0 0 .047 1 .615 3.928 2 .385 4.868
2 0 0 .353 1 1.000 .863 2 .000 19.813
3 0 0 .523 1 1.000 .407 2 .000 17.133
4 1 1 .332 1 .969 .939 1 .031 7.839
5 0 0 .743 1 .995 .107 2 .005 10.530
6 1 1 .816 1 .996 .054 1 .004 11.087
7 0 0 .903 1 .997 .015 2 .003 11.676
8 1 1 .927 1 .997 .008 1 .003 11.875
9 0 0 .059 1 .681 3.556 2 .319 5.071
10 0 0 .523 1 1.000 .407 2 .000 17.133
11 1 1 .332 1 .969 .939 1 .031 7.839
12 1 1 .581 1 1.000 .304 1 .000 16.249
13 1 1 .532 1 1.000 .390 1 .000 16.840
14 0 0 .592 1 .990 .287 2 .010 9.493
15 0 0 .005 1 1.000 7.932 2 .000 47.320
16 1 1 .280 1 1.000 1.169 1 .000 21.003
For the original data, squared Mahalanobis distance is based on canonical functions.
For the cross-validated data, squared Mahalanobis distance is based on observations.
a. Cross validation is done only for those cases in the analysis. In cross validation, each case is classified by the functions derived from all cases other than that case.
ANALISIS DISKRIMINAN
Classification Resultsb,c

Predicted Group
Membership
Gender Male Female Total
Original Count Male 9 0 9
Female 0 7 7
% Male 100.0 .0 100.0
Female .0 100.0 100.0
Cross-validated a Count Male 9 0 9
Female 0 7 7
% Male 100.0 .0 100.0
Female .0 100.0 100.0
a. Cross validation is done only for those cases in the analysis. In
cross validation, each case is classified by the functions derived
from all cases other than that case.
b. 100.0% of original grouped cases correctly classified.
c. 100.0% of cross-validated grouped cases correctly classified.
ANALISIS DISKRIMINAN
 Kesimpulan:
 Analisis Wilk’s Lambda (sig <0.001)
 Variable in analysis (Variabel yang membedakan
gender laki-laki dan perempuan adalah kadar
kolesterol awal)
 Model diskriminannya:
Skor Z = -12,491 + 0,063 kadar kolesterol awal
 Model di atas mempunyai ketepatan
mengklasifikasikan gender sebesar 100% (ketepatan
sangat tinggi), dan model dapat digunakan untuk
mengklasifikasikan gender dari data kolesterol awal

Das könnte Ihnen auch gefallen