Econometrics I
Kipngetich Gideon
Week 8 Notes
Contents
1 Simultaneous Equations Models 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Examples of SEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Endogenous and Exogenous Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Structural and Reduced Form Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Two stage least squares estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Examples in R 4
2.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1 Simultaneous Equations Models
1.1 Introduction
In regression models one of the crucial assumptions we make is that the exogenous variables x′ s are independent
of the error term, however this assumption is violated under simultaneous equations.
Simultaneous equations are models with more than one response variable where the solution is determined by
an equilibrium among opposing forces.
1.1.1 Examples of SEM
A very simple supply and demand model might look like
Demand : Q = α1 P + α2 X + ed
Supply : Q = β1 P + es
In the above model P and Q are called endogenous variables because their values are determined within the
system we have created.
The income variable X has a value that is determined outside this system. Such variables are said to be
exogenous and these variables are treated like usual X explanatory variables.
The model of money wage and price determination is a good example of SEM. According to the model the
wage rate is determined by unemployment rate in the economy and the rate of price change in an unrestricted
labour market. The rate of inflation on the other hand is a function of the change in the wage rate and
money supply. The model contains the equations:
1
Wt = α0 + α1 Ut + α2 Pt + u1t
Pt = β0 + β1 Wt + β2 Rt + β3 Mt + u2t
W is rate of change in money wage, U unemployment rate in percentage, P rate of change in prices, R rate of
change in cost capital, M supply of money, t is time and u1 , u2 stochastic disturbances.
1.2 Endogenous and Exogenous Variables
-Endogenous variables get determined jointly and interdependently within the model. The endogenous
variables are determined by the exogenous variables.
• Exogenous variables are determined outside the model and are independently of the endogenous variable.
These exogenous variables determine the endogenous variable but the endogenous variables cannot
affect exogenous variables
• Lagged dependent variables: in a model we can include the lagged values of an endogenous variable
also.
The difference between single equation model and SEM is given in the table below:
Single Equation Model Simultaneous Equation Model
All independent variables are exogenous Independent variables can be both exogenous and
lagged endogenous
Equation of the model can be solved To solve an equation of the model we have to
independently consider other equations in the system
Dataset represents a specific equation The exact form of the equation cannot be
specified from data set
No need to identify an equation as the functional Identification is required before solving the
form of the equation is specified equations
OLS estimation is consistent OLS estimators are inconsistent
Solution technique: OLS, GLS Solution techniques: ILS, 2SLS
Instrumental variable method
3SLS
Applying OLS to a system of simultaneous equations we get estimates that are not unbiased and not consistent.
In order to obtain unbiased and consistent estimates we apply any of the following methods
• Reduced form method,
• The method of instrumental variables
• Two-stage least squares
• Limited Information maximum likelihood
• Three stage least squares
• Full information maximum likelihood
1.3 Structural and Reduced Form Equations
An economic model such as demand and supply equations include several of the dependent variables in each
equation such a model is called structural form of the model
2
If the structural form is transformed such that each equation shows one dependent variable as a function of
only exogenous independent variable the new form is called reduced form
The reduced form can be estimated by least squares while the structural form cannot because it includes
exogenous variables on its RHS.
The necessary condition for the identification requires that for the problem to have a solution each equation
in structural form of the system should miss at least an exogenous variable that is present in other equations.
We consider the demand equations:
Q = α1 P + α2 X + ed
Q = β1 P + es
To solve for P set Q in the demand and supply equations to be equal
β1 P + es = α1 P + α2 X + es
Solving for P
α2 ed − e s
P = X+
β1 − α 1 β1 − α 1
Which can be expressed as:
P = π1 X + v1
Solving for Q:
β1 α 2 β1 e d − e s
Q = β1 P + es = + = π2 X + v2
β1 − α 1 β1 α1
The parameters π1 and π2 are called reduced form equations and the error terms v1 and v2 are called reduced
form errors.
The least squares estimators of the parameters in a SEM is biased and inconsistent because of the correlation
between the random error and endogenous variables on the RHS of the equation.
The necessary condition for identification requires that for the problem to have a solution each equation in
structural form of the system should miss at least an exogenous variable that is present in other equation.
1.4 Two stage least squares estimation
The most widely used method for estimating the parameters of an identified structural equation is called
two-stage least squares.
We consider the supply equation discussed previously. We cannot apply the usual least squares procedures to
estimate β1 in this equation becuase the endogenous variable P on the RHS of the equation is correlated with
error term es.
The reduced form model is:
P = π1 X + v1
3
Suppose we know π1 then
Q = β1 E[p] + (β1 v1 + es )
We can estimate π1 using πˆ1 from the reduced form equation for P. A consistent estimator for E[P] is
P̂ = πˆ1 X
Estimating the above equation generates the so called two stage least squares estimate for β1 which is
consistent and normally distributed in large sample.
The 2SLS estimation procedures are:
• Least square estimation of the reduced form equation for P and the calculation of its predicted value P̂
• Least square estimation of SE in which RHS endogenous variable is replaced by its predicted value P̂
The properties of the two stage least squares are as follows:
• The 2SLS estimator is a biased but it is consistent
• In large samples the 2SLS estimator is approximately normally distributed.
2 Examples in R
2.1 Example 1
Simultaneous equation are object of package systemfit in R with function systemfit() which requires:
• formula list describing equations of the system
• method desired method of estimation
• inst list of instrumental variables
Consider the supply and demand models for truffles:
Demand equation:
Qi = α1 + α2 Pi + α3 P Si + α4 DIi + edi
The supply equation:
Qi = β1 + β2 Pi + β3 P Fi + esi
Quantity and price are endogenous and all other variables are considered exogenous.
The reduced form equations are:
Qi = π11 + π21 P Si + π31 DIi + π41 P Fi + Vi1
Pi = π12 + π22 P Si + π32 DIi + π42 P Fi + vi2
4
library(devtools)
#remotes::install_github("ccolonescu/PoEdata")
library(systemfit)
data("truffles", package="PoEdata")
D <- q~p+ps+di
S <- q~p+pf
sys <- list(D,S)
instr <- ~ps+di+pf
[Link] <- systemfit(sys, inst=instr,
method="2SLS", data=truffles)
summary([Link])
##
## systemfit results
## method: 2SLS
##
## N DF SSR detRCov OLS-R2 McElroy-R2
## system 60 53 692.472 49.8028 0.438964 0.807408
##
## N DF SSR MSE RMSE R2 Adj R2
## eq1 30 26 631.9171 24.30450 4.92996 -0.023950 -0.142098
## eq2 30 27 60.5546 2.24276 1.49758 0.901878 0.894610
##
## The covariance matrix of the residuals
## eq1 eq2
## eq1 24.30451 2.16943
## eq2 2.16943 2.24276
##
## The correlations of the residuals
## eq1 eq2
## eq1 1.00000 0.29384
## eq2 0.29384 1.00000
##
##
## 2SLS estimates for 'eq1' (equation 1)
## Model Formula: q ~ p + ps + di
## Instruments: ~ps + di + pf
##
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.279471 5.543884 -0.77193 0.4471180
## p -0.374459 0.164752 -2.27287 0.0315350 *
## ps 1.296033 0.355193 3.64881 0.0011601 **
## di 5.013977 2.283556 2.19569 0.0372352 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.92996 on 26 degrees of freedom
## Number of observations: 30 Degrees of Freedom: 26
## SSR: 631.917143 MSE: 24.304505 Root MSE: 4.92996
## Multiple R-Squared: -0.02395 Adjusted R-Squared: -0.142098
##
##
## 2SLS estimates for 'eq2' (equation 2)
## Model Formula: q ~ p + pf
5
## Instruments: ~ps + di + pf
##
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 20.0328022 1.2231148 16.3785 1.5543e-15 ***
## p 0.3379816 0.0249196 13.5629 1.4344e-13 ***
## pf -1.0009094 0.0825279 -12.1281 1.9456e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.497585 on 27 degrees of freedom
## Number of observations: 30 Degrees of Freedom: 27
## SSR: 60.554565 MSE: 2.242762 Root MSE: 1.497585
## Multiple R-Squared: 0.901878 Adjusted R-Squared: 0.89461
The output of the systemfit() function shows the estimates by structural equation:eq1is the
demand function, where, as expected, price has a negative sign, and eq2 is the supply equation,
with a positive sign for price.
By evaluating the reduced form equation using OLS, one can determine the effects of changes in exogenous
variables on the equilibrium market price and quantity, while the structural equations show the effects of
such changes on the quantity demanded, respectively on the quantity supplied.
Estimating the structural equations by such methods as 2SLS is, in fact, estimating the market demand and
supply curves, which is extremely useful for economic analysis.
Estimating the reduced forms, while being useful for prediction, does not allow for deep analysis - it only
gives the equilibrium point, not the whole curves.
# reduced form equation for demand
[Link] <- lm(q~ps+di+pf, data=truffles)
# reduced form equation for price
[Link] <- lm(q~ps+di+pf, data=truffles)
The results show that all the exogenous variables have significant effects on the equilibrium quantity and
price and have the expected signs.
2.2 Example 2
The fultonfish dataset provides another demand and supply example where the simultaneous equations
method can be applied.
The purpose of this example is to emphasize that the exogenous variables that are key for identification must
be statistically significant
The equations are:
log(quan) = α1 + α2 log(price) + α3 mon + α4 tue + α5 wed + α6 thus + eD
log(quan) = β1 + β2 log(price) + β3 stormy + eS
the endogenous variables are lprice, the log of price, and lquan the exogenous variables are the indicator
variables for the day of the week, and whether the catching day was stormy.
The reduced form equations are:
6
log(q) = π11 + π21 mon + π31 tue + π41 wed + π51 thu + π61 stormy + v1
log(p) = π12 + π22 mon + π32 tue + π42 wed + π52 thu + π62 stormy + v2
data("fultonfish", package="PoEdata")
fish.D <- lquan~lprice+mon+tue+wed+thu
fish.S <- lquan~lprice+stormy
[Link] <- list(fish.D, fish.S)
[Link] <- ~mon+tue+wed+thu+stormy
[Link] <- systemfit([Link], method="2SLS",
inst=[Link], data=fultonfish)
summary([Link])
##
## systemfit results
## method: 2SLS
##
## N DF SSR detRCov OLS-R2 McElroy-R2
## system 222 213 109.612 0.107301 0.094242 -0.597812
##
## N DF SSR MSE RMSE R2 Adj R2
## eq1 111 105 52.0903 0.496098 0.704342 0.139124 0.098130
## eq2 111 108 57.5218 0.532610 0.729801 0.049360 0.031755
##
## The covariance matrix of the residuals
## eq1 eq2
## eq1 0.496098 0.396138
## eq2 0.396138 0.532610
##
## The correlations of the residuals
## eq1 eq2
## eq1 1.000000 0.770653
## eq2 0.770653 1.000000
##
##
## 2SLS estimates for 'eq1' (equation 1)
## Model Formula: lquan ~ lprice + mon + tue + wed + thu
## Instruments: ~mon + tue + wed + thu + stormy
##
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.5059113 0.1661669 51.18896 < 2.22e-16 ***
## lprice -1.1194169 0.4286450 -2.61152 0.0103334 *
## mon -0.0254022 0.2147742 -0.11827 0.9060766
## tue -0.5307694 0.2080001 -2.55177 0.0121574 *
## wed -0.5663511 0.2127549 -2.66199 0.0089895 **
## thu 0.1092673 0.2087866 0.52334 0.6018373
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.704342 on 105 degrees of freedom
## Number of observations: 111 Degrees of Freedom: 105
## SSR: 52.090321 MSE: 0.496098 Root MSE: 0.704342
7
## Multiple R-Squared: 0.139124 Adjusted R-Squared: 0.09813
##
##
## 2SLS estimates for 'eq2' (equation 2)
## Model Formula: lquan ~ lprice + stormy
## Instruments: ~mon + tue + wed + thu + stormy
##
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.62835440 0.38897023 22.18256 < 2e-16 ***
## lprice 0.00105931 1.30954697 0.00081 0.99936
## stormy -0.36324606 0.46491248 -0.78132 0.43632
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.729801 on 108 degrees of freedom
## Number of observations: 111 Degrees of Freedom: 108
## SSR: 57.521843 MSE: 0.53261 Root MSE: 0.729801
## Multiple R-Squared: 0.04936 Adjusted R-Squared: 0.031755
The reduced equations are:
# q
[Link] <- lm(lquan~mon+tue+wed+thu+stormy, data=fultonfish)
# p
[Link] <- lm(lprice~mon+tue+wed+thu+stormy, data=fultonfish)