Escolar Documentos
Profissional Documentos
Cultura Documentos
LATIHAN KE 12A
Oleh :
Abdullah M. Jaubah
Pendahuluan
Analisis regresi ini memakai data yang tersedia dalam SPSS yaitu data Car_sales.sav,
german_credit.sav, advert.sav, dan arsip data virus.sav. Pemakaian ketiga arsip data ini
mencakup pemakaian dalam analisis regresi, analisis faktor, penyajian grafik melalui Chart
Builder, Ordinal Regression, dan Curve Estimation.
Cara pemakaian SPSS mencakup cara pemakaian point and click berdasar atas menu. Cara ini
akan mencipta perintah-perintah sintaksis dan hasil-hasil lain. Perintah-perintah sintaksis
yang dicipta kemudian dikumpulkan ke dalam arsip sintaksis. Arsip sintaksis ini kemudian
dilaksanakan setelah dimuat dalam Syntax Editor dengan cara memakai perintah Run>All.
Cara point and click tidak dijelaskan di sini karena tulisan ini disusun dengan tujuan
memperkenalkan sintaksis SPSS. Interpretasi atas hasil-hasil dari sintaksis ini juga tidak
dijelaskan.
Arsip Sintaksis SPSS
Arsip sintaksis SPSS adalah sebagai berikut :
******************************************************
***** Abdullah M. Jaubah
******************************************************
GET
FILE='D:\SPSS22\car_sales.sav'.
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA COLLIN TOL ZPP
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT lnsales
/METHOD=ENTER type price engine_s horsepow wheelbas width length curb_wgt fuel_cap mpg.
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA COLLIN TOL ZPP
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT lnsales
/METHOD=ENTER ztype zprice zengine_ zhorsepo zwheelba zwidth zlength zcurb_wg zfuel_ca zmpg.
******************************************************
***** Factor Analysis
******************************************************
FACTOR
/VARIABLES ztype zprice zengine_ zhorsepo zwheelba zwidth zlength zcurb_wg zfuel_ca zmpg
/MISSING LISTWISE
/ANALYSIS ztype zprice zengine_ zhorsepo zwheelba zwidth zlength zcurb_wg zfuel_ca zmpg
/PRINT INITIAL EXTRACTION ROTATION
/CRITERIA FACTORS(10) ITERATE(25)
/EXTRACTION PC
/CRITERIA ITERATE(25)
/ROTATION VARIMAX
/SAVE REG(ALL)
/METHOD=CORRELATION.
******************************************************
***** Regression Analysis
******************************************************
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA COLLIN TOL ZPP
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT lnsales
/METHOD=ENTER FAC1_1 FAC2_1 FAC3_1 FAC4_1 FAC5_1 FAC6_1 FAC7_1 FAC8_1 FAC9_1 FAC10_1.
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT lnsales
/METHOD=STEPWISE FAC1_1 FAC2_1 FAC3_1 FAC4_1 FAC5_1 FAC6_1 FAC7_1 FAC8_1 FAC9_1 FAC10_1
/SCATTERPLOT=(*SDRESID ,*ZPRED )
/RESIDUALS HIST(ZRESID) ID( model )
/CASEWISE PLOT(ZRESID) OUTLIERS(2)
/SAVE ZPRED ZRESID COOK LEVER .
******************************************************
***** Chart Builder
******************************************************
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=FAC1_1 ZRE_1 model MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: FAC1_1=col(source(s), name("FAC1_1"))
DATA: ZRE_1=col(source(s), name("ZRE_1"))
DATA: model=col(source(s), name("model"), unit.category())
GUIDE: axis(dim(1), label("REGR factor score 1 for analysis 1"))
GUIDE: axis(dim(2), label("Standardized Residual"))
ELEMENT: point(position(FAC1_1*ZRE_1), label(model))
END GPL.
******************************************************
***** Chart Builder
******************************************************
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=LEV_1 COO_1 model MISSING=
LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: LEV_1=col(source(s), name("LEV_1"))
DATA: COO_1=col(source(s), name("COO_1"))
DATA: model=col(source(s), name("model"), unit.category())
GUIDE: axis(dim(1), label("Centered Leverage Value"))
GUIDE: axis(dim(2), label("Cook's Distance"))
ELEMENT: point(position(LEV_1*COO_1), label(model))
END GPL.
******************************************************
******************************************************
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=FIT_1 ERR_1 MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: FIT_1=col(source(s), name("FIT_1"))
DATA: ERR_1=col(source(s), name("ERR_1"))
GUIDE: axis(dim(1), label("Fit for sales with advert from CURVEFIT,",
" MOD_1 LINEAR"))
GUIDE: axis(dim(2), label("Error for sales with advert from CURVEFIT, ",
"MOD_1 LINEAR"))
ELEMENT: point(position(FIT_1*ERR_1))
END GPL.
******************************************************
***** Chart Builder
******************************************************
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=FIT_2 ERR_2 MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: FIT_2=col(source(s), name("FIT_2"))
DATA: ERR_2=col(source(s), name("ERR_2"))
GUIDE: axis(dim(1), label("Fit for sales with advert from CURVEFIT,",
" MOD_1 QUADRATIC"))
GUIDE: axis(dim(2), label("Error for sales with advert from CURVEFIT, ",
"MOD_1 QUADRATIC"))
ELEMENT: point(position(FIT_2*ERR_2))
END GPL.
******************************************************
***** Abdullah M. Jaubah
******************************************************
GET
FILE='D:\SPSS\virus.sav'.
******************************************************
***** Curve Estimation
******************************************************
* Curve Estimation.
TSET NEWVAR=NONE.
CURVEFIT
/VARIABLES=infected WITH time
/CONSTANT
/MODEL=CUBIC
/PLOT FIT.
/SAVE=PRED RESID .
******************************************************
***** Chart Builder
******************************************************
* Chart Builder.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=FIT_1 ERR_1 MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: FIT_1=col(source(s), name("FIT_1"))
DATA: ERR_1=col(source(s), name("ERR_1"))
GUIDE: axis(dim(1), label("Fit for sales with advert from CURVEFIT,",
" MOD_1 QUADRATIC"))
GUIDE: axis(dim(2), label("Error for sales with advert from CURVEFIT, ",
"MOD_1 QUADRATIC"))
ELEMENT: point(position(FIT_1*ERR_1))
END GPL.
Sintaksis di atas mencakup sintaksis dari analisis regresi, analisis faktor, analisis regresi, tiga
chart builder, ordinal regression, chart builder, Curve Estimation, dan chart builder. Hal ini
berarti bahwa analisis regresi berhubungan pula dengan analisis faktor atas variabel-variabel
berjenis scale, dan juga analisis regresi ordinal berdasar atas variabel berjenis ordinal.
Pelaksanaan sintaksis di atas dilakukan dengan cara menuat arsip sintaksis tersebut ke dalam
Syntax Editor kemudian perintah Run>All dipakai. Langkah ini akan menyajikan sintaksis
dan hasil-hasil dari tiap kelompok sintaksis.
Hasil Pelaksanaan Sintaksis
Hasil pelaksanaan sintaksis di atas adalah sebagai berikut :
******************************************************
***** Abdullah M. Jaubah
******************************************************
GET
FILE='D:\SPSS22\car_sales.sav'.
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA COLLIN TOL ZPP
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT lnsales
/METHOD=ENTER type price engine_s horsepow wheelbas width length curb_wgt fuel_cap mpg.
Variables Entered/Removeda
Variables
Model
1
Variables Entered
Removed
Method
. Enter
Model Summary
Model
1
R Square
,697
,486
Adjusted R Square
,449
a. Predictors: (Constant), Fuel efficiency, Length, Price in thousands, Vehicle type, Width, Engine size, Fuel capacity,
Wheelbase, Curb weight, Horsepower
ANOVAa
Model
Sum of Squares
df
Mean Square
Regression
130,300
10
13,030
Residual
138,082
141
,979
Total
268,383
151
Sig.
,000b
13,305
Coefficientsa
Unstandardized
Coefficients
Model
B
(Constant)
Vehicle type
Price in thousands
Standar
dized Coeffi
cients
Std. Error
-3,017
2,741
0,883
0,331
-0,046
0,013
Correlations
t
Sig.
Zeroorder
Beta
Partial
Part
Tolerance
-1,101
0,273
0,293
2,67
0,008
0,274
0,219
0,161
0,304
-0,502
-3,596
-0,552
-0,29
-0,217
0,187
Engine size
0,356
0,19
0,281
1,871
0,063
-0,135
0,156
0,113
0,162
Horsepower
-0,002
0,004
-0,092
-0,509
0,611
-0,389
-0,043
-0,031
0,112
1 Wheelbase
0,042
0,023
0,241
1,785
0,076
0,292
0,149
0,108
0,2
Width
-0,028
0,042
-0,073
-0,676
0,5
0,037
-0,057
-0,041
0,313
Length
0,015
0,014
0,148
1,032
0,304
0,215
0,087
0,062
0,178
Curb weight
0,156
0,35
0,075
0,447
0,655
-0,041
0,038
0,027
0,131
Fuel capacity
-0,057
0,047
-0,167
-1,203
0,231
-0,016
-0,101
-0,073
0,189
0,081
0,04
0,262
2,023
0,045
0,121
0,168
0,122
0,217
Fuel efficiency
Dimension
Eigen
value
Condition
Index
(Cons
tant)
Vehicle
type
Price in
thousands
Engine
size
Horse
power
Wheel
base
Width
Length
Curb
weight
Fuel
capacity
Fuel
effi
ciency
9,92
0,733
3,678
0,28
0,259
6,193
0,07
0,01
0,01
0,05
14,051
0,12
0,3
0,14
0,02
0,019
22,589
0,27
0,01
0,1
0,07
0,03
0,18
0,05
0,008
35,942
0,26
0,62
0,73
0,01
0,01
0,05
0,005
44,275
0,05
0,01
0,01
0,29
0,78
0,13
0,003
58,48
0,01
0,24
0,03
0,17
0,07
0,01
0,03
0,59
0,02
0,42
0,002
76,175
0,18
0,07
0,03
0,01
0,11
0,11
0,07
0,25
10
0,001
130,747
0,06
0,1
0,03
0,01
0,67
0,08
0,8
0,02
0,01
0,01
11
148,267
0,75
0,16
0,07
0,05
0,15
0,8
0,08
0,05
0,08
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA COLLIN TOL ZPP
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT lnsales
/METHOD=ENTER ztype zprice zengine_ zhorsepo zwheelba zwidth zlength zcurb_wg zfuel_ca zmpg.
Variables Entered/Removeda
Model
Variables Entered
Variables Removed
Method
. Enter
Model Summary
Model
R Square
,697
Adjusted R Square
,486
,449
,98960
a. Predictors: (Constant), Zscore: Fuel efficiency, Zscore: Length, Zscore: Price in thousands, Zscore: Type,
Zscore: Width, Zscore: Engine size, Zscore: Fuel capacity, Zscore: Wheelbase, Zscore: Curb weight, Zscore:
Horsepower
ANOVAa
Model
1
Sum of Squares
df
Mean Square
Regression
130,300
10
13,030
Residual
138,082
141
,979
Total
268,383
151
13,305
Sig.
,000b
Model
Unstandardized
Coefficients
Standardized
Coefficients
Sig.
Correlations
Collinearity
Statistics
Std.
Error
B
(Constant)
Zscore: Type
3,293
0,08
40,974
Partia
l
Part
Toler
ance
VIF
0,389
0,146
0,293
2,67
0,008
0,274
0,219
0,161
0,304
3,293
-0,666
0,185
-0,502
-3,596
-0,552
-0,29
-0,217
0,187
5,337
0,372
0,199
0,281
1,871
0,063
-0,135
0,156
0,113
0,162
6,159
Zscore: Horsepower
-0,122
0,24
-0,092
-0,509
0,611
-0,389
-0,043
-0,031
0,112
8,896
Zeroorder
Beta
Zscore: Wheelbase
0,318
0,178
0,241
1,785
0,076
0,292
0,149
0,108
0,2
4,997
Zscore: Width
-0,097
0,143
-0,073
-0,676
0,5
0,037
-0,057
-0,041
0,313
3,193
Zscore: Length
0,196
0,19
0,148
1,032
0,304
0,215
0,087
0,062
0,178
5,605
0,099
0,221
0,075
0,447
0,655
-0,041
0,038
0,027
0,131
7,644
-0,22
0,183
-0,167
-1,203
0,231
-0,016
-0,101
-0,073
0,189
5,303
0,348
0,172
0,262
2,023
0,045
0,121
0,168
0,122
0,217
4,604
Collinearity Diagnosticsa
Variance Proportions
Mod
el
Zscor
e:
Type
Zscore:
Price
in
thousa
nds
Zscor
e:
Engi
ne
size
Zscore:
Horsepo
wer
Zscore:
Wheelb
ase
Zscor
e:
Widt
h
Zscor
e:
Leng
th
Zsco
re:
Curb
weig
ht
Zscor
e:
Fuel
capac
ity
Zscore:
Fuel
efficien
cy
Dimens
ion
Eigenva
lue
Conditi
on
Index
5,994
0,01
1,654
1,903
0,03
0,04
0,02
0,02
0,01
1,127
2,306
0,03
0,1
0,02
0,02
0,04
0,01
0,02
0,996
2,453
0,97
0,339
4,206
0,12
0,08
0,08
0,33
0,02
0,01
0,03
0,01
0,254
4,857
0,04
0,05
0,13
0,03
0,02
0,41
0,05
0,02
0,08
0,02
0,199
5,484
0,36
0,06
0,01
0,02
0,12
0,08
0,05
0,01
0,06
0,38
0,155
6,225
0,03
0,18
0,01
0,15
0,08
0,02
0,09
0,19
0,51
0,13
6,793
0,05
0,03
0,02
0,02
0,08
0,09
0,4
0,59
10
0,091
8,137
0,37
0,25
0,14
0,48
0,05
0,55
0,14
0,04
0,02
11
0,061
9,874
0,04
0,66
0,34
0,76
0,04
0,02
0,17
0,32
0,03
(Consta
nt)
******************************************************
***** Factor Analysis
******************************************************
FACTOR
/VARIABLES ztype zprice zengine_ zhorsepo zwheelba zwidth zlength zcurb_wg zfuel_ca zmpg
/MISSING LISTWISE
/ANALYSIS ztype zprice zengine_ zhorsepo zwheelba zwidth zlength zcurb_wg zfuel_ca zmpg
/PRINT INITIAL EXTRACTION ROTATION
/CRITERIA FACTORS(10) ITERATE(25)
/EXTRACTION PC
/CRITERIA ITERATE(25)
/ROTATION VARIMAX
/SAVE REG(ALL)
/METHOD=CORRELATION.
Communalities
Initial
Extraction
Zscore: Type
1,000
1,000
1,000
1,000
1,000
1,000
Zscore: Horsepower
1,000
1,000
Zscore: Wheelbase
1,000
1,000
Zscore: Width
1,000
1,000
Zscore: Length
1,000
1,000
1,000
1,000
1,000
1,000
1,000
1,000
Initial Eigenvalues
Componen
t
1
2
3
4
5
6
7
8
9
10
Total
5,99
4
1,65
4
1,12
3
0,33
9
0,25
4
0,19
9
0,15
5
0,13
0,09
1
0,06
1
% of
Variance
Cumulative
%
Total
% of
Variance
Cumulative
%
Total
% of
Variance
Cumulative
%
59,938
59,938
5,99
59,9
59,938
2,611
26,114
26,114
16,545
76,482
1,65
16,5
76,482
24,536
50,65
11,227
87,709
1,12
11,2
87,709
16,947
67,597
3,389
91,098
0,34
3,39
91,098
9,69
77,287
2,541
93,64
0,25
2,54
93,64
6,723
84,01
1,994
95,633
0,2
1,99
95,633
5,642
89,653
1,547
97,181
0,16
1,55
97,181
5,523
95,176
1,299
98,48
0,13
1,3
98,48
2,736
97,912
0,905
99,385
0,09
0,91
99,385
0,118
1,179
99,092
0,615
100
0,06
0,62
100
0,09
1
0,908
100
2,45
4
1,69
5
0,96
9
0,67
2
0,56
4
0,55
2
0,27
4
Component Matrixa
Component
Zscore: Type
Zscore: Price in thousands
0,471
0,533
-0,651
4
-0
-0,1
0,217
-0,003
8
0,054
10
0,1
-0,02
0,58
-0,729
-0,092
0,27
0,13
0,115
-0,062
0,053
0,014
-0,12
0,871
-0,29
0,018
-0,2
-0,23
0,044
0,161
-0,041
-0,112
-0,09
Zscore: Horsepower
0,74
-0,618
0,058
-0
-0,14
0,08
-0,038
-0,06
0,101
0,16
Zscore: Wheelbase
0,732
0,48
0,34
0,21
-0,07
0,154
-0,133
-0,081
-0,14
0,028
Zscore: Width
0,821
0,114
0,298
-0,3
0,29
0,101
-0,08
0,007
0,036
-0,01
Zscore: Length
0,719
0,304
0,556
0,11
-0,14
-0,103
0,05
0,091
0,159
-0,06
0,934
0,063
-0,121
0,08
0,11
-0,064
0,13
0,227
-0,095
0,096
0,885
0,184
-0,21
0,14
0,17
-0,112
0,153
-0,23
0,04
0,002
-0,863
0,004
0,339
0,08
0,08
0,264
0,238
-0,005
0,024
0,024
a. 10 components extracted.
Rotated Component Matrixa
Component
1
-0,061
0,112
0,976
0,06
Zscore: Price in
thousands
0,973
0,011
0,011
0,07
0,594
0,306
0,188
0,28
Zscore: Horsepower
0,873
0,184
0,001
0,19
Zscore: Wheelbase
0,066
0,894
0,268
0,19
Zscore: Width
0,252
0,501
0,135
0,78
Zscore: Length
0,117
0,919
0,012
0,2
0,434
0,439
0,416
0,27
0,324
0,408
0,476
0,23
-0,415
-0,247
0,465
-0,2
Zscore: Type
5
0,1
2
0,0
8
0,2
0,1
7
0,0
8
0,1
4
0,11
0,2
4
0,2
3
0,6
6
10
0,051
0,094
0,043
0,013
-0,012
0,112
0,086
0,011
-0,15
0,614
0,115
0,083
0,005
0,016
0,267
0,057
0,008
-0,02
0,258
0,042
0,12
0,026
0,258
-0,01
0,153
0,129
0,075
0,003
0,013
0,146
0,092
0,085
0,155
0,259
0,471
0,113
0,61
0,115
0,006
0,004
-0,173
-0,19
-0,097
0,001
-0,01
0,225
0,006
0,029
-0
0,515
0,529
0,358
0,34
0,28
0,235
0,243
0,153
0,004
10
0,027
-0,768
0,433
0,444
0,05
-0,01
-0,118
0,077
0,017
0,042
-0,03
-0,078
0,609
-0,713
0,2
-0,21
0,03
-0,142
-0,062
-0,042
0,037
0,263
0,326
0,014
-0,7
-0,15
-0,502
0,238
0,107
0,102
-0,16
-0,006
-0,215
-0,116
0,58
-0,14
-0,544
0,412
0,232
0,07
-0,23
0,221
0,04
0,346
0,18
-0,72
-0,016
-0,353
-0,211
0,325
-0,01
-0,086
-0,069
-0,009
-0,1
-0,55
0,488
0,449
0,377
-0,3
0,002
0,036
0,032
0,089
0,02
0,02
-0,14
-0,601
0,691
-0,319
-0,17
0,104
0,035
0,156
0,08
-0,13
-0,311
0,015
-0,362
-0,786
0,31
10
-0,015
-0,031
-0,028
-0
-0,03
-0,165
0,024
0,335
0,258
0,889
******************************************************
***** Regression Analysis
******************************************************
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA COLLIN TOL ZPP
10
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT lnsales
/METHOD=ENTER FAC1_1 FAC2_1 FAC3_1 FAC4_1 FAC5_1 FAC6_1 FAC7_1 FAC8_1 FAC9_1
FAC10_1.
Variables Entered/Removeda
Model
1
Variables Entered
Variables Removed
Method
. Enter
Model Summary
Model
R Square
,697
Adjusted R Square
,486
,449
,98960
a. Predictors: (Constant), REGR factor score 10 for analysis 1, REGR factor score 9 for analysis 1, REGR factor
score 8 for analysis 1, REGR factor score 7 for analysis 1, REGR factor score 6 for analysis 1, REGR factor score
5 for analysis 1, REGR factor score 4 for analysis 1, REGR factor score 3 for analysis 1, REGR factor score 2 for
analysis 1, REGR factor score 1 for analysis 1
ANOVAa
Model
1
Sum of Squares
df
Mean Square
Regression
130,300
10
13,030
Residual
138,082
141
,979
Total
268,383
151
F
13,305
Sig.
,000b
11
b. Predictors: (Constant), REGR factor score 10 for analysis 1, REGR factor score 9 for analysis 1, REGR factor score 8
for analysis 1, REGR factor score 7 for analysis 1, REGR factor score 6 for analysis 1, REGR factor score 5 for analysis
1, REGR factor score 4 for analysis 1, REGR factor score 3 for analysis 1, REGR factor score 2 for analysis 1, REGR
factor score 1 for analysis 1
Coefficients
Standardiz
Unstandardized
ed
Coefficients
Coefficien
ts
Model
Std.
Error
B
(Constant)
3,289
0,08
-0,714
0,081
0,414
0,307
Collinearity
Statistics
Correlations
t
Sig.
Zeroorder
Beta
Partial
Tole
rance
Part
VIF
40,976
-0,535
-8,863
-0,54
-0,598
-0,535
0,081
0,31
5,138
0,31
0,397
0,31
0,081
0,23
3,809
0,23
0,305
0,23
-0,008
0,081
-0,006
-0,1
0,921
-0,01
-0,008
-0,006
-0,174
0,081
-0,131
-2,161
0,032
-0,13
-0,179
-0,131
0,182
0,081
0,136
2,258
0,025
0,136
0,187
0,136
-0,135
0,081
-0,101
-1,677
0,096
-0,1
-0,14
-0,101
-0,005
0,081
-0,004
-0,065
0,948
-0
-0,005
-0,004
0,034
0,081
0,026
0,428
0,669
0,026
0,036
0,026
0,072
0,081
0,054
0,898
0,371
0,054
0,075
0,054
Collinearity Diagnosticsa
Variance Proportions
(Consta
nt)
REG
R
factor
score
1 for
analys
is 1
REG
R
factor
score
2 for
analys
is 1
REG
R
factor
score
3 for
analys
is 1
REG
R
factor
score
4 for
analys
is 1
REG
R
factor
score
5 for
analys
is 1
REG
R
factor
score
6 for
analys
is 1
REG
R
factor
score
7 for
analys
is 1
REG
R
factor
score
8 for
analys
is 1
REG
R
factor
score
9 for
analys
is 1
REG
R
factor
score
10 for
analys
is 1
0,49
0,51
0,28
0,32
0,06
0,02
0,01
0,01
0,29
0,5
0,02
0,01
0,46
0,27
0,7
0,01
0,01
0,03
0,02
0,54
0,25
0,06
0,07
0,02
0,19
0,14
0,67
0,08
0,01
0,91
Mod
el
Dimensi
on
Eigenval
ue
Conditi
on
Index
12
0,01
0,01
0,97
0,01
10
0,01
0,98
11
0,5
0,02
0,01
0,46
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT lnsales
/METHOD=STEPWISE FAC1_1 FAC2_1 FAC3_1 FAC4_1 FAC5_1 FAC6_1 FAC7_1 FAC8_1 FAC9_1
FAC10_1
/SCATTERPLOT=(*SDRESID ,*ZPRED )
/RESIDUALS HIST(ZRESID) ID( model )
/CASEWISE PLOT(ZRESID) OUTLIERS(2)
/SAVE ZPRED ZRESID COOK LEVER .
Variables Entered/Removeda
Model
1
Variables Entered
Variables Removed
Method
. Stepwise (Criteria: Probability-of-F-to-enter
<= ,050, Probability-of-F-to-remove >= ,100).
Model Summaryf
Model
R Square
Adjusted R Square
,535
,287
,282
1,12975
,619b
,383
,375
1,05423
,660c
,436
,424
1,01138
,455
,440
,99793
,472
,453
,98558
,674
,687
13
e. Predictors: (Constant), REGR factor score 1 for analysis 1, REGR factor score 2 for analysis 1, REGR factor score
3 for analysis 1, REGR factor score 6 for analysis 1, REGR factor score 5 for analysis 1
f. Dependent Variable: Log-transformed sales
ANOVAa
Model
1
Sum of Squares
Regression
df
Mean Square
76,932
76,932
Residual
191,451
150
1,276
Total
268,383
151
Regression
102,783
51,392
Residual
165,599
149
1,111
Total
268,383
151
Regression
116,995
38,998
Residual
151,388
148
1,023
Total
268,383
151
Regression
121,990
30,497
Residual
146,393
147
,996
Total
268,383
151
Regression
126,564
25,313
Residual
141,818
146
,971
Total
268,383
151
Sig.
60,275
,000b
46,240
,000c
38,126
,000d
30,624
,000e
26,059
,000f
14
Coefficientsa
Unstandardized
Coefficients
Model
B
(Constant)
1
3,289
0,092
-0,714
0,092
3,289
0,086
-0,714
0,086
0,414
0,086
(Constant)
3,289
0,082
-0,714
Sig.
Beta
35,89
7,764
38,46
-0,535
-8,32
0,31
4,823
0
0
0,082
-0,535
0,414
0,082
0,31
40,09
8,672
5,027
0,307
0,082
0,23
3,727
(Constant)
3,289
0,081
-0,714
0,081
-0,535
0,414
0,081
0,31
40,63
8,789
5,095
0,307
0,081
0,23
3,778
0,182
0,081
0,136
2,24
0,027
(Constant)
3,289
0,08
-0,714
0,08
-0,535
0,414
0,08
0,31
41,14
8,899
5,159
0,307
0,08
0,23
3,825
0,182
0,08
0,136
2,268
0,025
-0,174
0,08
-0,131
-2,17
0,032
Std. Error
Standardized
Coefficients
-0,535
0
0
0
0
0
0
0
0
15
Excluded Variablesa
Model
Collinearity Statistics
Tolerance
4,823
0,367
,230
3,456
0,001
0,272
-,006
-0,087
0,931
-0,007
-,131b
-1,91
0,058
-0,155
,136
1,998
0,048
0,162
-,101
-1,474
0,143
-0,12
-,004
-0,057
0,955
-0,005
,026b
0,374
0,709
0,031
,054
0,786
0,433
0,064
,230c
3,727
0,293
-,006
-0,093
0,926
-0,008
-,131
-2,051
0,042
-0,166
,136
2,145
0,034
0,174
-,101c
-1,582
0,116
-0,129
-0,061
0,952
-0,005
,026
,054c
-,006d
0,401
0,842
-0,097
0,689
0,401
0,923
0,033
0,069
-0,008
1
1
1
-,131d
-2,14
0,034
-0,174
,136
2,24
0,027
0,182
-,101
-1,65
0,101
-0,135
-,004d
-0,063
0,95
-0,005
,026
0,418
0,677
0,034
,054
0,878
0,381
0,072
-,006e
-0,099
0,922
-0,008
-,131
-2,17
0,032
-0,177
-,101
-1,673
0,097
-0,137
-,004e
-0,064
0,949
-0,005
0,423
0,673
0,035
0,89
-0,1
0,375
0,921
0,073
-0,008
1
1
Partial
Correlation
Sig.
,310
t
b
Beta In
-,004
,026
,054
-,006f
16
-,101f
-1,694
0,092
-0,139
-,004
-0,065
0,948
-0,005
,026
0,428
0,669
0,036
,054
0,901
0,369
0,075
d. Predictors in the Model: (Constant), REGR factor score 1 for analysis 1, REGR factor score 2 for analysis 1, REGR
factor score 3 for analysis 1
e. Predictors in the Model: (Constant), REGR factor score 1 for analysis 1, REGR factor score 2 for analysis 1, REGR
factor score 3 for analysis 1, REGR factor score 6 for analysis 1
f. Predictors in the Model: (Constant), REGR factor score 1 for analysis 1, REGR factor score 2 for analysis 1, REGR
factor score 3 for analysis 1, REGR factor score 6 for analysis 1, REGR factor score 5 for analysis 1
Casewise Diagnosticsa
Case
Number
Model
Std. Residual
Log-transformed sales
Predicted Value
Residual
84
3000GT
-4,896
-2,21
2,6185
-4,82576
109
Cutlass
-3,828
,11
3,8792
-3,77301
116
Breeze
-2,025
1,66
3,6520
-1,99570
132
SW
-2,191
1,65
3,8121
-2,15907
Residuals Statisticsa
Minimum
Maximum
Mean
Std. Deviation
Predicted Value
-,0305
5,6405
3,2890
,91552
152
-3,626
2,569
,000
1,000
152
,098
,571
,183
,070
152
-,0926
5,6665
3,2948
,92272
152
-4,82576
1,88817
,00000
,96912
152
Std. Residual
-4,896
1,916
,000
,983
152
Stud. Residual
-5,020
1,949
-,003
1,006
152
-5,07281
1,95479
-,00576
1,01595
152
-5,500
1,968
-,007
1,030
152
Mahal. Distance
,487
49,708
4,967
6,137
152
Cook's Distance
,000
,291
,008
,030
152
,003
,329
,033
,041
152
Deleted Residual
Stud. Deleted Residual
17
18
******************************************************
***** Chart Builder
******************************************************
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=FAC1_1 ZRE_1 model MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: FAC1_1=col(source(s), name("FAC1_1"))
DATA: ZRE_1=col(source(s), name("ZRE_1"))
DATA: model=col(source(s), name("model"), unit.category())
GUIDE: axis(dim(1), label("REGR factor score 1 for analysis 1"))
GUIDE: axis(dim(2), label("Standardized Residual"))
ELEMENT: point(position(FAC1_1*ZRE_1), label(model))
END GPL.
19
******************************************************
***** Chart Builder
******************************************************
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=LEV_1 COO_1 model MISSING=
LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: LEV_1=col(source(s), name("LEV_1"))
DATA: COO_1=col(source(s), name("COO_1"))
DATA: model=col(source(s), name("model"), unit.category())
GUIDE: axis(dim(1), label("Centered Leverage Value"))
GUIDE: axis(dim(2), label("Cook's Distance"))
ELEMENT: point(position(LEV_1*COO_1), label(model))
END GPL.
20
******************************************************
***** Chart Builder
******************************************************
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=LEV_1 COO_1 model MISSING=
LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: LEV_1=col(source(s), name("LEV_1"))
DATA: COO_1=col(source(s), name("COO_1"))
DATA: model=col(source(s), name("model"), unit.category())
GUIDE: axis(dim(1), label("Centered Leverage Value"))
GUIDE: axis(dim(2), label("Cook's Distance"))
ELEMENT: point(position(LEV_1*COO_1), label(model))
END GPL.
21
******************************************************
***** Abdullah M. Jaubah
******************************************************
GET
FILE='D:\SPSS22\german_credit.sav'.
******************************************************
***** Chart Builder
******************************************************
.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=chist COUNT()[rename=
"COUNT"] MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: chist=col(source(s), name("chist"), unit.category())
DATA: COUNT=col(source(s), name("COUNT"))
GUIDE: axis(dim(1), label("Account status"))
GUIDE: axis(dim(2), label("Count"))
SCALE: cat(dim(1), include("1.00", "2.00", "3.00", "4.00", "5.00"))
SCALE: linear(dim(2), include(0))
ELEMENT: interval(position(chist*COUNT), shape.interior(shape.square))
END GPL.
22
******************************************************
***** Ordinal Regression
******************************************************
PLUM
chist BY numcred othnstal housng WITH age duration
/CRITERIA = CIN(95) DELTA(0) LCONVERGE(0) MXITER(100) MXSTEP(5)
PCONVERGE(1.0E-6) SINGULAR(1.0E-8)
/LINK = CLOGLOG
/PRINT = FIT PARAMETER SUMMARY TPARALLEL
/SAVE = PREDCAT .
No debt history
Marginal Percentage
40
4,0%
23
No current debt
# of existing credits
49
4,9%
Payments current
530
53,0%
Payments delayed
88
8,8%
Critical account
293
29,3%
1,00
633
63,3%
2,00
333
33,3%
3,00
28
2,8%
4,00
0,6%
139
13,9%
47
4,7%
NONE
814
81,4%
RENT
179
17,9%
OWN
713
71,3%
FREE
108
10,8%
1000
100,0%
BANK
STORES
Housing
Valid
Missing
Total
1000
-2 Log Likelihood
Intercept Only
2249,888
Final
1896,552
Chi-Square
df
Sig.
353,336
,000
Goodness-of-Fit
Chi-Square
df
Sig.
Pearson
4688,724
3131
,000
Deviance
1796,915
3131
1,000
Pseudo R-Square
Cox and Snell
,298
Nagelkerke
,328
McFadden
,149
Parameter Estimates
Estimat
e
Threshol
d
[chist = 1,00]
-3,549
Std.
Error
0,667
df
Sig.
1
Lower
Bound
-4,856
Upper Bound
-2,242
24
Location
[chist = 2,00]
-2,72
0,656
[chist = 3,00]
-0,137
0,649
[chist = 4,00]
0,199
0,649
age
0,015
0,004
duration
[numcred=1,00
]
[numcred=2,00
]
[numcred=3,00
]
[numcred=4,00
]
[othnstal=1,00]
-0,002
17,16
7
0,044
-4,006
-1,433
0,833
-1,408
1,135
0,759
-1,072
1,471
0,007
0,023
0,003
0,094
15,12
8
0,379
0,538
-0,009
0,005
-1,134
0,594
3,645
0,056
-2,298
0,03
0,367
0,598
0,376
0,54
-0,805
1,538
0,981
0,711
1,902
0,168
-0,413
2,374
0a
-0,397
0,118
11,389
0,001
-0,627
-0,166
[othnstal=2,00]
-0,469
0,193
5,913
0,015
-0,848
-0,091
[othnstal=3,00]
[housng=1,00]
-0,082
0,165
0,249
0,617
-0,406
0,241
[housng=2,00]
0,132
0,139
0,897
0,344
-0,141
0,404
[housng=3,00]
-2 Log Likelihood
Null Hypothesis
1896,552
General
1588,614b
Chi-Square
307,938c
df
Sig.
27
,000
The null hypothesis states that the location parameters (slope coefficients) are the same across response categories.
a. Link function: Complementary Log-log.
b. The log-likelihood value cannot be further increased after maximum number of step-halving.
c. The Chi-Square statistic is computed based on the log-likelihood value of the last iteration of the general model.
Validity of the test is uncertain.
******************************************************
***** Abdullah M. Jaubah
******************************************************
GET
FILE='D:\SPSS22\advert.sav'.
******************************************************
***** Curve Estimation
******************************************************
.
CURVEFIT /VARIABLES=sales WITH advert
/CONSTANT
/MODEL=LINEAR QUADRATIC
/PLOT FIT
/SAVE=PRED RESID .
25
Model Description
Model Name
MOD_1
Dependent Variable
Detrended sales
Equation
Linear
Quadratic
Independent Variable
Advertising spending
Constant
Included
Unspecified
,0001
24
Excluded Casesa
Forecasted Cases
a. Cases with a missing value in any variable are excluded from the analysis.
Independent
Detrended sales
Advertising spending
24
24
Number of Zeros
User-Missing
System-Missing
Model Summary
R Square
df1
Linear
0,839 114,548
1
Quadrati
0,908 104,213
2
c
The independent variable is Advertising spending.
Parameter Estimates
df2
Sig.
Constant
b1
22
6,584
1,071
21
3,903
2,854
b2
-0,245
26
******************************************************
***** Chart Builder
******************************************************
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=FIT_1 ERR_1 MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: FIT_1=col(source(s), name("FIT_1"))
DATA: ERR_1=col(source(s), name("ERR_1"))
GUIDE: axis(dim(1), label("Fit for sales with advert from CURVEFIT,",
" MOD_1 LINEAR"))
GUIDE: axis(dim(2), label("Error for sales with advert from CURVEFIT, ",
"MOD_1 LINEAR"))
ELEMENT: point(position(FIT_1*ERR_1))
END GPL.
27
******************************************************
***** Chart Builder
******************************************************
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=FIT_2 ERR_2 MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: FIT_2=col(source(s), name("FIT_2"))
DATA: ERR_2=col(source(s), name("ERR_2"))
GUIDE: axis(dim(1), label("Fit for sales with advert from CURVEFIT,",
" MOD_1 QUADRATIC"))
GUIDE: axis(dim(2), label("Error for sales with advert from CURVEFIT, ",
"MOD_1 QUADRATIC"))
ELEMENT: point(position(FIT_2*ERR_2))
END GPL.
28
******************************************************
***** Abdullah M. Jaubah
******************************************************
GET
FILE='D:\SPSS\virus.sav'.
******************************************************
***** Curve Estimation
******************************************************
CURVEFIT /VARIABLES=infected WITH time
/CONSTANT
/MODEL= CUBIC
/PRINT ANOVA
/PLOT FIT
/SAVE=PRED RESID .
29
Model Description
Model Name
MOD_3
Dependent Variable
Equation
Cubic
Independent Variable
Constant
Included
Unspecified
,0001
42
Excluded Casesa
Forecasted Cases
Independent
Proportion of
Hours since
infected messages
detection
42
42
Number of Zeros
User-Missing
System-Missing
R Square
,885
Adjusted R Square
,783
,083
30
ANOVA
Sum of Squares
df
Mean Square
Regression
,949
,316
Residual
,263
38
,007
1,212
41
Total
Sig.
45,736
,000
Coefficients
Standardized
Unstandardized Coefficients
B
Hours since detection
Coefficients
Std. Error
Beta
Sig.
,088
,011
6,305
7,888
,000
-,004
,001
-12,111
-6,363
,000
4,399E-5
,000
5,638
4,780
,000
-,123
,056
-2,187
,035
(Constant)
* Chart Builder.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=FIT_1 ERR_1 MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: FIT_1=col(source(s), name("FIT_1"))
DATA: ERR_1=col(source(s), name("ERR_1"))
GUIDE: axis(dim(1), label("Fit for sales with advert from CURVEFIT,",
31
Rangkuman
Hubungan adalah sangat akrab antara cara point and click dan cara perintah sintaksis.
Hubungan ini tercermin dalam kemampuan cara point and click berdasar atas menu untuk
mencipta sintaksis secara otomatis. Sintaksis yang telah dicipta itu kemudian dikumpulkan
melalui Syntax Editor untuk menyimpan arsip sintaksis. Arsip sintaksis ini dapat dipakai
setiap saat diperlukan dengan cara membuka arsip sintaksis dan menyajikan isi sintaksis ini
dalam Syntax Editor. Perintah Run>All dalam Syntax Editor dipakai dan langkah ini akan
menghasilkan sintaksis dan hasil-hasil lain sesuai dengan sintaksis bersangkutan.
Cara point and click dan interpretasi atas hasil-hasil belum dilakukan di sini karena tujuan
dari penyusunan tulisan ini adalah untuk memperkenalkan perintah-perintah sintaksis dalam
32
SPSS. Langkah memperkenalkan perintah sintaksis ini dilakukan karena banyak buku SPSS
yang telah diterbitkan di Indonesia berlum menjamah pemakaian perintah sintaksis.
Perintah sintaksis dapat dipakai secara mandiri atau secara gabungan. Contoh di atas
merupakan contoh dari pemakaian arsip gabungan yang mencakup empat arsip data. Contoh
arsip mandiri adalah sebagai berikut :
******************************************************
***** Abdullah M. Jaubah
******************************************************
GET
FILE='D:\SPSS\virus.sav'.
******************************************************
***** Curve Estimation
******************************************************
CURVEFIT /VARIABLES=infected WITH time
/CONSTANT
/MODEL= CUBIC
/PRINT ANOVA
/PLOT FIT
/SAVE=PRED RESID .
* Chart Builder.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=FIT_1 ERR_1 MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: FIT_1=col(source(s), name("FIT_1"))
DATA: ERR_1=col(source(s), name("ERR_1"))
GUIDE: axis(dim(1), label("Fit for sales with advert from CURVEFIT,",
Penulis mengharap kritik dari para pembaca atas isi tulisan ini.
Daftar Kepustakaan
IBM Corporation 1989, 2013. IBM SPSS Regression 22.
_______________________. IBM SPSS Statistics 22 Command Syntax Reference
_______________________. IBM SPSS Statistics Base 22
________________________. IBM SPSS Advanced Statistics 22
_______________________. IBM SPSS Statistics Case Studies
Permata Depok Regency, 16 Juli 2016
33