SPSS-ANOVA
SPSS-ANOVA
www.reeme.arizona.edu
Elección de tests estadísticos
Varbl. dependientes
1 >1
Varbl. CATEG CUANT CATEG CUANT
Indep.
CATEG X2 Oneway Manova
1 CUANT Student T Correlac
www.reeme.arizona.edu
ANOVA - conceptos básicos
Influencia de una o varias variables categóricas
(factores) sobre una variable dependiente cuantitativa
Valora efectos principales de factores e interacciones
de éstos entre sí
Admite una o más covariables de control, de tipo
cuantitativo
Estudia reducción de variabilidad (suma de cuadrados)
Test paramétrico: Compara las medias de los
subgrupos formados para cada factor
www.reeme.arizona.edu
Condiciones
• Igualdad de varianzas
• Distribución paramétrica
a
Levene's Test of Equality of Error Variances
www.reeme.arizona.edu
ANOVA - estadísticos
SS total = Σ SS efectos principales +
SS interacciones orden 2 y sucesivas +
SS residuos
SS (factor o interacción)
MS =
DF (grados de libertad)
MS (factor o interacción)
F=
MS de los residuos
www.reeme.arizona.edu
ANOVA - Output SPSS
Sum of Mean Sig
Source of Variation Squares DF Square F of F
www.reeme.arizona.edu
ANOVA
Modelo Lineal General Factorial
www.reeme.arizona.edu
Definición del modelo
www.reeme.arizona.edu
Opciones
www.reeme.arizona.edu
Contrastes
Permiten comparar
niveles o categorías
entre sí, dentro de cada
factor considerado.
Test Results
40000
Estimated Marginal Means of Current salary
24000
22000
30000
20000
18000
Estimated Marginal Means
20000
14000
10000
12000
10000
0
8000 Clerical Security officer Exempt employee Technical
White males Minority males White females Minority females Office trainee College trainee MBA trainee
10000
Spread (Standard Deviation)
8000
6000
4000
2000
0
0 10000 20000 30000 40000
Level (Mean)
Groups: Sex & race classification * Employment category
www.reeme.arizona.edu
ANOVA
Modelo Lineal General Factorial
SYNTAX
UNIANOVA
salnow BY sexrace jobcat WITH age
/METHOD = SSTYPE(3)
/INTERCEPT = INCLUDE
/PRINT = DESCRIPTIVE ETASQ HOMOGENEITY
/CRITERIA = ALPHA(.05)
/DESIGN = age sexrace jobcat sexrace*jobcat .
www.reeme.arizona.edu
Descriptive Statistics
www.reeme.arizona.edu
ANOVA factorial
Simple
– Diseños factoriales de modelos saturados
– Métodos:
General
– Diseños factoriales de modelos no saturados
– Permite especificar con más flexibilidad el modelo a utilizar y variedad de estadísticos
www.reeme.arizona.edu
ONEWAY
Caso particular de ANOVA de un factor
Una sola variable dependiente cuantitativa
Un factor con varias categorías
ONEWAY, pero no ANOVA, produce:
– Contrastes
– Comparaciones múltiples
– Pruebas de tendencia
– Test homogeneidad de varianza
www.reeme.arizona.edu
ONEWAY
www.reeme.arizona.edu
Resultados Oneway
Listado descriptivo
Descriptives
Current salary
95% Confidence Interval
for Mean
Std. Lower Upper
N Mean Deviation Std. Error Bound Bound Minimum Maximum
Clerical 227 11134,82 3196,57 212,16 10716,75 11552,89 6300 26750
Office trainee 136 11136,41 2732,60 234,32 10673,00 11599,82 7260 32000
Security officer 27 12375,56 845,85 162,78 12040,95 12710,16 9720 14100
College trainee 41 23901,07 5695,15 889,43 22103,46 25698,68 13764 36500
Exempt employee 32 25595,63 7364,40 1301,86 22940,47 28250,78 15480 41500
MBA trainee 5 26100,00 2661,06 1190,06 22795,86 29404,14 23250 30000
Technical 6 36691,67 10543,45 4304,35 25626,99 47756,34 26700 54000
Total 474 13767,83 6830,26 313,72 13151,36 14384,29 6300 54000
www.reeme.arizona.edu
ONEWAY - Output SPSS
Analysis of Variance
Sum of Mean F F
Source D.F. Squares Squares Ratio Prob.
ANOVA
Current salary
Sum of Mean
Squares df Square F Sig.
Between Groups 1,52E+10 6 2,53E+09 171,128 ,000
Within Groups 6,90E+09 467 14772477
Total 2,21E+10 473
www.reeme.arizona.edu
ONEWAY - Comparaciones Múltiples
Multiple Range Tests: Scheffe test with significance level ,05
(*) Indicates significant differences which are shown in the lower triangle
C O S E
l f e C x
e f c o e
r i u l m
Mean JOBCAT
11134,8194 Clerical
11136,4118 Office t
12375,5556 Security
23901,0732 College * * *
25595,6250 Exempt e * * *
www.reeme.arizona.edu
Oneway - Contrastes
Current salary
www.reeme.arizona.edu
Oneway - Means Plot
40000
30000
20000
Mean of Current salary
10000
0
Clerical Security officer Exempt employee Technical
Office trainee College trainee MBA trainee
Employment category
www.reeme.arizona.edu
Tipos de Análisis de Varianza
1 >1 >1
independ relacionada
Paramétrico Oneway ANOVA
Condiciones
previas
No Kruskal- Friedman
Paramétrico Wallis
www.reeme.arizona.edu
Kruskal-Wallis
Oneway no paramétrico
Tests no paramétricos - K muestras independientes
www.reeme.arizona.edu
Kruskal-Wallis
Estadísticos descriptivos
Ranks
www.reeme.arizona.edu
Test Statisticsb
Current
Kruskal-Wallis
salary
N 474 Prueba de la Mediana
Median 11550,00
Chi-Square 135,133a
df 6
Asymp. Sig. ,000
a. 4 cells (,0%) have expec
The minimum expected c
b. Grouping Variable: Empl
Frequencies
Employment category
Office Security College Exempt MBA
Clerical trainee officer trainee employee trainee Technical
Current sala > Median 80 48 25 41 32 5 6
<= Media 147 88 2 0 0 0 0
www.reeme.arizona.edu
Kruskal-Wallis
Contrastes
b,c
Estadísticos de contraste
Current
salary
Chi-cuadrado 208,357
gl 6
Sig. asintót. ,000
Sig. Monte Sig. ,000a
Carlo Intervalo de Límite inferior ,000
confianza al Límite superior ,000
99%
a. Basado en 10000 tablas muestrales con semilla de inicio
2000000.
b. Prueba de Kruskal-Wallis
c. Variable de agrupación: Employment category
www.reeme.arizona.edu
Friedman
Anova de dos vías para muestras apareadas
Friedman es el test
básico, que compara
los rangos entre K
variables relacionadas
entre sí. Se basa en X2
Std.
N Mean Deviation Minimum Maximum
HBA1_BASAL 30 7,657 1,748 4,8 11,8
HBA1_SIST1 30 7,660 1,123 6,2 10,3
HBA1_SIST2 30 7,250 1,279 5,8 11,6
HBA1_SIST3 30 7,117 1,372 5,2 10,5
www.reeme.arizona.edu
ANOVA - otros modelos
www.reeme.arizona.edu
MANOVA
www.reeme.arizona.edu
Multivariate Testsc
Hypothesis Eta
Effect Value F df Error df Sig. Squared
Intercept Pillai's Trace ,758 15,691a 2,000 10,000 ,001 ,758
Wilks' Lambda ,242 15,691a 2,000 10,000 ,001 ,758
Manova - EDAD
Hotelling's Trace
Roy's Largest Root
Pillai's Trace
Wilks' Lambda
Hotelling's Trace
3,138
3,138
,370
,630
,586
15,691a
15,691a
2,932a
2,932a
2,932a
2,000
2,000
2,000
2,000
2,000
10,000
10,000
10,000
10,000
10,000
,001
,001
,100
,100
,100
,758
,758
,370
,370
,370
Roy's Largest Root ,586 2,932a 2,000 10,000 ,100 ,370
Resultados T_EVOLUC
DIETA_KC
Pillai's Trace
Wilks' Lambda
Hotelling's Trace
Roy's Largest Root
Pillai's Trace
,118
,882
,134
,134
,240
,669a
,669a
,669a
,669a
1,578a
2,000
2,000
2,000
2,000
2,000
10,000
10,000
10,000
10,000
10,000
,534
,534
,534
,534
,254
,118
,118
,118
,118
,240
Wilks' Lambda ,760 1,578a 2,000 10,000 ,254 ,240
Hotelling's Trace ,316 1,578a 2,000 10,000 ,254 ,240
Roy's Largest Root ,316 1,578a 2,000 10,000 ,254 ,240
DOSIS_T1 Pillai's Trace ,127 ,728a 2,000 10,000 ,507 ,127
Wilks' Lambda ,873 ,728a 2,000 10,000 ,507 ,127
Hotelling's Trace ,146 ,728a 2,000 10,000 ,507 ,127
Roy's Largest Root ,146 ,728a 2,000 10,000 ,507 ,127
INYECC_D Pillai's Trace ,212 1,341a 2,000 10,000 ,305 ,212
Wilks' Lambda ,788 1,341a 2,000 10,000 ,305 ,212
Between-Subjects Factors Hotelling's Trace ,268 1,341a 2,000 10,000 ,305 ,212
Roy's Largest Root ,268 1,341a 2,000 10,000 ,305 ,212
Value CALIF_ED Pillai's Trace ,703 1,192 10,000 22,000 ,348 ,351
Label N Wilks' Lambda ,404 1,147a 10,000 20,000 ,379 ,364
Hotelling's Trace 1,211 1,090 10,000 18,000 ,419 ,377
Num.inyecc 3 9 Roy's Largest Root ,924 2,033b 5,000 11,000 ,152 ,480
diarias 4 21 SEXO Pillai's Trace ,210 1,332a 2,000 10,000 ,307 ,210
Wilks' Lambda ,790 1,332a 2,000 10,000 ,307 ,210
Nivel 3 2 Hotelling's Trace ,266 1,332a 2,000 10,000 ,307 ,210
educacion 5 3 Roy's Largest Root ,266 1,332a 2,000 10,000 ,307 ,210
diabetologica 6
INYECC_D * CALIF_ED Pillai's Trace ,313 2,279a 2,000 10,000 ,153 ,313
5 Wilks' Lambda ,687 2,279a 2,000 10,000 ,153 ,313
7 5 Hotelling's Trace ,456 2,279a 2,000 10,000 ,153 ,313
Roy's Largest Root ,456 2,279a 2,000 10,000 ,153 ,313
8 7 INYECC_D * SEXO Pillai's Trace ,155 ,918a 2,000 10,000 ,430 ,155
9 Wilks' Lambda ,845 ,918a 2,000 10,000 ,430 ,155
8
Hotelling's Trace ,184 ,918a 2,000 10,000 ,430 ,155
Sexo 1 Hombre 12 Roy's Largest Root ,184 ,918a 2,000 10,000 ,430 ,155
CALIF_ED * SEXO Pillai's Trace ,367 ,825 6,000 22,000 ,563 ,184
2 Mujer 18 Wilks' Lambda ,654 ,787a 6,000 20,000 ,590 ,191
Hotelling's Trace ,495 ,743 6,000 18,000 ,622 ,198
Roy's Largest Root ,416 1,525b 3,000 11,000 ,263 ,294
INYECC_D * CALIF_ED * Pillai's Trace ,000 ,a ,000 ,000 , ,
SEXO Wilks' Lambda 1,000 ,a ,000 10,500 , ,
Hotelling's Trace ,000 ,a ,000 2,000 , ,
Roy's Largest Root ,000 ,000a 2,000 9,000 1,000 ,000
a. Exact statistic
b. The statistic is an upper bound on F that yields a lower bound on the significance level.
c. Design: Intercept+EDAD+T_EVOLUC+DIETA_KC+DOSIS_T1+INYECC_D+CALIF_ED+SEXO+INYECC_D *
CALIF_ED+INYECC_D * SEXO+CALIF_ED * SEXO+INYECC_D * CALIF_ED * SEXO
www.reeme.arizona.edu
ANOVA medidas repetidas
Measure: MEASURE_1
Resultados - Efectos
FACTOR1
1
Dependent
Variable
HBA1_BAS
intrasujetos
2 HBA1_S1 Tests of Within-Subjects Effects
www.reeme.arizona.edu
ANOVA medidas repetidas
Pruebas multivariadas
Multivariate Testsb
Hypothesis
Effect Value F df Error df Sig.
FACTOR1 Pillai's Trace ,234 2,446a 3,000 24,000 ,088
Wilks' Lambda ,766 2,446a 3,000 24,000 ,088
Hotelling's Trace ,306 2,446a 3,000 24,000 ,088
Roy's Largest Root ,306 2,446a 3,000 24,000 ,088
FACTOR1 * EDAD Pillai's Trace ,119 1,086a 3,000 24,000 ,374
Wilks' Lambda ,881 1,086a 3,000 24,000 ,374
Hotelling's Trace ,136 1,086a 3,000 24,000 ,374
Roy's Largest Root ,136 1,086a 3,000 24,000 ,374
FACTOR1 * T_EVOLUC Pillai's Trace ,240 2,526a 3,000 24,000 ,081
Wilks' Lambda ,760 2,526a 3,000 24,000 ,081
Hotelling's Trace ,316 2,526a 3,000 24,000 ,081
Roy's Largest Root ,316 2,526a 3,000 24,000 ,081
FACTOR1 * SEXO Pillai's Trace ,107 ,960a 3,000 24,000 ,428
Wilks' Lambda ,893 ,960a 3,000 24,000 ,428
Hotelling's Trace ,120 ,960a 3,000 24,000 ,428
Roy's Largest Root ,120 ,960a 3,000 24,000 ,428
a. Exact statistic
b.
Design: Intercept+EDAD+T_EVOLUC+SEXO
Within Subjects Design: FACTOR1
www.reeme.arizona.edu
ANOVA medidas repetidas
Contrastes intra-sujetos
Tests of Within-Subjects Contrasts
Measure: MEASURE_1
Type III
Sum of Mean
Source FACTOR1 Squares df Square F Sig.
FACTOR1 Linear 2,609 1 2,609 5,764 ,024
Quadratic ,532 1 ,532 ,931 ,343
Cubic ,202 1 ,202 ,820 ,373
FACTOR1 * EDAD Linear ,504 1 ,504 1,114 ,301
Quadratic 1,437 1 1,437 2,513 ,125
Cubic 2,133E-02 1 2,133E-02 ,087 ,771
FACTOR1 * T_EVOLUC Linear 1,680E-02 1 1,680E-02 ,037 ,849
Quadratic 1,232 1 1,232 2,155 ,154
Cubic ,346 1 ,346 1,403 ,247
FACTOR1 * SEXO Linear ,683 1 ,683 1,508 ,230
Quadratic 1,782 1 1,782 3,118 ,089
Cubic ,118 1 ,118 ,478 ,496
Error(FACTOR1) Linear 11,769 26 ,453
Quadratic 14,863 26 ,572
Cubic 6,407 26 ,246
www.reeme.arizona.edu
ANOVA medidas repetidas
Between-Subjects Factors
Value
Label N
Sexo 1 Hombre 12
2 Mujer 18
Measure: MEASURE_1
Transformed Variable: Average
Type III
Sum of Mean
Source Squares df Square F Sig.
Intercept 1139,147 1 1139,147 224,589 ,000
EDAD 55,247 1 55,247 10,892 ,003
T_EVOLUC 11,519 1 11,519 2,271 ,144
SEXO ,346 1 ,346 ,068 ,796
Error 131,876 26 5,072
www.reeme.arizona.edu