The following is based upon an example from the Gujarati textbook:
- Code: Select all
cal(q) 1970
open data table21-1.prn
data(format=prn,org=columns) 1970:1 1991:4
*
* Estimate the cointegrating relation
*
linreg pce / u
# constant pdi
compute betaci=%beta(2)
set dpce = pce-pce{1}
set dpdi = pdi-pdi{1}
linreg(define=pceeq) dpce / upce
# constant dpdi u{1}
linreg(define=pcieq) dpdi / updi
# constant dpdi{1}
*
equation(coeffs=||1.0,1.0||,identity) pdiid pdi
# pdi{1} dpdi{1}
equation(coeffs=||1.0,1.0||,identity) pceid pce
# pce{1} dpce{1}
equation(coeffs=||1.0,-betaci||,identity) uid u
# pce pdi
*
vcv(matrix=v)
# upce updi
group ecm pceeq pcieq pdiid pceid uid
impulse(model=ecm,cv=v,steps=50,print)
Consumption (PCE) is modeled as a standard linear consumption function with an error correction term. In order to close the model, disposable income (PDI) is modeled as an exogenous drifiting random walk. The consumption equation:
- Code: Select all
linreg(define=pceeq) dpce / upce
# constant dpdi u{1}
while simple in form codes up several dynamic relationships among the variables. dpce and dpdi are differences of pce and pdi, and u is a linear combination of pce and pdi. The most straightforward way to handle this is to define identities which link the variables. The final model will produce responses for (in order) dpce, dpdi, pdi, pce and u since those are the dependent variables of the five equations in order.
