Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: constrained VAR


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: constrained VAR
Date   Fri, 27 Jun 2003 08:33:16 -0500

----- Original Message ----- 
From: "John D. Levendis" <john-levendis@uiowa.edu>
To: "statalist" <statalist@hsphsun2.harvard.edu>
Sent: Thursday, June 26, 2003 7:02 PM
Subject: st: constrained VAR


> Greetings statalisters,
>
> I've got a question regarding constraints on variables in a VAR.
>
> Consider the VARX below:
>
> P = B1*P(t-1) + B2*Q(t-1) + B3*X1(t) + B4*X2(t) + e(t)
> Q = B5*P(t-1) + B6*Q(t-1) + B7*X1(t) + B8*X2(t) + e(t)
>
> It can be estimated by
> -var P Q, exog(X1 X2) lags(1)
>
> I want to constrain the coeff on X1 in the Q equation to be zero.
>
> If the Xs were endogenous variables, I could have done:
> constraint define 1 [Q] X1 = 0
> var P Q, exog(X1 X2) constraint(1)
>
> This doesn't seem to work. I get the error message
> "regressor Q not found"
> "at least one constraint in constraints(1) invalid"
>
> Is there a way to constrain the X1 if its an exogenous variable?
>
> Thanks in advance.
>
> --John

John,

I'm not sure why your procedure is not working , but that is how you would
contrain the variable in -var-.

Scott

Example


. use http://www.stata-press.com/data/r8/lutkepohl.dta
(Quarterly SA West German macro data, Bil DM, from Lutkepohl 1993 Table E.1)

. gen x1 = invnorm(uniform())

. gen x2 = invnorm(uniform())

. constraint 1 [dlincome]x1 = 0

. var dlinv dlinc , exog(x1 x2)  constraint(1)
Estimating VAR coefficients

Iteration 1:   tolerance =   .0037264
Iteration 2:   tolerance =   .0000714
Iteration 3:   tolerance =  1.373e-06
Iteration 4:   tolerance =  2.641e-08


Vector autoregression

Constraints:
 ( 1)  [dlincome]x1 = 0
Sample:  1960q4   1982q4

--------------------------------------------------------------------------
Equation          Obs  Parms        RMSE     R-sq        chi2        P
--------------------------------------------------------------------------
dlinvestment       89      7     .042516    0.1052   10.16803   0.1178
dlincome           89      6     .010981    0.1184   11.95642   0.0354
--------------------------------------------------------------------------

Model lag order selection statistics
------------------------------------
  FPE           AIC         HQIC         SBIC         LL
Det(Sigma_ml)
 2.878e-07  -9.3632914   -9.2055007   -8.9718205   430.66647      2.148e-07

----------------------------------------------------------------------------
--
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
dlinvestment |
dlinvestment |
          L1 |  -.2271166   .1065471    -2.13
0.033    -.4359451   -.0182881
          L2 |  -.1408893   .1064105    -1.32   0.185    -.3494499
.0676714
dlincome     |
          L1 |   .6925616   .3935558     1.76   0.078    -.0787936
1.463917
          L2 |   .4537439   .3922438     1.16   0.247    -.3150398
1.222528
x1           |   .0042531   .0042963     0.99   0.322    -.0041675
.0126738
x2           |   .0036471   .0047478     0.77   0.442    -.0056584
.0129525
_cons        |   .0008888   .0111707     0.08   0.937    -.0210053
.0227829
-------------+--------------------------------------------------------------
--
dlincome     |
dlinvestment |
          L1 |   .0542028   .0272641     1.99   0.047     .0007661
.1076395
          L2 |   .0521213   .0272318     1.91   0.056    -.0012521
.1054946
dlincome     |
          L1 |   .0296899   .1011143     0.29   0.769    -.1684905
.2278702
          L2 |   .0714579   .1009812     0.71   0.479    -.1264616
.2693773
x1           |  (dropped)
x2           |   .0015409   .0012245     1.26   0.208    -.0008591
.0039409
_cons        |    .015591   .0028791     5.42   0.000     .0099481
.021234
----------------------------------------------------------------------------
--

.


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index