I try to do electricity price forecasting. For that I want to use following (simplyfied) regression equation:
Y_t = c1 * A_t + c2 * B_t + c3 * C_t + c4 * Y_(t-1)
As you see the first three summands are like a normal multiple linear regression, which I could easly determine with the lm-function. But the problem is, that the last summand is a autoregressive term. I already found some explanations for a autoregressive model, but I have no idea how I can merge them or if this is even possible.
So it would be very nice if anybody can help me here. Thanks in advance!