title: vars package of R - AIC after restrict
body: <p>I fit a vector autoregression model on the Canada data in the vars package and then restrict based on a t-value of 1.64. </p>
  
  <pre><code>library(vars)
  data("Canada")
  var.can1 &lt;- VAR(Canada, p = 2, type = "none")
  
  summary(var.can1)
  
  VAR Estimation Results:
  ========================= 
  Endogenous variables: e, prod, rw, U 
  Deterministic variables: none 
  Sample size: 82 
  Log Likelihood: -184.045 
  Roots of the characteristic polynomial:
      1 0.9783 0.9113 0.9113 0.7474 0.1613 0.1613 0.1572
  Call:
  VAR(y = Canada, p = 2, type = "none")
  
  # AIC BIC etc.
  VARSelect(Canada, lag.max = 2, type = "none")$criteria
  
  var.can2 &lt;- restrict(var.can1, method = "ser", thresh = 1.64)
  
  summary(var.can2)
  
  VAR Estimation Results:
  ========================= 
  Endogenous variables: e, prod, rw, U 
  Deterministic variables: none 
  Sample size: 82 
  Log Likelihood: -191.376 
  Roots of the characteristic polynomial:
      1 0.9742 0.9272 0.9272 0.7753 0.2105 0.2105 0.005071
  Call:
  VAR(y = Canada, p = 2, type = "none")
  </code></pre>
  
  <p>I then want to obtain the revised information criteria, but cannot see a way to do this. Does anyone know how? </p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>So I try to derive the AIC for the unrestricted model:</p>
  
  <pre><code>vars::VARselect(Canada, lag.max = 2, type = "none")$criteria
                    1            2
  AIC(n) -5.600280680 -6.082112784
  HQ(n)  -5.411741957 -5.705035337
  SC(n)  -5.130676924 -5.142905272
  FPE(n)  0.003697972  0.002289041
  
  s &lt;- summary(var.can1)
  s$covres
                  e          prod          rw             U
  e     0.140560073  0.0056629572 -0.03893668 -0.0798565366
  prod  0.005662957  0.4358209615  0.06689687 -0.0005118419
  rw   -0.038936678  0.0668968657  0.60125872  0.0309232731
  U    -0.079856537 -0.0005118419  0.03092327  0.0899478736
  </code></pre>
  
  <p>From New introduction to multiple time series analysis Luetkepohl, Helmut 2007, pg 147:</p>
  
  <p>$$AIC(m) = ln(det(covres)) + \frac{2mk^2}{T}$$</p>
  
  <p>m is lag order, k is number of series, T is sample size</p>
  
  <p>But I get:</p>
  
  <p>-6.451984 + 2*2*4^2/84 = -5.69</p>
  
  <p>which does not equal -5.600280680</p>