title: Why is statsmodels select_order function different from params for AR model?
body: <pre><code>import pandas as pd
  import numpy as np
  import statsmodels.tsa.api as smt
  import pandas_datareader.data as web   
  
  start = '2007-01-01'
  end = '2015-01-01'
  get_px = lambda x: web.DataReader(x, 'yahoo', start=start, end=end)['Adj Close']    
  symbols = ['SPY','TLT','MSFT']
  # raw adjusted close prices
  data = pd.DataFrame({sym:get_px(sym) for sym in symbols})
  # log returns
  lrets = np.log(data/data.shift(1)).dropna()   
  
  # Select best lag order for MSFT returns    
  max_lag = 30
  mdl = smt.AR(lrets.MSFT).fit(maxlag=max_lag, ic='aic', trend='nc')
  est_order = smt.AR(lrets.MSFT).select_order(maxlag=max_lag, ic='aic', trend='nc')
  
  print('best estimated lag order = {}'.format(est_order))
  print mdl.params
  </code></pre>
  
  <p>The output would be this. </p>
  
  <pre><code>best estimated lag order = 23
  L1.MSFT    -0.075405
  L2.MSFT    -0.067423
  L3.MSFT     0.031371
  L4.MSFT    -0.063610
  L5.MSFT    -0.045080
  L6.MSFT    -0.001510
  L7.MSFT    -0.051875
  L8.MSFT    -0.015192
  L9.MSFT    -0.018665
  L10.MSFT    0.044720
  L11.MSFT    0.041655
  L12.MSFT    0.034231
  L13.MSFT   -0.042473
  L14.MSFT   -0.008583
  L15.MSFT    0.022171
  L16.MSFT    0.009983
  L17.MSFT    0.038606
  L18.MSFT   -0.073060
  dtype: float64
  </code></pre>
  
  <p>The problem here is that even though statsmodels decided that the ideal lag for AR model is 23, there are only 18 parameters when you check the parameters. Shouldn't it be the same ?  It would probably makes sense if the number of order from "select_order" is less than the length of parameters array. I understand that "select_order" decide the ideal lag order using AIC criteria in this case. </p>
  
  <p>Can someone explain why ?  Assuming that 23 is indeed the ideal lag order, how do I get additional 5 parameters since I can only get up to 18 parameters here?</p>