Hello everyone,
Is there a difference between creating new interaction variables or using the prefixes of the factor variables i. and c.?
So far, I have always preferred to create variables in the dataset and then insert them into regressions, but I have seen many users using prefixes to create interaction variables.
From what I understand, there should be no difference, but I have tested on my dataset and the results are different. Am I doing something wrong, or is there a difference between the two methods?
These two regressions give me different results. T is the treatment dummy, while GDP and ceqi are the two variables it should interact with.
Thanks!
Is there a difference between creating new interaction variables or using the prefixes of the factor variables i. and c.?
So far, I have always preferred to create variables in the dataset and then insert them into regressions, but I have seen many users using prefixes to create interaction variables.
From what I understand, there should be no difference, but I have tested on my dataset and the results are different. Am I doing something wrong, or is there a difference between the two methods?
Code:
xtreg AR GDP_dev ceqi T TxGDP Txceqi, fe
Code:
xtreg AR GDP_dev ceqi T i.T##c.GDP_dev i.T##c.ceqi, fe
Thanks!
Comment