0% found this document useful (0 votes)
71 views

Examples PDF

1. The document describes multiple linear regression models using data on car prices, weights, fuel efficiency, and origin. 2. The first model examines how car weight and its square relate to price. The second adds fuel efficiency as a predictor. 3. Hypotheses tests whether certain regressors like weight impact price or have constant/changing effects. OLS is used to estimate coefficients and test hypotheses.

Uploaded by

Amissa Astha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Examples PDF

1. The document describes multiple linear regression models using data on car prices, weights, fuel efficiency, and origin. 2. The first model examines how car weight and its square relate to price. The second adds fuel efficiency as a predictor. 3. Hypotheses tests whether certain regressors like weight impact price or have constant/changing effects. OLS is used to estimate coefficients and test hypotheses.

Uploaded by

Amissa Astha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

ECON 351*: Examples of Multiple Regression Models M.G.

Abbott

Examples of Multiple Linear Regression Models

Data: Stata tutorial data set in text file auto1.raw or auto1.txt.

Sample data: A cross-sectional sample of 74 cars sold in North America in 1978.

Variable definitions:
price i = the price of the i-th car (in US dollars);
wgt i = the weight of the i-th car (in pounds);
mpg i = the fuel efficiency of the i-th car (in miles per gallon);
foreign i = 1 if the i-th car is manufactured outside North America, = 0 otherwise.

File: examples.doc Page 1 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

Multiple Linear Regression Model (1)

The PRE is:

pricei = β1 + β 2 wgt i + β3 wgt i2 + u i . (1)

k = 3; k−1=2

• The regressor wgt i2 is called an interaction variable. It is the product of wgt i


with itself; it is a second-order polynomial term in the variable wgt i .

Marginal or partial effect of wgti


The marginal effect of wgti on pricei is obtained by partially differentiating regression
equation (2) with respect to wgti.

∂ pricei ∂ E (pricei wgt i ) ∂ E(pricei • )


= = = β 2 + 2 β3 wgt i .
∂ wgt i ∂ wgt i ∂ wgt i

• Marginal effect of wgti on pricei is a linear function of wgti. It is not a constant.

Hypotheses of interest

1. The marginal effect of wgti on pricei is zero: i.e., wgti has no effect on pricei; or
car pricei is unrelated to car wgti.

∂ pricei
• H0: β2 = 0 and β3 = 0 ⇒ = β 2 + 2 β3 wgt i = 0 .
∂ wgt i

Restricted model corresponding to H0: set β2 = 0 and β3 = 0 in PRE (1).


price i = β1 + u i .

k0 = 1; k0 − 1 = 0

∂ pricei
• H1: β2 ≠ 0 and/or β3 ≠ 0 ⇒ = β 2 + 2 β3 wgt i .
∂ wgt i

Unrestricted model corresponding to H1: is PRE (1).

File: examples.doc Page 2 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

2. The marginal effect of wgti on pricei is constant: i.e., it does not depend on wgti.

∂ pricei
• H0: β3 = 0 ⇒ = β 2 + 2 β3 wgt i = β 2 .
∂ wgt i

Restricted model corresponding to H0: set β3 = 0 in PRE (1).


price i = β1 + β 2 wgt i + u i .

k0 = 2; k0 − 1 = 1

∂ pricei
• H1: β3 ≠ 0 ⇒ = β 2 + 2 β3 wgt i .
∂ wgt i

Unrestricted model corresponding to H1: is PRE (1).

pricei = β1 + β 2 wgt i + β3 wgt i2 + u i . (1)

k = 3; k−1=2

The OLS SRE for Model (1)


. regress price wgt wgtsq

Source | SS df MS Number of obs = 74


---------+------------------------------ F( 2, 71) = 23.09
Model | 250285462 2 125142731 Prob > F = 0.0000
Residual | 384779934 71 5419435.69 R-squared = 0.3941
---------+------------------------------ Adj R-squared = 0.3770
Total | 635065396 73 8699525.97 Root MSE = 2328.0

------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
wgt | -7.273097 2.691747 -2.702 0.009 -12.64029 -1.905906
wgtsq | .0015142 .0004337 3.491 0.001 .0006494 .002379
_cons | 13418.8 3997.822 3.357 0.001 5447.372 21390.23
------------------------------------------------------------------------------

. test wgt wgtsq F-test of hypothesis 1


( 1) wgt = 0.0
( 2) wgtsq = 0.0

F( 2, 71) = 23.09
Prob > F = 0.0000

File: examples.doc Page 3 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

3. The marginal effect of wgti on pricei is decreasing in wgti: i.e., the marginal
effect of wgti on pricei exhibits decreasing marginal returns in wgti.

∂ 2 pricei
• H0: β3 = 0 or β3 ≥ 0 ⇒ = 2 β3 ≥ 0 .
∂ wgt i2

∂ pricei ∂ 2 pricei
• H1: β3 < 0 ⇒ = β 2 + 2 β3 wgt i and = 2 β3 < 0 .
∂ wgt i ∂ wgt i2
⇒ a one-sided alternative hypothesis
⇒ a left-tail test

Perform a left-tail t-test using the OLS coefficient estimate β̂3 of β3 for the
unrestricted model corresponding to H1, which is PRE (1):

pricei = β1 + β 2 wgt i + β3 wgt i2 + u i . (1)

k = 3; k − 1 = 2; N − k = N − 3.

4. The marginal effect of wgti on pricei is increasing in wgti: i.e., the marginal effect
of wgti on pricei exhibits increasing marginal returns in wgti.

∂ 2 pricei
• H0: β3 = 0 or β3 ≤ 0 ⇒ = 2 β3 ≤ 0 .
∂ wgt i2

∂ pricei ∂ 2 pricei
• H1: β3 > 0 ⇒ = β 2 + 2 β3 wgt i and = 2 β3 > 0 .
∂ wgt i ∂ wgt i2
⇒ a one-sided alternative hypothesis
⇒ a right-tail test

Perform a right-tail t-test using the OLS coefficient estimate β̂3 of β3 for the
unrestricted model corresponding to H1, which is PRE (1):

pricei = β1 + β 2 wgt i + β3 wgt i2 + u i . (1)

k = 3; k − 1 = 2; N − k = N − 3.

File: examples.doc Page 4 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

Multiple Linear Regression Model (2)

The PRE is:


pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + u i . (2)

k = 4; k − 1 = 3.

Marginal or partial effect of wgti


The marginal effect of wgti on pricei is obtained by partially differentiating regression
equation (2) with respect to wgti.

∂ pricei ∂ E (pricei wgt i , mpg i ) ∂ E(pricei • )


= = = β 2 + 2 β3 wgt i .
∂ wgt i ∂ wgt i ∂ wgt i

• Marginal effect of wgti on pricei is a linear function of wgti; it is not a constant.

Marginal or partial effect of mpgi


The marginal or partial effect of mpgi mpg i on pricei is obtained by partially
differentiating regression equation (2) with respect to mpgi.

∂ pricei ∂ E(pricei wgt i , mpg i ) ∂ E(pricei • )


= = = β4 .
∂ mpg i ∂ mpg i ∂ mpg i

• Marginal effect of mpgi on pricei is constant: it does not vary with any
observable variable.

Hypotheses of interest

1. The marginal effect of wgti on pricei is zero: i.e., wgti has no effect on pricei; or
car pricei is unrelated to car wgti.

2. The marginal effect of wgti on pricei is constant: i.e., it does not depend on wgti.

3. The marginal effect of mpgi on pricei is zero: i.e., mpgi has no effect on pricei; or
car pricei is unrelated to fuel efficiency as measured by mpgi.

File: examples.doc Page 5 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

1. The marginal effect of wgti on pricei is zero: i.e., wgti has no effect on pricei; or
car pricei is unrelated to car wgti.

∂ pricei
• H0: β2 = 0 and β3 = 0 ⇒ = β 2 + 2 β3 wgt i = 0 .
∂ wgt i

Restricted model corresponding to H0: set β2 = 0 and β3 = 0 in PRE (2).

price i = β1 + β 4 mpg i + u i .

k0 = 2; k0 − 1 = 1.

∂ pricei
• H1: β2 ≠ 0 and/or β3 ≠ 0 ⇒ = β 2 + 2 β3 wgt i .
∂ wgt i

Unrestricted model corresponding to H1: is PRE (2).

pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + u i . (2)

k = 4; k − 1 = 3.

2. The marginal effect of wgti on pricei is constant: i.e., it does not depend on wgti.

∂ pricei
• H0: β3 = 0 ⇒ = β 2 + 2 β3 wgt i = β 2 .
∂ wgt i

Restricted model corresponding to H0: set β3 = 0 in PRE (2).

price i = β1 + β 2 wgt i + β 4 mpg i + u i .

k0 = 3; k0 − 1 = 2

∂ pricei
• H1: β3 ≠ 0 ⇒ = β 2 + 2 β3 wgt i .
∂ wgt i

Unrestricted model corresponding to H1: is PRE (2).

pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + u i . (2)

k = 4; k − 1 = 3.

File: examples.doc Page 6 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

3. The marginal effect of mpgi on pricei is zero: i.e., mpgi has no effect on pricei; or
car pricei is unrelated to fuel efficiency as measured by mpgi.

∂ pricei
• H0: β4 = 0 ⇒ = β4 = 0 .
∂ mpg i

Restricted model corresponding to H0: set β4 = 0 in PRE (2).

price i = β1 + β 2 wgt i + β 3 wgt i2 + u i .

k0 = 3; k0 − 1 = 2

∂ price i
• H1: β4 ≠ 0 ⇒ = β4 .
∂ mpg i

Unrestricted model corresponding to H1: is PRE (2).

pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + u i . (2)

k = 4; k − 1 = 3.

File: examples.doc Page 7 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

The OLS SRE for Model (2)

pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + u i . (2)

. regress price wgt wgtsq mpg

Source | SS df MS Number of obs = 74


---------+------------------------------ F( 3, 70) = 16.47
Model | 262753599 3 87584533.2 Prob > F = 0.0000
Residual | 372311797 70 5318739.95 R-squared = 0.4137
---------+------------------------------ Adj R-squared = 0.3886
Total | 635065396 73 8699525.97 Root MSE = 2306.2

------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
wgt | -9.039563 2.905512 -3.111 0.003 -14.83442 -3.244703
wgtsq | .0016794 .000443 3.791 0.000 .0007958 .002563
mpg | -124.7675 81.49014 -1.531 0.130 -287.2945 37.75945
_cons | 19804.79 5751.709 3.443 0.001 8333.365 31276.21
------------------------------------------------------------------------------

. test wgt wgtsq F-test of hypothesis 1


( 1) wgt = 0.0
( 2) wgtsq = 0.0

F( 2, 70) = 11.59
Prob > F = 0.0000

. test wgtsq F-test of hypothesis 2


( 1) wgtsq = 0.0

F( 1, 70) = 14.37
Prob > F = 0.0003

. test mpg F-test of hypothesis 3


( 1) mpg = 0.0

F( 1, 70) = 2.34
Prob > F = 0.1303

. lincom mpg t-test of hypothesis 3


( 1) mpg = 0.0

------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
(1) | -124.7675 81.49014 -1.531 0.130 -287.2945 37.75945
------------------------------------------------------------------------------

File: examples.doc Page 8 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

Multiple Linear Regression Model (3)

The PRE is:


pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + β5 mpg i2 + u i . (3)

k = 5; k − 1 = 4.

Marginal or partial effect of wgti

∂ pricei ∂ E(pricei wgt i , mpg i ) ∂ E(pricei • )


= = = β 2 + 2 β3 wgt i .
∂ wgt i ∂ wgt i ∂ wgt i

• Marginal effect of wgti on pricei is a linear function of wgti; it is not a constant.

Marginal or partial effect of mpgi

∂ pricei ∂ E(pricei wgt i , mpg i ) ∂ E(pricei • )


= = = β 4 + 2 β5 mpg i .
∂ mpg i ∂ mpg i ∂ mpg i

• Marginal effect of mpgi on pricei is a linear function of mpgi; it is not a


constant.

Hypotheses of interest

1. The marginal effect of wgti on pricei is zero: i.e., wgti has no effect on pricei; or
car pricei is unrelated to car wgti.

2. The marginal effect of wgti on pricei is constant: i.e., it does not depend on wgti
or mpgi.

3. The marginal effect of mpgi on pricei is zero: i.e., mpgi has no effect on pricei; or
car pricei is unrelated to fuel efficiency as measured by mpgi.

4. The marginal effect of mpgi on pricei is constant: i.e., it does not depend on mpgi
or wgti.

File: examples.doc Page 9 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

1. The marginal effect of wgti on pricei is zero: i.e., wgti has no effect on pricei; or
car pricei is unrelated to car wgti.

∂ pricei
• H0: β2 = 0 and β3 = 0 ⇒ = β 2 + 2 β3 wgt i = 0 .
∂ wgt i

Restricted model corresponding to H0: set β2 = 0 and β3 = 0 in PRE (3).

price i = β1 + β 4 mpg i + β 5 mpg i2 + u i .

k0 = 3; k0 − 1 = 2.

∂ pricei
• H1: β2 ≠ 0 and/or β3 ≠ 0 ⇒ = β 2 + 2 β3 wgt i
∂ wgt i

Unrestricted model corresponding to H1: is PRE (3).

pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + β5 mpg i2 + u i . (3)

k = 5; k − 1 = 4.

2. The marginal effect of wgti on pricei is constant: i.e., it does not depend on wgti
or mpgi.
∂ pricei
• H0: β3 = 0 ⇒ = β2
∂ wgt i

Restricted model corresponding to H0: set β3 = 0 in PRE (3).

price i = β1 + β 2 wgt i + β 4 mpg i + β 5 mpg i2 + u i .

k0 = 4; k0 − 1 = 3.

∂ pricei
• H1: β3 ≠ 0 ⇒ = β 2 + 2 β3 wgt i
∂ wgt i

Unrestricted model corresponding to H1: is PRE (3).

pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + β5 mpg i2 + u i . (3)

k = 5; k − 1 = 4.

File: examples.doc Page 10 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

3. The marginal effect of mpgi on pricei is zero: i.e., mpgi has no effect on pricei; or
car pricei is unrelated to fuel efficiency as measured by mpgi.

∂ price i
• H0: β4 = 0 and β5 = 0 ⇒ = β 4 + 2 β 5 mpg i = 0 .
∂ mpg i

Restricted model corresponding to H0: set β4 = 0 and β5 = 0 in PRE (3).

price i = β1 + β 2 wgt i + β 3 wgt i2 + u i .

k0 = 3; k0 − 1 = 2.

∂ price i
• H1: β4 ≠ 0 and/or β5 ≠ 0 ⇒ = β 4 + 2 β 5 mpg i .
∂ mpg i

Unrestricted model corresponding to H1: is PRE (3).

pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + β5 mpg i2 + u i . (3)

k = 5; k − 1 = 4.

4. The marginal effect of mpgi on pricei is constant: i.e., it does not depend on mpgi
or wgti.
∂ price i
• H0: β5 = 0 ⇒ = β 4 + 2 β 5 mpg i = β 4 .
∂ mpg i

Restricted model corresponding to H0: set β5 = 0 in PRE (3).

price i = β1 + β 2 wgt i + β 3 wgt i2 + β 4 mpg i + u i .

k0 = 4; k0 − 1 = 3.

∂ price i
• H1: β5 ≠ 0 ⇒ = β 4 + 2 β 5 mpg i
∂ mpg i

Unrestricted model corresponding to H1: is PRE (3).

pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + β5 mpg i2 + u i . (3)

k = 5; k − 1 = 4.

File: examples.doc Page 11 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

Model (3)

pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + β5 mpg i2 + u i . (3)

The OLS SRE for Model (3)


. regress price wgt wgtsq mpg mpgsq

Source | SS df MS Number of obs = 74


---------+------------------------------ F( 4, 69) = 12.93
Model | 272062621 4 68015655.2 Prob > F = 0.0000
Residual | 363002775 69 5260909.79 R-squared = 0.4284
---------+------------------------------ Adj R-squared = 0.3953
Total | 635065396 73 8699525.97 Root MSE = 2293.7

------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
wgt | -7.99723 2.994029 -2.671 0.009 -13.97015 -2.024306
wgtsq | .0014407 .0004757 3.028 0.003 .0004916 .0023898
mpg | -615.2419 377.5204 -1.630 0.108 -1368.375 137.8907
mpgsq | 9.323582 7.009083 1.330 0.188 -4.659156 23.30632
_cons | 24884.95 6878.057 3.618 0.001 11163.61 38606.3
------------------------------------------------------------------------------

. test wgt wgtsq F-test of hypothesis 1


( 1) wgt = 0.0
( 2) wgtsq = 0.0

F( 2, 69) = 5.34
Prob > F = 0.0070

. test wgtsq F-test of hypothesis 2


( 1) wgtsq = 0.0

F( 1, 69) = 9.17
Prob > F = 0.0035

. test mpg mpgsq F-test of hypothesis 3


( 1) mpg = 0.0
( 2) mpgsq = 0.0

F( 2, 69) = 2.07
Prob > F = 0.1340

. test mpgsq F-test of hypothesis 4


( 1) mpgsq = 0.0

F( 1, 69) = 1.77
Prob > F = 0.1878

File: examples.doc Page 12 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

Multiple Linear Regression Model (4)

The PRE is:


price i = β1 + β 2 wgt i + β 3 wgt i2 + β 4 mpg i + β 5 mpg i2 + β 6 wgt i mpg i + u i . (4)

k = 6; k − 1 = 5.

Marginal or partial effect of wgti

∂ pricei ∂ E (pricei wgt i , mpg i ) ∂ E(pricei • )


= = = β 2 + 2 β3 wgt i + β 6 mpg i .
∂ wgt i ∂ wgt i ∂ wgt i

• Marginal effect of wgti on pricei is a linear function of wgti and mpgi; it is not a
constant.

Marginal or partial effect of mpgi

∂ pricei ∂ E (pricei wgt i , mpg i ) ∂ E(pricei • )


= = = β 4 + 2 β5 mpg i + β6 wgt i .
∂ mpg i ∂ mpg i ∂ mpg i

• Marginal effect of mpgi on pricei is a linear function of mpgi and wgti; it is not
a constant.

Hypotheses of interest

1. The marginal effect of wgti on pricei is zero: i.e., wgti has no effect on pricei; or
car pricei is unrelated to car wgti.

2. The marginal effect of wgti on pricei is constant: i.e., it does not depend on wgti
and/or mpgi.

3. The marginal effect of mpgi on pricei is zero: i.e., mpgi has no effect on pricei; or
car pricei is unrelated to fuel efficiency as measured by mpgi.

4. The marginal effect of mpgi on pricei is constant: i.e., it does not depend on mpgi
and/or wgti.

File: examples.doc Page 13 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

1. The marginal effect of wgti on pricei is zero: i.e., wgti has no effect on pricei; or
car pricei is unrelated to car wgti.

∂ price i
• H0: β2 = 0 and β3 = 0 and β6 = 0 ⇒ = β 2 + 2 β 3 wgt i + β 6 mpg i = 0
∂ wgt i

Restricted model corresponding to H0: set β2 = 0 and β3 = 0 and β6 = 0 in PRE (4).


pricei = β1 + β 4 mpg i + β5 mpg i2 + u i .

k0 = 3; k0 − 1 = 2.

∂ pricei
• H1: β2 ≠ 0 and/or β3 ≠ 0 and/or β6 ≠ 0 ⇒ = β 2 + 2 β3 wgt i + β6 mpg i
∂ wgt i

Unrestricted model corresponding to H1: is PRE (4).

price i = β1 + β 2 wgt i + β 3 wgt i2 + β 4 mpg i + β 5 mpg i2 + β 6 wgt i mpg i + u i . (4)

k = 6; k − 1 = 5.

2. The marginal effect of wgti on pricei is constant: i.e., it does not depend on wgti
and/or mpgi.

∂ pricei
• H0: β3 = 0 and β6 = 0 ⇒ = β 2 + 2 β3 wgt i + β6 mpg i = β 2
∂ wgt i

Restricted model corresponding to H0: set β3 = 0 and β6 = 0 in PRE (4).


pricei = β1 + β 2 wgt i + β 4 mpg i + β5 mpg i2 + u i .

k0 = 4; k0 − 1 = 3.

∂ pricei
• H1: β3 ≠ 0 and/or β6 ≠ 0 ⇒ = β 2 + 2 β3 wgt i + β6 mpg i
∂ wgt i

Unrestricted model corresponding to H1: is PRE (4).


price i = β1 + β 2 wgt i + β 3 wgt i2 + β 4 mpg i + β 5 mpg i2 + β 6 wgt i mpg i + u i . (4)

k = 6; k − 1 = 5.

File: examples.doc Page 14 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

3. The marginal effect of mpgi on pricei is zero: i.e., mpgi has no effect on pricei; or
car pricei is unrelated to fuel efficiency as measured by mpgi.

∂ pricei
• H0: β4 = 0 and β5 = 0 and β6 = 0 ⇒ = β 4 + 2 β5 mpg i + β 6 wgt i = 0
∂ mpg i

Restricted model corresponding to H0: set β4 = 0 and β5 = 0 and β6 = 0 in PRE (4).


pricei = β1 + β 2 wgt i + β3 wgt i2 + u i .

k0 = 3; k0 − 1 = 2.

∂ pricei
• H1: β4 ≠ 0 and/or β5 ≠ 0 and/or β6 ≠ 0 ⇒ = β 4 + 2 β5 mpg i + β6 wgt i
∂ mpg i

Unrestricted model corresponding to H1: is PRE (4).

price i = β1 + β 2 wgt i + β 3 wgt i2 + β 4 mpg i + β 5 mpg i2 + β 6 wgt i mpg i + u i . (4)

k = 6; k − 1 = 5.

4. The marginal effect of mpgi on pricei is constant: i.e., it does not depend on mpgi
and/or wgti.

∂ pricei
• H0: β5 = 0 and β6 = 0 ⇒ = β 4 + 2 β5 mpg i + β6 wgt i = β 4
∂ mpg i

Restricted model corresponding to H0: set β5 = 0 and β6 = 0 in PRE (4).


pricei = β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + u i .

k0 = 4; k0 − 1 = 3.

∂ pricei
• H1: β5 ≠ 0 and/or β6 ≠ 0 ⇒ = β 4 + 2 β5 mpg i + β6 wgt i
∂ mpg i

Unrestricted model corresponding to H1: is PRE (4).

price i = β1 + β 2 wgt i + β 3 wgt i2 + β 4 mpg i + β 5 mpg i2 + β 6 wgt i mpg i + u i . (4)

k = 6; k − 1 = 5.

File: examples.doc Page 15 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

Model (4)

price i = β1 + β 2 wgt i + β 3 wgt i2 + β 4 mpg i + β 5 mpg i2 + β 6 wgt i mpg i + u i . (4)

The OLS SRE for Model (4)


. regress price wgt wgtsq mpg mpgsq wgtmpg

Source | SS df MS Number of obs = 74


---------+------------------------------ F( 5, 68) = 12.84
Model | 308384833 5 61676966.6 Prob > F = 0.0000
Residual | 326680563 68 4804125.93 R-squared = 0.4856
---------+------------------------------ Adj R-squared = 0.4478
Total | 635065396 73 8699525.97 Root MSE = 2191.8

------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
wgt | -31.88985 9.148215 -3.486 0.001 -50.14483 -13.63487
wgtsq | .0034574 .0008629 4.007 0.000 .0017355 .0051792
mpg | -3549.495 1126.464 -3.151 0.002 -5797.318 -1301.672
mpgsq | 38.74472 12.62339 3.069 0.003 13.55514 63.9343
wgtmpg | .5421927 .1971854 2.750 0.008 .1487154 .9356701
_cons | 92690.55 25520.53 3.632 0.001 41765.12 143616
------------------------------------------------------------------------------

. test wgt wgtsq wgtmpg F-test of hypothesis 1


( 1) wgt = 0.0
( 2) wgtsq = 0.0
( 3) wgtmpg = 0.0

F( 3, 68) = 6.42
Prob > F = 0.0007

. test wgtsq wgtmpg F-test of hypothesis 2


( 1) wgtsq = 0.0
( 2) wgtmpg = 0.0

F( 2, 68) = 8.80
Prob > F = 0.0004

. test mpg mpgsq wgtmpg F-test of hypothesis 3


( 1) mpg = 0.0
( 2) mpgsq = 0.0
( 3) wgtmpg = 0.0

F( 3, 68) = 4.03
Prob > F = 0.0106

. test mpgsq wgtmpg F-test of hypothesis 4


( 1) mpgsq = 0.0
( 2) wgtmpg = 0.0

F( 2, 68) = 4.75
Prob > F = 0.0117

File: examples.doc Page 16 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

Multiple Linear Regression Model (5)

The PRE is:


price i = β1 + β 2 wgt i + β 3 wgt i2 + β 4 mpg i + β 5 mpg i2 + β 6 wgt i mpg i + β 7 foreign i + u i
… (5)
k = 7; k − 1 = 6.

Marginal or partial effect of wgti

∂ pricei ∂ E (pricei wgt i , mpg i , foreigni ) ∂ E(pricei • )


= = = β 2 + 2 β3 wgt i + β6 mpg i
∂ wgt i ∂ wgt i ∂ wgt i

• Marginal effect of wgti on pricei is a linear function of wgti and mpgi; it is not a
constant.

Marginal or partial effect of mpgi

∂ pricei ∂ E(pricei wgt i , mpg i , foreign i ) ∂ E(pricei • )


= = = β 4 + 2 β5 mpg i + β6 wgt i
∂ mpg i ∂ mpg i ∂ mpg i

• Marginal effect of mpgi on pricei is a linear function of mpgi and wgti; it is not
a constant.

Hypotheses of interest

1. The marginal effect of wgti on pricei is zero: i.e., wgti has no effect on pricei; or
car pricei is unrelated to car wgti.

2. The marginal effect of wgti on pricei is constant: i.e., it does not depend on wgti
and/or mpgi.

3. The marginal effect of mpgi on pricei is zero: i.e., mpgi has no effect on pricei; or
car pricei is unrelated to fuel efficiency as measured by mpgi.

4. The marginal effect of mpgi on pricei is constant: i.e., it does not depend on mpgi
and/or wgti.

File: examples.doc Page 17 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

Interpretation of the slope coefficient β7 on the foreigni dummy variable regressor

price i = β1 + β 2 wgt i + β 3 wgt i2 + β 4 mpg i + β 5 mpg i2 + β 6 wgt i mpg i + β 7 foreign i + u i


… (5)

Compare the expressions implied by regression equation (5) for the conditional mean
prices of foreign and domestic cars that have the same weight and fuel efficiency.

• The conditional mean price of foreign cars is obtained from equation (5) by
setting foreigni = 1 and taking the conditional expectation of pricei:

E(pricei wgt i , mpg i , foreign i = 1)


= β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + β5 mpg i2 + β6 wgt i mpg i + β7

• The conditional mean price of domestic cars is obtained from equation (5) by
setting foreigni = 0 and taking the conditional expectation of pricei:

E(pricei wgt i , mpg i , foreigni = 0)


= β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + β5 mpg i2 + β6 wgt i mpg i

• Take the difference between the conditional mean price of foreign cars and the
conditional mean price of "similar" domestic cars, where "similar" means foreign
and domestic cars with the same values of wgti and mpgi.

E (pricei wgt i , mpg i , foreigni = 1) − E (pricei wgt i , mpg i , foreigni = 0)


= β1 + β 2 wgt i + β3 wgt i2 + β 4 mpg i + β5 mpg i2 + β 6 wgt i mpg i + β7
− β1 − β 2 wgt i − β3 wgt i2 − β 4 mpg i − β5 mpg i2 − β6 wgt i mpg i
= β7

File: examples.doc Page 18 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

Result: The coefficient β7 on the foreigni dummy variable in equation (5) is

β7 = E(pricei wgt i , mpg i , foreigni = 1) − E(pricei wgt i , mpg i , foreigni = 0)


= the mean price of foreign cars with given values of wgti and mpgi
minus
the mean price of domestic cars with the same values of wgti and mpgi
= the adjusted mean price difference between foreign and domestic cars
of the same weight and fuel efficiency, that have the same values of wgti
and mpgi

• Compare β7 in equation (5) with β2 in the following simple regression equation:


pricei = β1 + β 2 foreign i + u i

β2 = E (pricei foreigni = 1) − E (pricei foreigni = 0)


= the mean price of all foreign cars
minus
the mean price of all domestic cars
= the unadjusted mean price difference between all foreign and all
domestic cars regardless of their weight and fuel efficiency

Hypothesis of interest

5. There is no difference between the mean price of foreign and domestic cars
that have the same weight and fuel efficiency.

• H0: β7 = 0 ⇒
E(pricei wgt i , mpg i , foreigni = 1) − E(pricei wgt i , mpg i , foreigni = 0) = 0

• H1: β7 ≠ 0 ⇒
E(pricei wgt i , mpg i , foreigni = 1) − E(pricei wgt i , mpg i , foreigni = 0) ≠ 0

Model (5)
price i = β1 + β 2 wgt i + β 3 wgt i2 + β 4 mpg i + β 5 mpg i2 + β 6 wgt i mpg i + β 7 foreign i + u i .

File: examples.doc Page 19 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

The OLS SRE for Model (5)


. regress price wgt wgtsq mpg mpgsq wgtmpg foreign

Source | SS df MS Number of obs = 74


---------+------------------------------ F( 6, 67) = 14.48
Model | 358503838 6 59750639.7 Prob > F = 0.0000
Residual | 276561558 67 4127784.45 R-squared = 0.5645
---------+------------------------------ Adj R-squared = 0.5255
Total | 635065396 73 8699525.97 Root MSE = 2031.7

------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
wgt | -15.3063 9.724082 -1.574 0.120 -34.71565 4.103051
wgtsq | .0020985 .0008898 2.358 0.021 .0003224 .0038747
mpg | -1407.999 1211.602 -1.162 0.249 -3826.366 1010.368
mpgsq | 14.23503 13.65253 1.043 0.301 -13.01554 41.4856
wgtmpg | .2373812 .2026331 1.171 0.246 -.1670761 .6418385
foreign | 2749.963 789.1946 3.485 0.001 1174.724 4325.202
_cons | 39826.01 28102.9 1.417 0.161 -16267.6 95919.63
------------------------------------------------------------------------------

. test wgt wgtsq wgtmpg F-test of hypothesis 1


( 1) wgt = 0.0
( 2) wgtsq = 0.0
( 3) wgtmpg = 0.0

F( 3, 67) = 8.46
Prob > F = 0.0001

. test wgtsq wgtmpg F-test of hypothesis 2


( 1) wgtsq = 0.0
( 2) wgtmpg = 0.0

F( 2, 67) = 4.55
Prob > F = 0.0140

. test mpg mpgsq wgtmpg F-test of hypothesis 3


( 1) mpg = 0.0
( 2) mpgsq = 0.0
( 3) wgtmpg = 0.0

F( 3, 67) = 0.56
Prob > F = 0.6419

. test mpgsq wgtmpg F-test of hypothesis 4


( 1) mpgsq = 0.0
( 2) wgtmpg = 0.0

F( 2, 67) = 0.69
Prob > F = 0.5068

File: examples.doc Page 20 of 21


ECON 351*: Examples of Multiple Regression Models M.G. Abbott

The OLS SRE for Model (5)


. regress price wgt wgtsq mpg mpgsq wgtmpg foreign

Source | SS df MS Number of obs = 74


---------+------------------------------ F( 6, 67) = 14.48
Model | 358503838 6 59750639.7 Prob > F = 0.0000
Residual | 276561558 67 4127784.45 R-squared = 0.5645
---------+------------------------------ Adj R-squared = 0.5255
Total | 635065396 73 8699525.97 Root MSE = 2031.7

------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
wgt | -15.3063 9.724082 -1.574 0.120 -34.71565 4.103051
wgtsq | .0020985 .0008898 2.358 0.021 .0003224 .0038747
mpg | -1407.999 1211.602 -1.162 0.249 -3826.366 1010.368
mpgsq | 14.23503 13.65253 1.043 0.301 -13.01554 41.4856
wgtmpg | .2373812 .2026331 1.171 0.246 -.1670761 .6418385
foreign | 2749.963 789.1946 3.485 0.001 1174.724 4325.202
_cons | 39826.01 28102.9 1.417 0.161 -16267.6 95919.63
------------------------------------------------------------------------------

. test foreign = 0 F-test of hypothesis 5


( 1) foreign = 0.0

F( 1, 67) = 12.14
Prob > F = 0.0009

. test foreign F-test of hypothesis 5 (again)


( 1) foreign = 0.0

F( 1, 67) = 12.14
Prob > F = 0.0009

. lincom foreign t-test of hypothesis 5


( 1) foreign = 0.0

------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
(1) | 2749.963 789.1946 3.485 0.001 1174.724 4325.202
------------------------------------------------------------------------------

File: examples.doc Page 21 of 21

You might also like