Hello everyone,
I'm new to Stata and I'm trying to run a regression of the form y = indicator*[constant + α0*x1 + β0*x2] + (1 - indicator)*[constant + α1*x1 + β1*x2]
The indicator takes the value 0 or 1 and represents the economy being in a particular state (such as recession or expansion), and x1 and x2 are independent variables. It is a panel regression with fixed effects. I want to estimate the state-dependent α and β coefficients.
I would like to just be able to type this equation into Stata and run that regression, but I don't believe that is possible. I tried pre-multiplying x1 and x2 by the indicator beforehand, and I get results but the process does not seem elegant and it is time-consuming, and I don't know if the results are correct. Does anyone know how I'm supposed to estimate such an equation in Stata?
Thank you!
I'm new to Stata and I'm trying to run a regression of the form y = indicator*[constant + α0*x1 + β0*x2] + (1 - indicator)*[constant + α1*x1 + β1*x2]
The indicator takes the value 0 or 1 and represents the economy being in a particular state (such as recession or expansion), and x1 and x2 are independent variables. It is a panel regression with fixed effects. I want to estimate the state-dependent α and β coefficients.
I would like to just be able to type this equation into Stata and run that regression, but I don't believe that is possible. I tried pre-multiplying x1 and x2 by the indicator beforehand, and I get results but the process does not seem elegant and it is time-consuming, and I don't know if the results are correct. Does anyone know how I'm supposed to estimate such an equation in Stata?
Thank you!
Comment