Estimation with negative coefficients

I have probably an easy problem, however I'm not really sure how to do it: Basically, I would like to estimate a linear regression with OLS. So far so good. However, the model that should estimate looks like this:

y = a0 + a1*x1 - a2*x2 + a3*x3 - a4*x4

However, the normal text book models have always only positive coefficients, unlike my x2 and x4. Now how can I do this?

I'm not sure whether it helps, but the model above is just a simplification of what I actually wanna do. I actually have two Taylor rules for two different countries, and I would like to estimate the difference between them, so i - i* = ... and then you get of course a negative -a3INFL* and a -a4OUTPUT_GAP* term and so on.


Omega Contributor
Is your negative coefficient for a continuous or categorical variable? You perform the regression like usual, nothing really changes but a term is subtracted instead of add. If the term is for a categorical variable you may be able to flip the reference group.
So, these are all continuous variables like, Inflation, Output gap...
But what do you mean nothing really changes. How do I say this for example to STATA or R. Shall I multiply the values in my data file with (-1) for those that I want to subract? Also for example in STATA, I cannot say whether it is plus or minus, you just say reg y x1 x2 x3... and hit enter.


TS Contributor
A negative term in a regression equation is nothing special and is not in indication that there is something wrong with your model, it just means that if you have more of X you expect to get less of Y. Stata does exactly what it should be doing, and it would make no sense if you could force the sign in the regression command. However, nothing stops you from changing the meaning of X by transforming it. I would not do this just because you dislike negative numbers, but only because you think the transformation makes substantive sense.
But then, I don't understand how Stata know the difference. You see, I start of with two equations:

1) i = a0 + a1INFL + a2OUTPUT_GAP
2) i* = b0 + b1INFL* + b2OUTPUT_GAP* + b3 REAL_FXRATE*

So I could estimate each of them easily. Alright, but then I do the following:

i - i* = (a0 - b0) + a1INFL - b1INFL* + a2OUTPUT_GAP - b2OUTPUT_GAP* - b3REAL_FXRATE*

So what you are saying is, if I want to estimate this model, I don't have to change anything. I can just type

gen DIF = i - i*

and Stata knows what to do?? How is that possible? I understand that the reg command tries to minimize the sum of the squared residuals the the coefficients will turn out according to that objective. But I don't know, that seems weird.