Anda di halaman 1dari 20

Diseño con covariables

Marcelo Rodríguez G.
Ingeniero Estadístico - Magister en Estadística

Universidad Católica del Maule


Facultad de Ciencias Básicas
Ingeniería en Agronomía
Diseño Experimental
22 de mayo de 2011

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 1 / 20


Análisis de Covarianza
Denición (Análisis de Covarianza)
Este procedimiento es la combinación de las técnicas de análisis de
regresión y el análisis de varianza. Consiste en estudiar los efectos de un
factor (variable cualitativa) y una covariable (variable cuantitativa), sobre
la variable dependiente.

(El modelo matemático unifactorial con una covariable)


yij = µ + τ + β(x − x ) + e .
i ij ij

i = 1, . . . , t y j = 1, . . . , r
τ : Efecto producido por el tratamiento i -ésimo.
i

β : Pendiente de la recta de regresión.


x : Valor de la covariable, correspondiente a y
ij ij .
x : Media de la covariable.
mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 2 / 20
Arreglo de los datos y sumatorias

Tratamiento
1 2 ... t
x y x y ... x y
x11 y11 x21 y21 . . . x1 y1
t t

x12 y12 x22 y22 . . . x2 y2


t t

.. .. .. .. .. .. ..
. . . . . . .
x1 y1 x2 y2 . . .
r r r r x
tr y
tr

x 1 y 1 x 2 y 2 . . . x t  y t 

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 3 / 20


Arreglo de los datos y sumatorias

t r t r t r

T x 2 − nx 2 T y 2 − ny 2 T xy − nxy
XX XX XX
xx = ij yy = ij xy = ij ij

i =1 j =1 i =1 j =1 i =1 j =1
t r t r t r

A x 2 − nx 2 A y 2 − ny 2 A x  y  − nxy
XX XX XX
xx = i yy = i xy = i i

i =1 j =1 i =1 j =1 i =1 j =1
r r r

S x 2 − rx 2 S y 2 − ry 2 S xy − rx y
X X X
ixx = ij i iyy = ij i ixy = ij ij i  i

j =1 j =1 j =1
t t t

E S E S E S
X X X
xx = ixx yy = iyy xy = ixy

i =1 i =1 i =1
T xx =A xx +E xx T yy =A yy +E yy T xy =A xy +E xy

T2 E2
T (aj ) = T − xy
E (aj ) = E − xy
A (aj ) = T (aj ) − E (aj )
yy
T yy
xx
yy
E yy
xx
yy yy yy

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 4 / 20


Ejemplo
Nutrientes
Para este estudio se uti- Sin fertilizante Con fertilizante Con nitrógeno
lizaron tres nutrientes; i) sin x
13
y
23
x
7
y
30
x
10
y
26
agregar fertilizante, ii) con 12 21 5 32 9 27
7 28 6 32 6 28
fertilizante completo y iii) 9 25 7 31 6 28
8 25 9 28 5 31
con nitrógeno. x 1  = 9, 8 y 1  = 24, 4 x 2  = 6, 8 y 2  = 30, 6 x 3  = 7, 2 y 3  = 28, 0

Los tratamientos de nutrientes se agregaron como soluciones al suelo,


mezclado y colocado en macetas de plástico en el invernadero. Se
cultivaron las plantas en las macetas durante siete semanas, momento en
que las plantas se cosecharon, secaron y pesaron. Una plaga de hoja afectó
el crecimiento de las plantas a medio experimento. Se supuso que la plaga
afectaría el crecimiento y al nal del experimento se midió el porcentaje del
área de la hoja afectada. El peso (en gramos) total en seco de las plantas
(x ) y el porcentaje del área de la hoja afectada con la plaga (y ) se
muestran en la tabla.
mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 5 / 20
Regresión lineal simple

(Ecuación de regresión lineal para cada tratamiento.)


yb i = βb0 + βb1
i i x, i

Intercepto (βb0 ): punto en el que la recta corta al eje y , cuando


i i

x = 0.
i

Pendiente (βb1 ): magnitud de incremento (o decremento) de y por


i i

cada unidad de incremento en x . i

(Estimaciones de la pendiente e intercepto)


S
βb0 = y  − βb1 · x
ixy
βb1 = ;
i
S ixx
i i i i 

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 6 / 20


Prueba de hipótesis
(Tabla de ANOVA)
Modelo Suma de Grados de Media F
cuadrados libertad cuadrática
E2 MCR
Regresión SCR =
xy
1 MCR=SCR F =
E xx
r
MCE
MCTR
Tratamiento (aj) SCTR= A (aj ) t −1 MCTR=SCTR/(t-1) F =
MCE
yy t

Error (aj) SCE = E (aj )


yy n − t − 1 MCE=SCE/(n-t-1)
Total SCT = T yy n−1

(Hipótesis)
H0 : β11 = β12 = · · · = β1 = 0 t v/s H1 : β1 6= 0,
i para algún i

(Reglas para el rechazo de H0 )


Fijar α y Rechace H0 si F > F1−α (1, n − t − 1)
r

Rechace H0 si valor-p < 0, 05, donde valor-p= P (F > F ). r

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 7 / 20


Prueba de hipótesis

(Hipótesis)
H0 : µ1 = µ2 = · · · = µ t v/s H1 : µ 6= µ ,
i j para algún i , j

(Reglas para el rechazo de H0 )


Fijar α y Rechace H0 si F > F1−α (t − 1, n − t − 1)
t

Rechace H0 si valor-p < 0, 05, donde valor-p= P (F > F ). t

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 8 / 20


Ejemplo
Encuentre las sumatorias planteadas anteriormente.
Encuentre las ecuaciones de regresión, para cada tratamiento.
Pruebe la hipótesis de que el peso está relacionado con el porcentaje
de daño.
pruebe la hipótesis de que existe un efecto atribuible a los nutrientes.
Solución:
x = 7,93
y = 27,67
3 X
5
T x 2 − n · x 2 = 132 + 122 + ... + 52 − 15 · 7, 932 = 80, 93
X
xx = ij

i =1 j =1
3 X
5
T y 2 − n · y 2 = 232 + 212 + ... + 312 − 15 · 27, 672 = 149, 3
X
yy = ij

i =1 j =1
3 X
5
T xy − nxy = 13 · 23 + 12 · 21 + ... + 5 · 31 − 15 · 7, 93 · 27, 67 = −95, 3
X
xy = ij ij

i =1 j =1
5
S1 x12 − 5x 21 = 132 + 122 + ... + 82 − 5 · 9, 802 = 26, 8
X
xx = j

j =1
5
S1 y12 − 5y 21 = 232 + 212 + ... + 252 − 5 · 24, 42 = 27, 2
X
yy = j

j =1
mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 9 / 20
Ejemplo
5
S1 x1 y1 − 5x 1 y 1 = 13 · 23 + ... + 8 · 25 − 5 · 9, 8 · 24, 4 = −23, 6
X
xy = j j

j =1
S2 xx = 8,8
S2
yy = 11,2
S2
xy = -9,4
S3 xx = 18,8
S3
yy = 14,0
S3
xy = -14,0
3
E S = 26, 8 + 8, 8 + 18, 8 = 54, 4
X
xx = ixx

i =1
3
E S = 27, 2 + 11, 2 + 14, 0 = 52, 4
X
yy = iyy

i =1
3
E S = −23, 6 − 9, 4 − 14, 0 = −47, 0
X
xy = ixy

i =1
A xx = 80, 93 − 54, 4 = 26, 53
Ayy = 149, 3 − 52, 4 = 96, 93
Axy = −95, 3 − (−47, 0) = −48, 3

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 10 / 20


Ejemplo

T2
T (aj ) = T − = 37, 038
xy
yy yy
T2
E
xx

E (aj ) = E − = 11, 793


xy
yy yy
E
A (aj ) = T (aj ) − E (aj ) = 25, 245
xx

yy yy yy

Las ecuaciones de regresión para cada tratamiento serían:

yb1 = 33, 030 − 0, 881 · x1

yb2 = 37, 864 − 1, 068 · x2

yb3 = 33, 362 − 0, 745 · x3

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 11 / 20


Ejemplo
Modelo Suma de Grados de Media F
cuadrados libertad cuadrática
Regresión 40,607 1 40,607 F = 37,875
r

Tratamiento (aj) 25,245 2 12,622 F = 11,773


t

Error (aj) 11,793 11 1,072


Total 149,333 14

(Hipótesis)
H0 : β11 = β12 = β13 = 0 v/s H1 : β1 6= 0,
i para algún i

Se rechaza H0 , pues F = 37, 875 > F0,95 (1; 11) = 4, 84. Es decir, existe
r

una relación entre el peso y el daño.


(Hipótesis)
H0 : µ1 = µ2 = µ3 v/s H1 : µ 6= µ ,
i j para algún i , j

Se rechaza H0 , pues F = 11, 773 > F0,95 (2; 11) = 3, 98. Es decir, el efecto
t

de los nutrientes no es el mismo.


mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 12 / 20
Ejemplo de un Diseño con Covarianza en SPSS

(Ejemplo de un Diseño con Covarianza en SPSS)


En SPSS, Analizar -> Modelo lineal general -> Univariante.
1 Seleccionar la variable dependiente y trasladarla al cuadro Variable
dependiente.
2 Seleccionar tanto las variables-factores y trasladarlas a la lista
Factores jos.
3 Seleccionar la covariable y trasladarla al cuadro Covariables
4 Luego, Aceptar.

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 13 / 20


Ejemplo de un Diseño con Covarianza en SPSS

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 14 / 20


Ejemplo de un Diseño con Covarianza en SPSS

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 15 / 20


Ejemplo de un Diseño con Covarianza en SPSS

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 16 / 20


Ejemplo de un Diseño con Covarianza en SPSS
Este parte no es necesaria, pero la utilizaremos para mostrar el daño
promedio por tratamiento y la vericación de la homogeneidad.

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 17 / 20


Ejemplo de un Diseño con Covarianza en SPSS

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 18 / 20


Ejemplo de un Diseño con Covarianza en SPSS

mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 19 / 20


Ejemplo de un Diseño con Covarianza en SPSS
Grácos -> Cuadros de diálogos antiguos-> Dispersión/Puntos.
1 Seleccionar Dispersión simple, luego Denir.
2 Seleccionar la variable dependiente (Eje Y), y la covariable (Eje X).
3 La variable Factor (tratamientos) trasládelo a Establecer marcas por.
4 Luego, Aceptar.
Nutrientes
32
Sin fertilizante
Con fertilizante
Con nitrógeno
30
Sin fertilizante
Con fertilizante
Con nitrógeno
28
Sin fertilizante: R2 Lineal
= 0,764
Daño

26 Con fertilizante: R2 Lineal


= 0,897
Con nitrógeno: R2 Lineal
24 = 0,745

22

20

4 6 8 10 12 14
Peso

Este gráco, permite visualizar la relación entre el daño y peso. Además se


detecta la diferencia entre los tres tratamientos.
mrodriguez@ucm.cl (UCM) Marcelo Rodríguez G. 22/05/2011 20 / 20

Anda mungkin juga menyukai