# Imposing constraints on coefficient matrix in VAR

36 views
Message has been deleted

### saywhat

May 22, 2021, 7:38:07 PMMay 22
to pystatsmodels

https://www.statsmodels.org/stable/generated/statsmodels.tsa.vector_ar.var_model.VAR.html

I want to impose constraints on the coefficient matrix. For example, in VAR(1), Yt = (A1) (Yt-1) + E, A1= [a11, a12; a21, a22], how to impose submatrix a21 = 0 since I already know one granger cause the other, but not the other way around before running the model? I also want granger causality test to reflect that too, e.g. give me 0 for those coefficients and NaN for the grangers_causation_matrix. In an economic scene, the number of patients will have a position influence on the price of a medicine, but the price of a medicine will not affect the number of patients in any way. I want to incorporate this information into the model before I run it. Does anyone know how to do it? Thanks

May 23, 2021, 11:21:55 AMMay 23
to Statsmodels Mailing List
Hello,

As far as I know, we do not have the option for constraints in the VAR models. One option would be to estimate the coefficients using the SUR model from linearmodels (https://bashtage.github.io/linearmodels/system/system/linearmodels.system.model.SUR.html#linearmodels.system.model.SUR).

Best,

On Sat, May 22, 2021 at 7:38 PM saywhat <saint...@gmail.com> wrote:

https://www.statsmodels.org/stable/generated/statsmodels.tsa.vector_ar.var_model.VAR.html

I want to impose constraints on the coefficient matrix. For example, in VAR(1), Yt = (A1) (Yt-1) + E, A1= [a11, a12; a21, a22], how to impose submatrix a21 = 0 since I already know one granger cause the other, but not the other way around before running the model? I also want granger causality test to reflect that too, e.g. give me 0 for those coefficients and NaN for the grangers_causation_matrix. In an economic scene, the number of patients will have a position influence on the price of a medicine, but the price of a medicine will not affect the number of patients in any way. I want to incorporate this information into the model before I run it. Does anyone know how to do it? Thanks

--
You received this message because you are subscribed to the Google Groups "pystatsmodels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pystatsmodel...@googlegroups.com.