title: OLS estimation with AR(1) term
body: <p>For reasons that I cannot explain (because I can't, not because I don't want to), a process used at my office requires running some regressions on Eviews.</p>
  
  <p>The equation specification used on Eviews is:</p>
  
  <pre><code>dependent_variable c independent_variable ar(1)
  </code></pre>
  
  <p>Furthermore, the process used is "NLS and ARMA."</p>
  
  <p>I don't use Eviews but, as I understand it, that equation means an OLS regression with a constant, one independent variable and an AR(1) term.
  I tried running this in R:</p>
  
  <pre><code>result &lt;- lm(df$dependent[2:48] ~ df$independent[1:47] + df$dependent[1:47])
  </code></pre>
  
  <p>Where df is a data.frame containing the dependent and independent variables (both spanning 48 observations).</p>
  
  <p>Am I doing it right? Because the parameter estimations, while similar, are different in Eviews. Different enough that I cannot use them.</p>
  
  <p>I've thoroughly searched the internet for what this means. I've read up on ARIMA and ARMAX models but I don't think that this is it. I'm sorry but I'm not that knowledgeable on statistics. By the way, estimating ARMAX models seems very complicated and is done by ML, not LS, so I'm really hoping that's not it.</p>
  
  <p>EDIT: I had to edit the model indexes <em>again</em> because I messed them up, <em>again</em>.</p>