I have a question simply to the way of how to calculate something:
I have variable V, which is continuous, and variable dummy, which is a factor variable.
First I have the regression:
Code:
xtreg P c.lnV##i.dummy lnSa Ratio lnAge Closely i.year, fe vce(cluster ID)
Code:
xtreg P lnV lnV_sq dummy i.dummy#c.lnV i.dummy#c.lnV_sq lnSa Ratio lnAge Closely i.year, fe vce(cluster ID)
egen lnV_std = std(lnV)
egen lnV_std_sq = std(lnV*lnV)
egen Interaction1 = std(lnV)*dummy
egen Interaction2 = std(lnV*lnV)*dummy
Is this the right order of squaring, standardizing, taking the log and multiplying?
Thank you very much for your help
0 Response to how to square a standardized log variable and build interaction term?
Post a Comment