Page 1 of 1

Estimation of dummy variables

Posted: Sat Jan 21, 2017 8:34 am
by michalzeszen
Hi there,

This is Michalzeszen from Brazil.

I'm finishing a study on the 2008 economic crisis, and it's affects on the automotive sales in my state. For that I'm running a regression where the sales numbers are dependent on the interest rate, a index price and the amount of credit released for the purpose of buying a car.

I have a montly set of data from jan 2005 to dez 2012, and to identify the crisis period, I'm using dummies that say 1 to jan 2008 to jun 2009. This is the period the govenment applied anticyclical policies to prevent sales drop on the sector.

My question is really simple: how to run the regression and make the dummies interact with the explanatory variables?

Thank you so much for the help!

Re: Estimation of dummy variables

Posted: Sat Jan 21, 2017 8:39 am
by startz
If y is the dependent variable, D the dummy, and X another explanatory variable

Code: Select all

ls y c x d d*x

Re: Estimation of dummy variables

Posted: Sat Jan 21, 2017 9:08 am
by michalzeszen
If y is the dependent variable, D the dummy, and X another explanatory variable

Code: Select all

ls y c x d d*x
Thank you, I was guessing it would be something like that, but it's good to be sure!

Can I ask another question? If I want to use log on this estimation:

- should I convert the values of the variables to log prior the estimation, or during it?
- the Index Price have some negative values, how to properly convert it?

thanks again!

Re: Estimation of dummy variables

Posted: Sat Jan 21, 2017 10:52 am
by startz
It makes no difference whether you convert before or directly during estimation; do whichever is more convenient.

There is no great solution to the log of a negative number. If it's just a few observations, you might leave them out. Or you can add a positive number to all observations that everything is positive, but that may change the results a little.