linear regression, lm

Hi all,
i´ve got a technical question for using the lm-function.

I would like to make a linear regression with the following shape:
∆Y_t= -φε_(t-1)+ β ∆X_t+ u_t
with u_t = residuals.

I want to estimate the parameters φ and β.
I already know, that by adding " -1 " in the formula of the lm-function, i will get an estimation without an intercept.

My problem is the "-" before the φ. How do i need to build the formula in this case?

My first attempt was like this:
lm(∆Y_t ~ -ε_(t-1) + ∆X_t - 1). The result was a model without consideration of the variable ε_(t-1).

Greetings
donno

Welcome to the community!

May be I'm asking a super dumb question, but can you not fit the model considering A=-φ as the parameter, and then estimate φ as -A afterwards?

@Yarnabrina thanks for welcoming me :slightly_smiling_face:

I actually cannot say whether this is possible. In the end I need a positiv value for φ, but a negative influence of ε_(t-1) on the whole model.

I have already tried it like you said with: lm(∆Y_t ~ ε_(t-1) + ∆X_t - 1). I receive a solution, which is, with regards to the content, not interpretable.

Ok. Unfortunately, I don't think I can help you much here. You can possibly try constrained optimisation as similar to here:

Hopefully someone else will have a better idea, or you come with your own. In that case, please do share with us. Good luck.

@Yarnabrina gives a good answer. Run the regression and then take a red marker and write in a minus sign before the coefficient on \varepsilon.

But if you want R to do this, lm() has a special feature to tell it that you are using an operator. Put the desired function inside I(). Something like

lm(y~-1 + I(-epsilon))

First of all: Thank you very much!
It works with the "I()". I receive the same results in both ways. lm(∆Y_t ~ I(-ε_(t-1)) + ∆X_t - 1) or lm(∆Y_t ~ ε_(t-1) + ∆X_t - 1). Just the sign of the estimated parameters is different, like @Yarnabrina said before.

Bye and thanks for your help!