# UCLA Econometrics Problem Set Worksheet

Description

1 attachmentsSlide 1 of 1attachment_1attachment_1.slider-slide > img { width: 100%; display: block; }
.slider-slide > img:focus { margin: auto; }

Unformatted Attachment Preview

Problem Set 6, Econ 120C
Professor Yixiao Sun
In this exercise we will work with a linear demand and supply model and explore the properties
of OLS estimators and IV estimators. The two equations will be
Qdi = 50
Qsi
2(Pi + Ti + Ci ) + Ui
= 5 + Pi + V i
(1)
(2)
where Ui is independent of Vi : To help you understand the equation system, you can think of
the rst equation as the demand curve where Qdi is the demand and Pi + Ti + Ci is the total
price paid by consumers, where Pi is the sticker price, Ti is the general sales tax, and Ci is the
product-specic tax (i.e., cigarettes exercise tax). You can think of the second equation as the
supply curve where Qsi is the supply and Pi is the sticker price. (You may want to ponder upon
the question: why does it make sense to model the demand in terms of the total price while
modeling the supply in term of the sticker price).
1. Solve these two equations to obtain the market price and sales (i.e., let Qdi = Qsi = Qi and
then solve for Qi and Pi in terms of other variables). A student nds the solution to be
Qi = 20
Pi = 15
2
(Ti + Ci ) +
3
2
(Ti + Ci ) +
3
1
(Ui + 2Vi ) ;
3
1
(Ui Vi ) :
3
(3)
(4)
Do you agree with the above solution?
2. Generate market observations from the above two equations using the following codes:
clear
set obs 1000
set seed 1732
gen T = uniform()*2+1
gen U = 2*uniform() -1
gen V = 2*uniform() -1
gen C = U + uniform() + 1
gen Q = 20-2/3*(T+C)+1/3*(U+2*V)
c 2021 by Yixiao Sun. This document may be reproduced and distributed for non-prot educational purposes
only.
1
gen P = 15-2/3*(T+C)+1/3*(U-V)
gen TP = P+T+C
Our observations are Qi ; Pi ; T Pi (total price); Ti and Ci : We do not observe Ui and Vi :
3. Calculate cov(T P; U ) and cov (P; V ) theoretically.
4. Now calculate the sample covariances cov(T
c Pi ; Ui ) and cov
c (Pi ; Vi ) using the sample you
just generated (Note that this is not feasible in practice as Ui and Vi are not observed.
However, for this part and the next two parts of the question we assume that Ui and Vi are
available to us).
5. Compare cov(T P; U ) with cov(T
c Pi ; Ui ): Are they close to each other? Are they both positive?
6. Compare cov (P; V ) and cov
c (Pi ; Vi ). Are they close to each other? Are they both negative?
7. Graph the scatterplot of Qi against T Pi with the true demand line (Q = 50 2 T P ) and
tted OLS line superimposed on the scatterplot. Which line has a higher slope coe¢ cient?
Is this expected? Explain.
8. Graph the scatterplot of Qi against Pi with the true supply line (Q = 5 + P ) and tted
OLS line superimposed on the scatterplot. Which line has a higher slope coe¢ cient? Is
this expected? Explain.
9. Estimate equation (1) by OLS [reg Q TP,r]. Is the estimated parameter for T P signicantly di¤erent from 2? [Stata command: test TP = -2]. (If yes, then we make a wrong
statistical decision.)
10. Estimate equation (2) by OLS [reg Q P,r]. Is the estimated parameter for P signicantly
di¤erent from 1? [Stata command: test P = 1]. (If yes, then we make a wrong statistical
decision.)
11. Now we will see whether the IV method does a better job of estimating the structural
parameters. Type ivregress 2sls Q (TP=T),rto estimate the demand equation by IV.
Is the estimated parameter for T P signicantly di¤erent from its true value -2? Explain.
12. Now we try a di¤erent IV regression by using ivregress 2sls Q (TP=C),rto estimate
the demand equation by IV. Is the estimated parameter for T P signicantly di¤erent from
its true value -2? Explain.
13. Suppose we want to estimate the supply curve. Is C a valid IV? That is, will the IV
regression ivregress 2sls Q (P=C),r gives us a reliable estimator of the true slope of
the supply curve. Explain.
14. Suppose we want to estimate the supply curve. Is T a valid IV? That is, will the IV
regression ivregress 2sls Q (P=T),r gives us a reliable estimator of the true slope of
the supply curve. Explain.
2