Docsity

ppt tema 13 y 14, Apuntes de Estadística

Vista previa parcial del texto

¡Descarga ppt tema 13 y 14 y más Apuntes en PDF de Estadística solo en Docsity!

STATISTICS

Degree in Psychology

Academic year 2014 – 2015

UNITS 13 & 14

INTRODUCTION TO STATISTICAL

MODELS

Chapters 6, 9 and 10 of the book: Peró, M., Leiva, D., Guàrdia, J., & Solanas, A. (coord.) ( 2012 ). Estadística aplicada a las ciencias sociales mediante R y R-Commander. Madrid: Garceta Grupo Editorial.

Chapter 11 of the book: Guàrdia, J., Freixa, M., Peró, M., & Turbany, J. (2008). Análisis de datos en psicología. 2ª edición. Madrid: DELTA Publicaciones.

Utility:

  • Description of dispersion plot or scatter

plot.

  • Prediction of a variable values from values

of one or more other variables (inferential).

The variables must be measured in interval or ratio

scale.

Linear regression model

Population:

IV: X 1 , X 2 , ..., Xk  Exogenous variables

DV: Y  Endogenous variables

Y = f (X 1 , X 2 , ..., Xk)

Yi = B 0 + B 1 X 1 + B 2 X 2 + ... + BkXk + i  General model

Sample:

yi = b 0 + b 1 x 1 + b 2 x 2 + ... + bkxk + ei

Linear Regression Model

Linear Regression Model

Centroids – residual 0

Linear Regression Model

1st. Specification
y = f(x)  y = b 0 + b 1 x 1 + e
2nd. Coefficient estimation

y ˆ^  b 0  b 1 x 1

3rd. Model validation  Coefficient
of determination (r^2 )
b 0  y  b 1 x

(^12) x

xy

x

xy s

Cov

SQ

SP b  

 r   n k 

r k F   

 1 1

2

2

4th. Prediction
  • Point:
  • Interval:
Mean values:
Least squares:
y^ ˆ^ i  b 0  b 1 xi 1
y^ ˆ^ i  t  ,  n  2  ES

 

x

i i yx

SQ
x x
n
ES SEM y s

2

(ˆ )^2

  

 

 

 

 (^)      x

i i yx SQ

x x n

ES SD y s

2 (ˆ )^2

Individual values:
Validation model depending on the p-
value
5th. Residual analysis
  • i  VI, random variable
  • i  N (o, ^2 e)
  • Cov(i, j) = 0

 ^   

  

n

i

n

i

ei yi yi 1 1

(^2) ˆ^20

 

2 2 2 s (^) yxsy 1  rxy

Simple Linear Regression Model

Predict the AVD values from the AVDI values:

ID AVD AVDI ID AVD AVDI

Simple Linear Regression Model: Example

2 , 4257

4 , 9

s x

x

28 , 4651

40 , 5

s y

y

sxy  37 , 8421

Simple Linear Regression Model: R outputs

Simple Linear Regression Model: R outputs

20 30 40 50 60 70

0

40

Fitted values

Residuals

Residuals vs Fitted

17

(^13 )

-2 -1 0 1 2

-^ -^

0

1

Theoretical Quantiles

Standardized residuals

Normal Q-Q

17

8 13

20 30 40 50 60 70

Fitted values

St

an

da

rdi

ze

d^ r

es

idu

als^ Scale-Location 17 (^13 )

0.00 0.10 0.

-^ -^

0

1

Leverage

Standardized residuals

Cook's distance 1 0.

Residuals vs Leverage

17

8

5

lm(AVD ~ AVDI)

0.05 0.10 0.15 0.20 0.

-^ -^

0

1

Hat-Values

Studentized Residuals

  • ANOVA of independent groups: determine if

there is relationship between a qualitative variable

with more than two categories and a quantitative

variable measured in interval or ratio scale.

  • ANOVA of repeated measures: determine if there

is relationship between more than two measures of

the same variable (more than two temporal

moments). The quantitative variable is measured in

interval or ratio scale.

ANOVA of Independent groups and repeated

measures : Goal

ANOVA: independent groups

1st. Null hypothesis formulation:
H 0 :  1 =  2 =  3 = ... = k
2nd. Assumptions:
homoscedasticity
Hartley
Cochran
Snedecor
Bartlett-Box
Levene
3rd. Statistical test
Balances models
4th. Decision:

Depending on the p-value

5th. Effect size:
6th. “A posteriori” contrast
7th. Conclusions

2 2 R SQ

SQ

Total

between   

xijxT   x (^) jxT   xijxj

     

Total Between Within

i n

i

ij j

j k

j

i n

i

j T

i n

i i

ij T

SQ SQ SQ

x x x x x x

j

  

 ^     

 1

2 1 1

2 2

Within

Between

QM

QM

F 

xik =  + j + ij

ANOVA: summary

Source of variation Sum of squares^

Degree of freedom Mean squares^ F

Between groupss 

  

 

 

  

 

 

 

j k

j

i n

i

ij

j

i n

i

ij

n

x

n

x

j

1

2

1

2

1 k^ -^1 k  1

SQBetween residual

between QM

QM

Within groups or residual  

 

 

 

 

 

i n

i

j k

j j

i n

i

ij ij (^) n

x x

j

1 1

2

2 1 n^ -^ k n k

SQresidual

Total n

x x

i n

i i n ij

i

ij

2

1 1

2

 

  

 

  

n - 1

ANOVA: “a posteriori” contrast

LSD: Least significant difference

i j

n k within

n n

x t QM

Scheffé:

H 0 : L = cjj = 0

    (^)     

j

j Scheffé k n k within n

c LSD k F QM

2

(^1) , 1 ,

CI (^) Scheffé LLSDScheffé : ˆ