Beruflich Dokumente
Kultur Dokumente
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
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
Parameter Estimates
Linear Regression
250
225
Cholesterol
200
150
45 50 55 60
Age in years
GLM - univariat
220
200
Estimated Marginal Means
180
Gender
160
Male
140 Female
<50 50-60 >60
age grouping
MANOVA (GLM-multivariate)
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
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
Multivariate Testsb
a
Levene's Test of Equality of Error Variances
220
160
200
Estimated Marginal Means
180
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
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
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
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
Variables Variables
Model Entered Removed Method
1 Cholestero
a . Enter
l
a. All requested variables entered.
b. Dependent Variable: Final cholesterol
Model Summaryb
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
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
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
Classification Tablea
Predicted
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
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
Continue dan OK
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
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
Sig. of F to
Step Tolerance Remove
1 Cholesterol 1.000 .000
ANALISIS DISKRIMINAN
Variables Not in the Analysis
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
Function
Gender 1
Male 1.600
Female -2.057
Unstandardized canonical discriminant
functions evaluated at group means
ANALISIS DISKRIMINAN
Gender
Male Female
Cholesterol .887 .657
(Constant) -99.967 -55.134
Fisher's linear discriminant functions
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