Che materia stai cercando?

# Regressione non lineare

Materiale didattico per il corso di Econometria applicata del prof. Roberto Golinelli. Trattasi di slides in lingua inglese a cura del docente, all'interno delle quali sono affrontati i seguenti argomenti: funzione della regressione non lineare; interazione tra variabili binarie e variabili continue.

Esame di Econometria applicata docente Prof. R. Golinelli

Anteprima

### ESTRATTO DOCUMENTO

The linear-log and cubic regression functions 21

II. Log-linear population regression function

β β

+ X (b)

ln(Y) = 0 1

β β

## ∆Y) ∆X)

Now change X: ln(Y + = + (X + (a)

0 1 β ∆X

## ∆Y)

Subtract (a) – (b): ln(Y + – ln(Y) = 1

∆ Y β

≈ ∆X

so 1

Y ∆ Y / Y

β ≈ ∆X)

(for small

or 1 ∆ X 22

Log-linear case, continued β β

ln(Y ) = + X + u

i 0 1 i i

∆ Y / Y

β ≈

## ∆X,

for small 1 ∆ X

∆ Y

• = percentage change in Y, so a change in X by

Now 100× Y β

one unit (∆

X = 1) is associated with a 100 % change in Y.

1

β

• ⇒

1 unit increase in X increase in ln(Y)

1 β

⇒ % increase in Y

100 1

• Note: What are the units of u and the SER?

i

fractional (proportional) deviations

o for example, SER = 0.2 means…

o 23

III. Log-log population regression function

β β

) = + ln(X ) (b)

ln(Y i 0 1 i

β β

## ∆Y) ∆X)

Now change X: ln(Y + = + ln(X + (a)

0 1

β ∆X)

∆Y) [ln(X + – ln(X)]

Subtract: ln(Y + – ln(Y) = 1

∆ ∆

β

so 1

## Y X

∆ Y / Y

β ≈ ∆X)

(for small

or 1 ∆ X / X 24

Log-log case, continued β β

ln(Y ) = + ln(X ) + u

i 0 1 i i

## ∆X,

for small ∆ Y / Y

β ≈

1 ∆ X / X

∆ ∆

## Y X

Now 100× = percentage change in Y, and 100× =

## Y X

percentage change in X, so a 1% change in X is associated with a

β % change in Y.

1

• β

In the log-log specification, has the interpretation of an

1

elasticity. 25

Example: ln( TestScore) vs. ln( Income)

• First defining a new dependent variable, ln(TestScore), and the

new regressor, ln(Income)

• The model is now a linear regression of ln(TestScore) against

ln(Income), which can be estimated by OLS:

ˆ

ln( Test S core ) = 6.336 + 0.0554×ln(Income )

i

(0.006) (0.0021)

An 1% increase in Income is associated with an increase of

0.0554% in TestScore (Income up by a factor of 1.01,

TestScore up by a factor of 1.000554) 26

Example: ln( TestScore) vs. ln( Income), ctd.

ˆ

ln( Test S core ) = 6.336 + 0.0554×ln(Income )

i

(0.006) (0.0021)

• For example, suppose income increases from $10,000 to$11,000, or by 10%. Then TestScore increases by

approximately .0554×10% = 0.554%. If TestScore = 650, this

corresponds to an increase of .00554×650 = 3.6 points.

• How does this compare to the log-linear model? 27

The log-linear and log-log specifications:

• Note vertical axis

• Neither seems to fit as well as the cubic or linear-log 28

Summary: Logarithmic transformations

• Three cases, differing in whether Y and/or X is transformed by

taking logarithms.

• The regression is linear in the new variable(s) ln(Y) and/or

ln(X), and the coefficients can be estimated by OLS.

• Hypothesis tests and confidence intervals are now

implemented and interpreted “as usual”

• β

The interpretation of differs from case to case.

1

• Choice of specification should be guided by judgment (which

interpretation makes the most sense in your application?), tests,

and plotting predicted values 29

Interactions Between Independent Variables

(SW Section 8.3)

• Perhaps a class size reduction is more effective in some

circumstances than in others…

• Perhaps smaller classes help more if there are many English

learners, who need individual attention

∆ TestScore

• might depend on PctEL

That is, ∆ STR ∆ Y

• More generally, might depend on X 2

∆ X 1

• How to model such “interactions” between X and X ?

1 2

• We first consider binary X’s, then continuous X’s 30

(a) Interactions between two binary variables

Example: TestScore, STR, English learners

≥ ≥

 

1 if STR 20 1 if PctEL l0

 

Let HiSTR = and HiEL =

< <

 

0 if 20 0 if 10

STR PctEL

ˆ

Test S core = 664.1 – 18.2HiEL – 1.9HiSTR – 3.5(HiSTR×HiEL)

(1.4) (2.3) (1.9) (3.1)

• “Effect” of HiSTR when HiEL = 0 is –1.9

• “Effect” of HiSTR when HiEL = 1 is –1.9 – 3.5 = –5.4

• Class size reduction is estimated to have a bigger effect when the

percent of English learners is large

• This interaction isn’t statistically significant: t = 3.5/3.1 31

(b) Interactions between continuous and binary variables

β β β

= + D + X + u

Y i 0 1 i 2 i i

• D is binary, X is continuous

i

• As specified above, the effect on Y of X (holding constant D) =

β , which does not depend on D

2

• To allow the effect of X to depend on D, include the “interaction

×X as a regressor:

term” D i i β β β β ×X

Y = + D + X + (D ) + u

i 0 1 i 2 i 3 i i i 32

Binary-continuous interactions: the two regression lines

β β β β ×X

Y = + D + X + (D ) + u

i 0 1 i 2 i 3 i i i

Observations with D = 0 (the “D = 0” group):

i

β β

Y = + X + u The D=0 regression line

i 0 2 i i

= 1 (the “D = 1” group):

Observations with D i

β β β β

Y = + + X + X + u

i 0 1 2 i 3 i i

β β β β

+ ) + ( + )X + u The D=1 regression line

= ( 0 1 2 3 i i 33

34

35

Interpreting the coefficients

β β β β ×X

= + D + X + (D ) + u

Y i 0 1 i 2 i 3 i i i

General rule: compare the various cases

β β β β

Y = + D + X + (D×X) (b)

0 1 2 3

Now change X: β β β β

∆Y + D + (X+∆X) + [D× (X+∆X)] (a)

Y + = 0 1 2 3

subtract (a) – (b): ∆ Y

β β β β

## ∆X

∆Y + D∆X or = + D

= 2 3 2 3

∆ X

• The effect of X depends on D (what we wanted)

β

• = increment to the effect of X, when D = 1

3 36

Example: TestScore, STR, HiEL (=1 if PctEL 10)

ˆ

Test S core = 682.2 – 0.97 STR + 5.6 HiEL – 1.28 (STR×HiEL)

(11.9) (0.59) (19.5) (0.97)

• When HiEL = 0:

ˆ

Test S core = 682.2 – 0.97 STR

• When HiEL = 1,

ˆ

Test S core = 682.2 – 0.97 STR + 5.6 – 1.28 STR

= 687.8 – 2.25 STR

• Two regression lines: one for each HiEL group.

• Class size reduction is estimated to have a larger effect when the

percent of English learners is large. 37

Example, ctd: Testing hypotheses

ˆ

Test S core = 682.2 – 0.97 STR + 5.6 HiEL – 1.28 (STR×HiEL)

(11.9) (0.59) (19.5) (0.97)

• The two regression lines have the same slope if the coefficient

×

on STR HiEL is zero: t = –1.28/0.97 = –1.32

• The two regression lines have the same intercept if the

coefficient on HiEL is zero: t = –5.6/19.5 = 0.29

• The two regression lines are the same if population coefficient

on HiEL = 0 and if population coefficient on STR×HiEL = 0:

F = 89.94 (p-value < .001) !!

• We reject the joint hypothesis but neither individual hypothesis

(how can this be?) 38

(c) Interactions between two continuous variables

β β β

Y = + X + X + u

i 0 1 1i 2 2i i

• X , X are continuous

1 2

• doesn’t depend on X

As specified, the effect of X 1 2

• As specified, the effect of X doesn’t depend on X

2 1

• to depend on X , include the

To allow the effect of X 1 2

×X as a regressor:

“interaction term” X 1i 2i

β β β β ×X

Y = + X + X + (X ) + u

i 0 1 1i 2 2i 3 1i 2i i 39

Interpreting the coefficients:

β β β β ×X

= + X + X + (X ) + u

Y i 0 1 1i 2 2i 3 1i 2i i

General rule: compare the various cases

β β β β ×X

Y = + X + X + (X ) (b)

0 1 1 2 2 3 1 2

Now change X :

1

β β β β

∆Y + (X +∆X ) + X + [(X +∆X )×X ] (a)

Y+ = 0 1 1 1 2 2 3 1 1 2

subtract (a) – (b): ∆ Y

β β β β

## ∆X ∆X

∆Y + X or = + X

= 1 1 3 2 1 1 3 2

∆ X 1

• The effect of X depends on X (what we wanted)

1 2

β

• = increment to the effect of X from a unit change in X

3 1 2 40

Example: TestScore, STR, PctEL

ˆ

Test S core = 686.3 – 1.12 STR – 0.67 PctEL + 0.0012 (STR×PctEL),

(11.8) (0.59) (0.37) (0.019)

The estimated effect of class size reduction is nonlinear because

the size of the effect itself depends on PctEL:

∆ TestScore = –1.12 + 0.0012PctEL

∆ STR ∆ TestScore

PctEL ∆ STR

0 –1.12

×

20% –1.12+.0012 20 = –1.10 41

Example, ctd: hypothesis tests

ˆ

Test S core = 686.3 – 1.12 STR – 0.67 PctEL + .0012 (STR×PctEL),

(11.8) (0.59) (0.37) (0.019)

• Does population coefficient on STR×PctEL = 0?

t = .0012/.019 = .06 can’t reject null at 5% level

• Does population coefficient on STR = 0?

t = –1.12/0.59 = –1.90 can’t reject null at 5% level

• Do the coefficients on both STR and STR×PctEL = 0?

F = 3.89 (p-value = .021) reject null at 5% level(!!) (Why?

high but imperfect multicollinearity) 42

PAGINE

26

PESO

2.06 MB

AUTORE

PUBBLICATO

+1 anno fa

DETTAGLI
Corso di laurea: Corso di laurea in economia, mercati e istituzioni
SSD:
Università: Bologna - Unibo
A.A.: 2011-2012

I contenuti di questa pagina costituiscono rielaborazioni personali del Publisher Atreyu di informazioni apprese con la frequenza delle lezioni di Econometria applicata e studio autonomo di eventuali libri di riferimento in preparazione dell'esame finale o della tesi. Non devono intendersi come materiale ufficiale dell'università Bologna - Unibo o del prof Golinelli Roberto.

Acquista con carta o conto PayPal

Scarica il file tutte le volte che vuoi

Paga con un conto PayPal per usufruire della garanzia Soddisfatto o rimborsato

Recensioni
Ti è piaciuto questo appunto? Valutalo!

Dispensa

Dispensa

Dispensa

Dispensa