non-linear relationships
DESCRIPTION
Non-Linear Relationships. If a relationship is not linear, how can we deal with it. For example:. Non-Linear Relationships. One possibility is to take the natural logarithm of both sides. The natural logarithm is the inverse of the natural exponential function. Natural exponent:. - PowerPoint PPT PresentationTRANSCRIPT
1Spring 02
Non-Linear Relationships
If a relationship is not linear, how can we deal with it.
For example:
PyM
or
XXY
d
32321
2Spring 02
Non-Linear Relationships
One possibility is to take the natural logarithm of both sides.
The natural logarithm is the inverse of the natural exponential function. Natural exponent:
YYX
eY
nne
e
X
n
lnlog
71828.2)1
1(lim
3Spring 02
Graph of ex
-5
0
5
10
15
20
25
-15 -10 -5 0 5
4Spring 02
Graph of ln x
0
2
4
6
8
0 20 40 60 80 100
5Spring 02
Non-Linear Relationships
Natural logs and exponential functions: e0 =1 ln 1 = 0
Logarithms have certain properties: ln (XY) = ln X+ ln Y ln(X/Y) = ln X – ln Y
ln(1/X) = ln 1 – ln X = - ln X ln ax = x lnA
6Spring 02
Non-Linear Relationships
*33
*22
*1
33221
33221
321
*
)(ln)(ln)(ln)(ln
lnlnlnln
32
XXY
XXY
XXY
XXY
7Spring 02
Non-Linear Relationships
)(ln)(ln)(ln)(ln
lnlnlnln
YPM
YPM
PYM
d
d
d
8Spring 02
Elasticities
When you take the natural logs of a non-linear relationship and estimate the equation, the estimated coefficients are also the elasticities.
vex
xv
yu
xfy
ln
ln
)(
yx
v
Edx
dy
y
x
xdx
dy
ye
dx
dy
y
dv
dx
dx
dy
y
dv
dx
dx
dy
dy
du
dv
du
xd
yd
,
11
1
)(ln
)(ln
9Spring 02
Dummy Variables
Used to quantify qualitative differences.
For example, Consumption as a function of income may be
affected by wartime/peacetime Income as a function of education may be affected
by gender Quantity demanded of ice cream as a function of
price may be affected by season.
10Spring 02
Dummy Variables
How does consumption differ in wartime from peacetime?
Yd
C Cp
Cw
C Cp
Yd
Cw
C Cp
Yd
Cw
11Spring 02
Dummy Variables
)(
)(
4321
321
321
21
dd
dd
d
d
DYDYC
DYYC
DYC
YC
12Spring 02
Example
Salvatore: Below is the quantity supplied of milk by a dairy for 14 months but for 3 of those months there was a strike
Month 1 2 3 4 5 6 7 8 9 10 11 12 13 14QS 98 100 103 105 80 87 94 113 116 118 121 123 126 128P $0.79 $0.80 $0.82 $0.82 $0.93 $0.95 $0.96 $0.88 $0.88 $0.90 $0.90 $0.94 $0.96 $0.97Strike 0 0 0 0 1 1 1 0 0 0 0 0 0 0
13Spring 02
Example
If we estimate quantity supplied as a function of price without taking into consideration strike, then we would get these results:
If we estimate quantity supplied as a function of price taking into consideration strike (just affecting the constant), then we would get these results:
If strike: If no strike:
PQ s 5.509.62ˆ (1.05) (0.76)
DPQ s 3.381609.34ˆ (-3.26) (13.9) (-21.2)
PQ s 1602.73ˆ
PQ s 1609.34ˆ
14Spring 02
Example
If we estimate quantity supplied as a function of price taking into consideration strike (just affecting slope), then we would get these results:
If strike: If no strike:
If we estimate quantity supplied as a function of price taking into consideration strike (affecting both the constant and slope), then we would get these results:
If strike: If no strike:
)(*0.284*9.306*0.166*1.32ˆ DYDPQ s
)(*4.40*0.169*1.35ˆ DYPQ s PQ s 6.1281.35ˆ
PQ s 0.1661.32ˆ PQ s 4050.339ˆ
PQ s 6.1281.35ˆ
15Spring 02
Wald Test Revisited
:
0...:
...
......
210
221
11221
a
kmm
mm
kkmmmm
H
H
uXXY
XXXXY
At least one of the above betas is not zero.
)(
)()(
knESS
mkESSESS
FU
UR
16Spring 02
Example
We can test whether the explanatory variables including strike as a set are significant in explaining price by using a Wald Test:
46796.2
1382
10/6.292
)6.292793(
)(
)()(
knESS
mkESSESS
FU
UR
17Spring 02
Test for Structural Change
Data 7-19 contains data from 1960-1988 on the demand for cigarettes in Turkey and its determinants. Estimate the whole equation and also estimate whether two anti-smoking campaigns had their desired effect. In late 1981, health warning were issued in Turkey
regarding the hazards of cigarette smoking. In 1986, one of the national newspapers launched an
antismoking campaign.
18Spring 02
Smoking Problem
Coefficientsa
-4.585 .752 -6.094 .000
-.484 .106 -1.055 -4.581 .000
.688 .098 1.610 6.990 .000
(Constant)
LNP
LNY
Model1
B Std. Error
UnstandardizedCoefficients
Beta
Standardized
Coefficients
t Sig.
Dependent Variable: LNQa.
Coefficientsa
1.656 .126 13.178 .000
3.423E-04 .000 1.387 6.326 .000
-.419 .100 -.922 -4.204 .000
(Constant)
Y
P
Model1
B Std. Error
UnstandardizedCoefficients
Beta
Standardized
Coefficients
t Sig.
Dependent Variable: Qa.
On levels
On natural logs
19Spring 02
Smoking Problem
Coefficientsa
-4.186 .535 -7.825 .000
-.201 .090 -.440 -2.248 .034
.621 .070 1.452 8.804 .000
-.103 .026 -.413 -3.931 .001
-.103 .037 -.295 -2.802 .010
(Constant)
LNP
LNY
D82
D86
Model1
B Std. Error
UnstandardizedCoefficients
Beta
Standardized
Coefficients
t Sig.
Dependent Variable: LNQa.
Regression with dummy variables affecting constant for after 1982 and 1986:
20Spring 02
Smoking Problem
Coefficientsa
-4.800 .677 -7.095 .000
-.337 .129 -.735 -2.608 .016
.705 .091 1.651 7.761 .000
-.108 .207 -.433 -.521 .608
-.406 .236 -1.161 -1.725 .099
1.637E-02 .246 .066 .067 .947
.288 .250 .944 1.151 .262
(Constant)
LNP
LNY
D82
D86
D82P
D86P
Model1
B Std. Error
UnstandardizedCoefficients
Beta
Standardized
Coefficients
t Sig.
Dependent Variable: LNQa.
Regression with dummy variables affecting constant and slope for after 1982 and 1986:
21Spring 02
Smoking Problem
Coefficientsa
-4.824 .677 -7.127 .000
-.342 .129 -.745 -2.644 .015
.708 .091 1.658 7.793 .000
-1.50E-02 .025 -.516 -.608 .549
3.961E-02 .249 .159 .159 .875
-4.58E-02 .028 -1.129 -1.643 .115
.275 .253 .902 1.087 .289
(Constant)
LNP
LNY
D82Y
D82P
D86Y
D86P
Model1
B Std. Error
UnstandardizedCoefficients
Beta
Standardized
Coefficients
t Sig.
Dependent Variable: LNQa.
Regression with dummy variables affecting just the slope for after 1982 and 1986:
22Spring 02
Coefficients of Different Regressions
To test whether the assumptions of two different regressions is correct, we start with the null hypothesis that the regressions are identical and see whether or not we can reject the null hypothesis. Test whether the stock market has changed the
relationship between consumption and wealth. Test whether the relationship between years of
education and income is different for women and men or for different regions of the country.
23Spring 02
Coefficients of Different Regressions
jkjkjjj
ikikiii
XXXY
XXXY
...
...
33221
33221
To test the null hypothesis:
kk ,...,, 2211
Run a regression on the whole model, N+M observations. Then run two separate regressions.
Ni ,1
Mj ,1
kMNESS
kESSESS
FU
UR
kMNk
2
)(
2,