title: How to fit a restricted VAR model in R?
body: <p>I was trying to understand how may I fit a VAR model that is specific and
  not general. </p>
  
  <p>I understand that fitting a model such as general VAR(1) is done by
  importing the "vars" package from Cran</p>
  
  <p>for example </p>
  
  <p><img src="https://latex.codecogs.com/gif.latex?$&space;y_%7Bt%7D=&space;%5Calpha&space;&plus;%5Cbeta_%7B11%7Dy_%7Bt-1%7D&plus;%5Cbeta&space;_%7B21%7Dx_%7Bt-1%7D&plus;%5Cvarepsilon&space;_%7B1t%7D&space;$" title="$ y_{t}= \alpha +\beta_{11}y_{t-1}+\beta _{21}x_{t-1}+\varepsilon _{1t} $" /></p>
  
  <p><img src="https://latex.codecogs.com/gif.latex?$$&space;x_%7Bt%7D=%5Calpha&space;_%7B2%7D&plus;%5Cbeta&space;_%7B21%7Dy_%7Bt-1%7D&plus;%5Cbeta&space;_%7B22%7Dx_%7Bt-1%7D&plus;%5Cvarepsilon&space;_%7B2t%7D&space;$$" title="$$ x_{t}=\alpha _{2}+\beta _{21}y_{t-1}+\beta _{22}x_{t-1}+\varepsilon _{2t} $$" /></p>
  
  <p>consider that y is a matrix of a 10 by 2. then I did this after importing vars package </p>
  
  <pre><code>y=df[,1:2] # df is a dataframe with alot of columns (just care about the first two)
  VARselect(y, lag.max=10, type="const")
  summary(fitHilda &lt;- VAR(y, p=1, type="const"))
  </code></pre>
  
  <p>This work fine if no restriction is being made on the coefficients. However, if I would like to fit this restricted VAR model in R</p>
  
  <p><img src="https://latex.codecogs.com/gif.latex?y_%7Bt%7D=%5Calpha&space;&plus;%5Cbeta&space;_%7B21%7Dx_%7Bt-1%7D&plus;%5Cvarepsilon&space;_%7B1t%7D" title="y_{t}=\alpha +\beta _{21}x_{t-1}+\varepsilon _{1t}" /></p>
  
  <p><img src="https://latex.codecogs.com/gif.latex?x_%7Bt%7D=%5Calpha&space;_%7B2%7D&plus;%5Cbeta&space;_%7B21%7Dy_%7Bt-1%7D&plus;%5Cvarepsilon&space;_%7B2t%7D" title="x_{t}=\alpha _{2}+\beta _{21}y_{t-1}+\varepsilon _{2t}" /></p>
  
  <p>How may I do so in R? 
  Please refer me to a page if you know any? If there is anything unclear from your prespective please do not mark down let me know what is it and I will try to make it as clear as I understand. </p>
  
  <p>Thank you very much in advance  </p>