title: autoregressive models in R with dynlm function
body: <p>I have a question in R on the dynlm function. </p>
  
  <p>I have a model that looks like this: </p>
  
  <p><a href="https://i.stack.imgur.com/2DEP0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2DEP0.png" alt="enter image description here"></a></p>
  
  <p>The Y (<em>U</em>) variable here is the change in unemployment from t - 1 to t. The X variable here is jobless claims. </p>
  
  <p>I need to write a code for the model ADL(1,3) with dynlm function. </p>
  
  <p>I have written a code like this: </p>
  
  <p>reg1&lt;- dynlm(diff(unemp)~L(diff(unemp),1)+L(claims, 0:3), data=data)</p>
  
  <p>I have one doubt: should it be claims(0:3) or claims(0:2)?</p>