CSAD= alpha + (beta1)(1-Dummy)(Return) + (beta2)(Dummy)(Return) + (beta3)(1-Dummy)(Return2) + (beta4)(Dummy)(Return2) + u
Return and Return2 are explanatory variables.
To run the regression in STATA do I have to create new variables such as:
gen newvar = (1-Dummy)(Return)
and then just do the same for the rest of the variables and run the regression with the newly created variables so:
reg CSAD newvar newvar2 newvar3 newvar4
Is this way correct? Is there any other way this could be done without creating 4 variables?
I am relatively new to STATA so I do not know if running the regression as: reg CSAD (1-Dummy)(Return) .... will yield the same as if I will create 4 separate variables, could someone please tell me if creating 4 more variables is the way to go or is there a more efficient way. Can STATA recognise if I don't leave spaces that (1-Dummy)(Return) is an explanatory variable? Will it compute the (1-Dummy) and then multiply it by the Return?
Thank you.
0 Response to How to run a regression with dummies in STATA?
Post a Comment