Estimating ARMA equation using lm() in R Is there a way to estimate an ARMA equation using the lm() function in R without using arima()?
 A: Not easily. 
You can easily estimate an $\text{AR}(p)$ by regressing $(y_{p+1},...,y_n)$ on its lags. If $n$ is large and $p$ is not too near the stationarity boundary, the neglected likelihood for the first $p$ observations should make little difference. 
I can think of a somewhat complicated way to get a rough estimate of an ARMA where the MA order is reasonably small via regression (which might be iterated to improve the estimate), but generally speaking it's going to be much easier to use the more standard approaches.
You might also use nonlinear least squares to estimate the MA parameters by inverting the MA as an infinite AR and then cutting the terms off at some finite but large lag, and for a long series this should work fairly well, but again, this is harder than the more usual methods.
A: An $\text{ARMA}(1,1)$ model can be approximated by 
$X(t)= \beta_0 + \beta_1 X(t-1) + \beta_2 [(X(t-1)-\text{predict.ahead}(X(t-2),1)]+ e(t)$. 
I don't know how to do this in R code but it would require initializing e(1)=0 and a for loop.  
