Econometria
Econ 508 - Fall 2007 e-Tutorial 11: Simultaneous Equations Models |
|
Welcome to the eleventh issue of e-Tutorial. In this issue we introduce simultaneous dynamic equations and exogeneity (Hausman) tests. I would like to remark that the theoretical background given in class is essential to proceed with the computational exercise below. Thus, I recommend you to consultProf. Koenker's Lectures Notes as you go through the tutorial. The first thing you need is to download the data sets in ASCII format by clicking in the respecitive names: system1.dat and system2.dat. Save them in your preferred location (I'll save mine as "C:/system1.dat" and "C:/system2.dat"). Then I suggest you to open the files in Notepad (or another text editor) and type the name of thevariable "year" in the first row, first column, i.e. before the variable "w". Use <Tab> to separate the names of variables. Save both files in text format in your favorite directory (I will save mine as "C:/system1a.txt" and "C:/system2a.txt", respectively). Part 1: For the first part of the problem set, go to STATA and type:
infile year z w p Q using "C:/system1a.txt" Next you need todeclare your data as time series:
gen quarter=q(1947q1)+_n-1
tsset quarter To obtain a flavor of the data, use the command summarize, detail. To work with time series functions, use previous tutorials. (Supply) Qt= a1 + a2pt-1+ a3zt + ut
(Demand) ps= b1 + b2Qt + b3wt + vtQuestion 1: Here you just need to run the system above, using OLS:
*Supply equation:
regress Q L.p z
*Demand equation:regress p Q w For the graph, first consider the equations in the steady state. Then use the last observations values z and w. Finally plot those two equations in a single cartesian graph. In Matlab, you can do that using the following routine (substitute "yournumber" by the values from the equation system you have run): Q=0:.1:20;
p_supply=yournumber+yournumber*Q;p_demand=yournumber+yournumber*Q;
plot(Q, p_supply, Q, p_demand, ':')
legend('supply','demand')
xlabel('Quantity')
ylabel('Price')
title('Dynamic Relationship Between Demand and Supply')
If you don't have access to Matlab, use any other graphical device or simply draw it by hand. Find the equilibrium price and quantity. Compare with your graph. Check if there's convergence in the graph (see Prof. Koenker classnotes). Question 2: Here I suggest you to construct a table as follows: n peridos ahead | Q | p | z | w |
0 | 2.4168 | 6.7186 | 2.5089 | .112727 |
1 | | | 2.5089 | .112727 |
2 | | | 2.5089 | .112727 |
(...) | (...) | (...) | (...) | (...) |
20 | | | 2.5089 | .112727 |
The values at n=0 come from the last observation in the data set. After that, z and w stay fixed. To findp(n=1), you need first to calculate the forecast of Q(n=1). Use the system of equations you have estimated in question 1. Do the same for p(n=i), i=2,..., 20. Find prices and quantities of equilibrium. Question 3: A) Explaining the effects of autocorrelation: The problem asks you to explain why L.p cannot be considered exogenous. Please also explain the consequences of applying OLS estimators in thepresence of autocorrelated disturbances. B) Testing for the presence of autocorrelation: see e-Tutorial 10. C) Correcting the Model: see e-Tutorial 10. Question 4: Here you can use the Hausman specification test you have saw in Lecture 11. Make sure to explain the null and the alternative hypothesis, and describe how the test is computed. The choice of instruments is crucial: you need to selectinstruments that are exogenous, orthogonal to errors, but correlated with included variables. In STATA, you can calculate the Hausman test as follows: *2SLS with full set of instruments:
regress Q L.p z ( your instruments z )
matrix bFull=get(_b)
matrix varFull=get(VCE) *2SLS with reduced set of instruments:
regress Q L.p z ( your instruments only )
matrix bRedux=get(_b)
matrix...
Regístrate para leer el documento completo.