You are on page 1of 9

Multiple linear regression

…and partial effects

Adolfo Amézquita

Departmento de Ciencias Biológicas

Universidad de Los Andes

Bogotá, Colombia

http://gecoh.uniandes.edu.co

aamezqui@uniandes.edu.co

Anova Regression Ancova

X1 (2) Y X2 Y X1 (2) Y
X2

Y Y

Male Female
X2
X1

The number of potential predictors covaries with...

x1 y2
ecosystem
x2
x3
x4
predictability

. . . . . . . xN
complexity

x1 y1 cells
. . . . . . . xn
Anova Regression Multiple regression

X1 (2) Y X2 Y x1 y2
x2
x3
Y x4
Y . . . . . . . xN

?
Male Female
X2
X1

Increasing explanatory power

time parcial1

time parcial1
quices

Multiple regression allows investigating the effect of several


explanatory variables

Three magic numbers to look for

R2 • Because 1 - R2 is our estimate of ignoRRance

B • Because it allows the real biological interpretation of causal relationships

• Because it gives a rough idea of the chances of being wrong by


P accepting the pattern
First single linear regression

5.0

4.5

time parcial1
4.0

parcial1
3.5

3.0

2.5

40 50 60
time

First single linear regression

5.0

4.5

4.0
parcial1

3.5

3.0

2.5

40 50 60
time

Second single linear regression

quices parcial1 4
parcial1

20 25 30 35 40
quices
Second single linear regression

parcial1
3

20 25 30 35 40
quices

Reading multiple
regression

time parcial1
quices

Both predictors: partial effect plots

Component + Residual Plots


0.5
0.5
Component+Residual(parcial1)

Component+Residual(parcial1)

0.0
0.0

−0.5
−0.5

−1.0
−1.0

−1.5
−1.5

40 45 50 55 60 65 20 25 30 35 40

time quices
Both predictors: partial effect plots

5.0
5

4.5

4.0
4

parcial1
parcial1

3.5

3.0 3

2.5

40 50 60 20 25 30 35 40
time quices

Two major advantages of the multiple regression


approach

• I can test for the effect of one Important where there is


predictor, while controlling the covariation among predictors
effect of a second one

• I can compare the effect size


In which
(ES, slope) of the units?
predictors…..

Comparing effect sizes in simple regression

X1 Y
Fruit mass (g)

g/h

Time in sun (h)


Comparing effect sizes in multiple regression

X1 Y
X1 Y
X2
Fruit mass (g)

Time in sun (g)

Data standardisation: making two predictors


comparable
𝜇 + SD =10 ± 4 g 𝜇 + SD =30 ± 10 h

Nitrogen addition (g) Time in sun (h)

Units after data standardisation

-SD 𝜇 + SD
Standardised effects

Fruit mass Time in sun Fruit mass


Time in sun
Nitrogen addition

g/h
Fruit mass (g)

sd(Fruit mass) / sd (Time in sun)

sd(Fruit mass) / sd (Nitrogen addition)

Time in sun (g)

Reading multiple
regression

time parcial1
quices

Multiple regression and residual analysis

Residual analyses
90

Height Weight
80

Age resWeight
Weight (Kg)

70

60 Multiple regression
or LM

50
Height Weight

Age
40
150 155 160 165 170 175 180 185 190
Height (cm)
En las tripas de una regresión múltiple

X1 Y

X2

X1 Y X2 Y

X2 resY on X1 X1 resY on X2
partial effects partial effects

partial effects of X1 Y

partial effects of X2

On the way to partial plots

90

80
Weight (Kg)

70
Standardisation
60

50

40
150 155 160 165 170 175 180 185 190
Height (cm)

Mucha maravilla para ser cierto

X1 Y

X2

Covariation between X1 and X2 must be null or low

No se pierda: collinearity tests and Variance Inflation Factor


To summarise

• R-Square and P-value are provided for the whole model

• An internal t-test is used to estimate each predictor effect and its


P-value

• The effects of explanatory variables are comparable by using


standardised Beta coefficients

• Multiple regression controls for moderate covariation in


explanatory variables

You might also like