Вы находитесь на странице: 1из 12

Application 4.

1:

Data on U.S. gasoline consumption for the years 1953 to 2004 are given in Table F2.2. Note,
the consumption data appear as total expenditure. To obtain the per capita quantity
variable, divide GASEXP by GASP times Pop. The other variables do not need transformation.

a. Compute the multiple regression of per capita consumption of gasoline on per capita
income, the price of gasoline, all the other prices and a time trend. Report all results. Do the
signs of the estimates agree with your expectations?

b. Test the hypothesis that at least in regard to demand for gasoline; consumers do not
differentiate between changes in the prices of new and used cars.

c. Estimate the own price elasticity of demand, the income elasticity, and the cross price
elasticity with respect to changes in the price of public transportation. Do the computations
at the 2004 point in the data.

d. Re-estimate the regression in logarithms so that the coefficients are direct estimates of
the elasticities. (Do not use the log of the time trend.) How do your estimates compare with
the results in the previous question? Which specification do you prefer?

e. Compute the simple correlations of the price variables. Would you conclude that
multicollinearity is a “problem” for the regression in part a or part d?

f. Notice that the price index for gasoline is normalized to100 in 2000, whereas the other
price indices are anchored at 1983 (roughly). If you were to renormalize the indices so that
they were all 100.00 in2004, then how would the results of the regression in part a change?
How would the results of the regression in part d change?

g. This exercise is based on the model that you estimated in part d. We are interested in
investigating the change in the gasoline market that occurred in 1973. First, compute the
average values of log of per capita gasoline consumption in the years 1953–1973 and 1974–
2004 and report the values and the difference. If we divide the sample into these two
groups of observations, then we can decompose the change in the expected value of the log
of consumption into a change attributable to change in the regressors and a change
attributable to a change in the model coefficients, as shown in Section 4.7.3. Using the
Oaxaca–Blinder approach described there, compute the decomposition by partitioning the
sample and computing separate regressions. Using your results, compute a confidence
interval for the part of the change that can be attributed to structural change in the market,
that is, change in the regression coefficients.
Solution:

(a)

Stata Operation:

. use "D:\Lap 1\F2-2.dta", clear

. gen gpc=1000000*gasexp/(gasp*pop)

. gen t =year-1952

. label variable gpc "gasoline per capita"

. label variable t "time trend"

. sum

Variable Obs Mean Std. Dev. Min Max

year 52 1978.5 15.15476 1953 2004


gasexp 52 70.10192 57.51466 7.4 224.5
pop 52 225373.8 38077.42 159565 293951
gasp 52 51.34296 30.82741 16.668 123.901
income 52 16805.06 5552.026 8685 27113

pnc 52 87.56731 37.08741 44.8 141.7


puc 52 77.8 51.06819 20.7 158.7
ppt 52 89.39038 69.19015 16.8 210.6
pd 52 78.26923 36.78272 36.1 129.4
pn 52 83.59808 48.66465 29.5 172.2

ps 52 89.77692 66.91132 19.4 222.8


gpc 52 4.935619 1.059105 2.782343 6.31254
t 52 26.5 15.15476 1 52

. reg gpc income gasp pnc puc ppt pd pn ps t

Source SS df MS Number of obs = 52


F( 9, 42) = 530.82
Model 56.7083042 9 6.30092268 Prob > F = 0.0000
Residual .49854905 42 .011870215 R-squared = 0.9913
Adj R-squared = 0.9894
Total 57.2068532 51 1.121703 Root MSE = .10895

gpc Coef. Std. Err. t P>|t| [95% Conf. Interval]

income .0002157 .0000518 4.17 0.000 .0001113 .0003202


gasp -.0110838 .0039781 -2.79 0.008 -.019112 -.0030557
pnc .0005774 .0128441 0.04 0.964 -.0253432 .0264979
puc -.0058746 .0048703 -1.21 0.234 -.0157033 .0039541
ppt .0069073 .0048361 1.43 0.161 -.0028524 .016667
pd .0012289 .0118818 0.10 0.918 -.0227495 .0252072
pn .0126905 .012598 1.01 0.320 -.0127333 .0381142
ps -.0280278 .0079962 -3.51 0.001 -.0441649 -.0118907
t .0725037 .0141828 5.11 0.000 .0438816 .1011257
_cons 1.105878 .5693784 1.94 0.059 -.0431744 2.25493
Remarks:

The regression result reveals that the per capita gasoline consumption is positively related
with income, pnc, ppt, pd, pn and negatively related with gasp, puc and ps. The demand for
gasoline per capita also increases over time. Therefore, most of the signs of the coefficients
of explanatory variables agree with our expectations.

As principle of economics gasoline consumption increases when income increases and


decreases when the price of gasoline (gasp) increases. The gasoline consumption also
increases with the increase in the price index for public transport, ppt (substitutability for
private cars), increase in the price index for durables and non-durables, but decreases with
the increase in price index for consumer services.

The sign of coefficient of pnc (price index for new cars) is supposed to be negative. It is so
happened that as the price index of used cars, puc, increases people may prefer to buy more
new cars and thereby increasing the demand for gasoline.

(b) To test the hypothesis that at least in regard to demand for gasoline, consumers do not
differentiate between the changes in the price of new and used cars, we set

H0: Coefficient of pnc= Coefficient of puc

H1: Coefficient of pnc ≠ Coefficient of puc

Therefore the following test was run-

. test pnc=puc

( 1) pnc - puc = 0

F( 1, 42) = 0.24
Prob > F = 0.6233

The estimated value of F and P-value indicates that there is no significant evidence to reject
the null hypothesis.
(c)
. mfx, at ( 27113 123.901 133.9 133.3 209.1 114.8 172.2 222.8 52) eyex

Elasticities after regress


y = Fitted values (predict)
= 6.1726972

variable ey/ex Std. Err. z P>|z| [ 95% C.I. ] X

income .9476598 .2263 4.19 0.000 .504127 1.39119 27113


gasp -.2224796 .08093 -2.75 0.006 -.381102 -.063857 123.901
pnc .0125245 .2786 0.04 0.964 -.533521 .55857 133.9
puc -.1268632 .10488 -1.21 0.226 -.332432 .078706 133.3
ppt .2339837 .16441 1.42 0.155 -.08826 .556228 209.1
pd .0228545 .22098 0.10 0.918 -.410256 .455965 114.8
pn .3540265 .35281 1.00 0.316 -.337474 1.04553 172.2
ps -1.011648 .29332 -3.45 0.001 -1.58654 -.436759 222.8
t .6107851 .12038 5.07 0.000 .374843 .846727 52

. quietly scalar bincome=_b[income]

. quietly scalar bgasp=_b[ gasp]

. quietly scalar bppt=_b[ ppt]

. quietly scalar gpc2004=gpc[52]

. quietly scalar income2004=income[52]

. quietly scalar gasp2004=gasp[52]

. quietly scalar ppt2004=ppt[52]

. scalar ep=bgasp*(gasp2004/gpc2004)

. scalar ei=bincome*(income2004/gpc2004)

. scalar ce=bppt*(ppt2004/gpc2004)

. scalar list ep ei ce
ep = -.22279148
ei = .9489883
ce = .23431171
(d)
. gen Lgpc=log( gpc)

. gen Lincome=log( income)

. gen Lgasp=log( gasp)

. gen Lpnc=log( pnc)

. gen Lpuc=log( puc)

. gen Lppt=log( ppt)

. gen Lpd=log( pd)

. gen Lpn=log( pn)

. gen Lps=log( ps)

. reg Lgpc Lincome Lgasp Lpnc Lpuc Lppt Lpd Lpn Lps t

Source SS df MS Number of obs = 52


F( 9, 42) = 351.33
Model 2.87044868 9 .318938742 Prob > F = 0.0000
Residual .038128217 42 .000907815 R-squared = 0.9869
Adj R-squared = 0.9841
Total 2.9085769 51 .05703092 Root MSE = .03013

Lgpc Coef. Std. Err. t P>|t| [95% Conf. Interval]

Lincome .9929907 .2503763 3.97 0.000 .4877109 1.49827


Lgasp .0605177 .0540101 1.12 0.269 -.0484792 .1695146
Lpnc -.1547138 .2669637 -0.58 0.565 -.6934683 .3840408
Lpuc -.4890899 .0851996 -5.74 0.000 -.6610297 -.31715
Lppt .0192726 .136449 0.14 0.888 -.2560926 .2946378
Lpd 1.732055 .2598871 6.66 0.000 1.207582 2.256529
Lpn -.7295301 .2650689 -2.75 0.009 -1.264461 -.1945995
Lps -.8679929 .3529119 -2.46 0.018 -1.580198 -.1557878
t .0379721 .0075137 5.05 0.000 .0228088 .0531354
_cons -7.287192 2.520568 -2.89 0.006 -12.37391 -2.200479

The above estimates differ from the regression results previously estimates without
logarithm. The TSS as well as ESS and RSS greatly differs [ much smaller] from the regression
of without regression. The R squared and Adjusted R squared are almost same for both the
models. However, the coefficients of the logarithm model capture most of the expected
signs than the regression model of without logarithm. Therefore, logarithm model would be
more preferable.
(e)

. cor gasp pnc puc ppt pd pn ps


(obs=52)

gasp pnc puc ppt pd pn ps

gasp 1.0000
pnc 0.9361 1.0000
puc 0.9228 0.9939 1.0000
ppt 0.9270 0.9807 0.9824 1.0000
pd 0.9389 0.9933 0.9878 0.9585 1.0000
pn 0.9627 0.9885 0.9822 0.9899 0.9773 1.0000
ps 0.9394 0.9785 0.9769 0.9975 0.9563 0.9936 1.0000

. cor Lgasp Lpnc Lpuc Lppt Lpd Lpn Lps


(obs=52)

Lgasp Lpnc Lpuc Lppt Lpd Lpn Lps

Lgasp 1.0000
Lpnc 0.9667 1.0000
Lpuc 0.9674 0.9940 1.0000
Lppt 0.9665 0.9891 0.9910 1.0000
Lpd 0.9776 0.9932 0.9945 0.9864 1.0000
Lpn 0.9839 0.9900 0.9902 0.9942 0.9923 1.0000
Lps 0.9742 0.9902 0.9912 0.9985 0.9886 0.9979 1.0000

Therefore, the simple correlation of the price variables show that there is indeed a
multicollinearity problem in both the regressions specified in part (a) and (d).

(f) In the linear case, if we normalize to 100, the results will be the same because the
coefficient will be divided by the same scale factor, so that x*b would be unchanged, where x
is a variable and b is the coefficient. In the log linear case, since log(k*x)=log(k)+log(x), the
renormalization would simply affect the constant term. The price coefficients would be
unchanged.

(g)

. mean Lgpc if year<1974

Mean estimation Number of obs = 21

Mean Std. Err. [95% Conf. Interval]

Lgpc 1.334769 .04365 1.243717 1.425822

. scalar ybar0=r(b)

. mean Lgpc if year>1973

Mean estimation Number of obs = 31

Mean Std. Err. [95% Conf. Interval]

Lgpc 1.730146 .012755 1.704097 1.756195

. scalar ybar1=r(b)

. gen cons=1
. mean Lincome Lgasp Lpnc Lpuc Lppt Lpd Lpn Lps t cons if year<1974

Mean estimation Number of obs = 21

Mean Std. Err. [95% Conf. Interval]

Lincome 9.307999 .0382598 9.22819 9.387807


Lgasp 2.973497 .0218159 2.92799 3.019005
Lpnc 3.919241 .0123054 3.893572 3.944909
Lpuc 3.319498 .0322032 3.252324 3.386673
Lppt 3.220735 .0564034 3.10308 3.338391
Lpd 3.682407 .0184103 3.644004 3.72081
Lpn 3.539391 .0300972 3.476609 3.602173
Lps 3.276916 .0479733 3.176846 3.376987
t 11 1.354006 8.175592 13.82441
cons 1 0 . .

. matrix x0=e(b)

. mean Lincome Lgasp Lpnc Lpuc Lppt Lpd Lpn Lps t cons if year>1973

Mean estimation Number of obs = 31

Mean Std. Err. [95% Conf. Interval]

Lincome 9.918829 .031305 9.854896 9.982762


Lgasp 4.2413 .0585685 4.121687 4.360913
Lpnc 4.692742 .0483805 4.593936 4.791548
Lpuc 4.637867 .0770827 4.480443 4.795291
Lppt 4.765984 .0959479 4.570032 4.961936
Lpd 4.616158 .0479135 4.518305 4.71401
Lpn 4.709391 .0602159 4.586413 4.832368
Lps 4.783979 .0866703 4.606975 4.960984
t 37 1.632993 33.66498 40.33502
cons 1 0 . .

. matrix x1=e(b)

. reg Lgpc Lincome Lgasp Lpnc Lpuc Lppt Lpd Lpn Lps t if year<1974

Source SS df MS Number of obs = 21


F( 9, 11) = 584.71
Model .798567151 9 .088729683 Prob > F = 0.0000
Residual .001669259 11 .000151751 R-squared = 0.9979
Adj R-squared = 0.9962
Total .800236411 20 .040011821 Root MSE = .01232

Lgpc Coef. Std. Err. t P>|t| [95% Conf. Interval]

Lincome .6648792 .2234255 2.98 0.013 .1731229 1.156636


Lgasp -.202044 .4191071 -0.48 0.639 -1.124492 .7204044
Lpnc .5912882 .3024403 1.96 0.076 -.0743785 1.256955
Lpuc -.294078 .1420679 -2.07 0.063 -.6067674 .0186114
Lppt -.3584459 .3104284 -1.15 0.273 -1.041694 .3248024
Lpd -.1022751 1.072572 -0.10 0.926 -2.462991 2.258441
Lpn -.0383662 .5780072 -0.07 0.948 -1.310551 1.233819
Lps .7541618 .7414295 1.02 0.331 -.8777136 2.386037
t .0090829 .0184495 0.49 0.632 -.0315243 .0496901
_cons -6.498724 1.860316 -3.49 0.005 -10.59325 -2.404197

. matrix b0=e(b)

. matrix var0=e(v)
. r eg Lgpc Lincome Lgasp L pnc Lpuc Lppt Lpd Lpn Lp s t if year>1973

Source SS df MS Number of obs = 31


F( 9, 21) = 1 04 . 3 8
Model .147993657 9 .01644374 Prob > F = 0 .0 0 0 0
Residual .00330819 21 .000157533 R-squared = 0 .9 7 8 1
Adj R-squared = 0 .9 6 8 8
Total .151301846 30 .005043395 Root MSE = . 01 2 5 5

Lgpc Coef. St d . E r r . t P > |t | [ 9 5 % C o n f . In t e rv a l ]

Lincome .5181589 .1 4 9 8 4 2 7 3.46 0 . 00 2 .2065439 . 8 2 97 7 3 9


Lgasp -.0770111 .0 5 0 1 6 6 2 -1.54 0 . 14 0 -.1813374 . 0 2 73 1 5 2
Lpnc .6158313 .2 6 8 7 5 8 3 2.29 0 . 03 2 .0569178 1 . 1 74 7 4 5
Lpuc .2402007 .0 9 3 8 6 1 7 2.56 0 . 01 8 .0450045 . 4 3 53 9 6 9
Lppt -.1616701 .0 7 4 8 2 1 1 -2.16 0 . 04 2 -.3172691 -. 0 0 60 7 1 1
Lpd -.6564543 .3 1 7 5 2 6 1 -2.07 0 . 05 1 -1.316786 . 0 0 38 7 7 5
Lpn .2370631 .2 6 0 3 4 7 6 0.91 0 . 37 3 -.3043593 . 7 7 84 8 5 5
Lps -.2148074 .1 8 1 4 8 2 9 -1.18 0 . 25 0 -.5922217 . 1 6 26 0 6 9
t .0007693 .0 0 5 2 1 8 2 0.15 0 . 88 4 -.0100827 . 0 1 16 2 1 2
_cons -3.40315 1. 4 4 9 3 8 6 -2.35 0 . 02 9 -6.417314 -. 3 8 89 8 6 8

. m atrix b1=e(b)

. m atrix var1=e(v)

. m atrix dy_dx=b1*x1'-b1*x 0'

. m atrix dy_db=b1*x0'-b0*x 0'

. m atrix vtotal=var0+var1

. m atrix vdb=x0*vtotal*x0'

. s calar dy_dxs=dy_dx[1,1]

. s calar dy_dbs=dy_db[1,1]

. s calar vdbs=vdb[1,1]

. d i s p l a y " d y b a r = " y b a r 1 - y b a r0
dy b a r = .

. d isplay "dy_dx=" dy_dxs


dy _ d x = . 1 2 2 7 4 2 7 9

. d isplay "dy_db=" dy_dbs


dy _ d b = . 2 7 2 6 3 3 7 3

. d i s p l a y " t h e l o w e r l i m i t i s" d y _ d b s - 1 . 9 6 * s q r t ( v d bs ) " a n d t h e u p p e r li m i t i s " d y _ d b s + 1 . 9 6 * s q r t ( vd b s )


th e l o w e r l i m i t i s u n k n o w n f u nc t i o n ( )
r( 1 3 3 ) ;

. . d i s p l a y " t h e l o w e r l i m i t i s " d y _ d b s - 1 . 9 6 * s q r t ( vd b s ) " a n d t h e u p p er l im i t i s " d y _ d b s + 1 . 9 6 * s q rt ( v db s )

the lower limit is 0.18484676 and the upper limit is 0.3604207

The values are therefore:


DYBAR= 0.395377

DY_DX=0.12274279

DY_DB= 0.27263373

LOWER= 0.18484676

UPPER= 0.3604207
Application 5.3:

The gasoline consumption model suggested in part d of Application1 in Chapter 4 may be


written as –

ln(G/Pop) = α+βP ln Pg +βI ln(Income/Pop)+ γnc ln Pnc + γuc ln Puc+ γpt ln Ppt + τyear+ δd ln Pd

+δn ln Pn +δs ln Ps +ε.

a. Carry out a test of the hypothesis that the three aggregate price indices are not significant
determinants of the demand for gasoline.

b. Consider the hypothesis that the microelasticities are a constant proportion of the
elasticity with respect to their corresponding aggregate. Thus, for some positive θ
(presumably between 0 and 1), γnc = θδd,γuc = θδd,γpt = θδs. The first two imply the simple
linear restriction γnc = γuc. By taking ratios, the first (or second) and third imply the nonlinear
restriction γnc /γpt = δd /δs or γncδs −γptδd =0.

Describe in detail how you would test the validity of the restriction.

c. Using the gasoline market data in TableF2.2, test the two restrictions suggested here,
separately and jointly.

Solution:

(a)

. reg Lgpc Lgasp Linco me Lpn c Lpu c Lppt t Lp d Lpn Lps

S ource SS df MS N umber of ob s = 52
F ( 9, 42 ) = 35 1.33
Model 2. 87044 868 9 .31893 8742 P rob > F = 0. 0000
R es i d u a l .0 38128 217 42 .00090 7815 R -squar ed = 0. 9869
A dj R-s quare d = 0. 9841
Total 2 .9085 769 51 .0570 3092 R oot MS E = .0 3013

Lgpc Coe f. S td. E rr. t P>| t| [95% Conf . Inter val]

Lgasp . 06051 77 . 05401 01 1.12 0.2 69 -.048 4792 .169 5146


Li n c o m e . 99299 07 . 25037 63 3.97 0.0 00 .487 7109 1.4 9827
Lpnc -. 15471 38 . 26696 37 -0.58 0.5 65 -.693 4683 .384 0408
Lpuc -. 48908 99 . 08519 96 -5.74 0.0 00 -.661 0297 -.3 1715
Lppt . 01927 26 .1364 49 0.14 0.8 88 -.256 0926 .294 6378
t . 03797 21 . 00751 37 5.05 0.0 00 .022 8088 .053 1354
Lpd 1 .7320 55 . 25988 71 6.66 0.0 00 1.20 7582 2.25 6529
Lpn -. 72953 01 . 26506 89 -2.75 0.0 09 -1.26 4461 -.194 5995
Lps -. 86799 29 . 35291 19 -2.46 0.0 18 -1.58 0198 -.155 7878
_cons -6 .5277 51 2 .6232 82 -2.49 0.0 17 -11.8 2175 -1.23 3755

. tes t Lpd Lpn Lp s

( 1) Lpd = 0
( 2) Lpn = 0
( 3) Lps = 0

F( 3, 4 2) = 23.2 5
Prob > F = 0.0 000

*F=34.868735
The critical value from the F table for (3,42) df is 2.827. So, there is sufficient evidence to
reject the hypothesis. It can therefore be said that the three aggregate price indices for
durables, non-durables and consumer services are also significant determinants for the
demand for gasoline.

(b) The restricted model is quite non-liners. It would, therefore, be tedious to estimate and
examine the loss of fit. So, we can test the restriction using the unrestricted model. Let,

I= [γnc - γuc, γncδs –γpfδd]’

The entire parameter vector:

δf1 δ∞
G=[ ]
δf2 δ∞

0 0 0 1 -1 0 0 0 0 0
=[ ]
0 0 0 δs 0 δd 0 -γpt 0 γnc

The parameter estimates are thus, f= [-0.17399, 0.10091]. The covariance matrix to use for
the tests is Gs2(X’X)-1G’. The statistics for the joint test is as follows:

X2 = f[Gs2(X’X)-1G’]-1f= 0.4772

This is less than the critical value for a chi-squared with 2 df. So, we would not reject the
joint hypothesis. For the individual hypothesis, we need only compute the equivalent of a t
ratio for each element of f. Thus,

Z1= -0.6053 and z2= 0.2898

Neither the hypothesis would be rejected. Given the earlier result, it is to be expected.
(c)
. reg Lgpc Lgasp Lincome Lpnc Lpuc Lppt t Lpd Lpn Lps

Source SS df MS Number of obs = 52


F( 9, 42) = 351.33
Model 2.87044868 9 .318938742 Prob > F = 0.0000
Residual .038128217 42 .000907815 R-squared = 0.9869
Adj R-squared = 0.9841
Total 2.9085769 51 .05703092 Root MSE = .03013

Lgpc Coef. Std. Err. t P>|t| [95% Conf. Interval]

Lgasp .0605177 .0540101 1.12 0.269 -.0484792 .1695146


Lincome .9929907 .2503763 3.97 0.000 .4877109 1.49827
Lpnc -.1547138 .2669637 -0.58 0.565 -.6934683 .3840408
Lpuc -.4890899 .0851996 -5.74 0.000 -.6610297 -.31715
Lppt .0192726 .136449 0.14 0.888 -.2560926 .2946378
t .0379721 .0075137 5.05 0.000 .0228088 .0531354
Lpd 1.732055 .2598871 6.66 0.000 1.207582 2.256529
Lpn -.7295301 .2650689 -2.75 0.009 -1.264461 -.1945995
Lps -.8679929 .3529119 -2.46 0.018 -1.580198 -.1557878
_cons -6.527751 2.623282 -2.49 0.017 -11.82175 -1.233755

(i) Test restriction (1) Separately


(1) lpnc - lpuc = 0

------------------------------------------------------------------------------
Lgpc | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | .3343761 .2874485 1.16 0.251 -.2457184 .9144706
------------------------------------------------------------------------------

. test Lpnc = Lpuc

(1) Lpnc - Lpuc = 0

F (1, 42) = 1.35


Prob > F = 0.2513

(ii) Testing restriction (2) separately


. *test the restriction(2) separately, you can use either of the following two
commands
. nLcom_b[Lpnc]*_b[Lps]-_b[Lppt]*_b[Lpd]

_nl_1: _b[Lpnc]*_b[Lps]- _b[Lppt]*_b[Lpd]

------------------------------------------------------------------------------
Lgpc | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_nl_1| .1009092 .3482736 0.29 0.773 -.6019353 .8037538
------------------------------------------------------------------------------

. testnl _b[Lpnc]*_b[Lps]= _b[Lppt]*_b[Lpd]

(1) _b[Lpnc]*_b[Lps]= _b[Lppt]*_b[Lpd]

F(1, 42) = 0.08


Prob > F = 0.7734
. *test the restriction jointly
. testnl (_b[Lpnc]=_b[Lpuc]) (_b[Lpnc]*_b[Lps]= _b[Lppt]*_b[Lpd])

(1) _b[Lpnc] = _b[ Lpuc]


(2) _b[Lpnc]*_b[Lps]=_b[Lppt]*_b[Lpd]

F(2, 42) = 2.81


Prob > F= 0.0714

Вам также может понравиться