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

@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.

@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!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.