Dear Statalist,
I have a question on the implementation of an interaction term in an IV-regression. I found some previous discussions but no solution yet, that´s why I am posting this question.
I have a panel of firms and run the following main regression where initial_size is a dummy denoting the initial size of a firm:
Now I want to instrument the tariff_rate but I am unsure what the correct Stata syntax would be. I tried the following command with tariff_rate_instrument being my instrumental variable (for now the lagged tariff rate)
but it gave me the error that "depvars may not be interactions". I don´t understand this error and on a more general level am unsure on how to exactly code in Stata IV regressions in a panel with interactions.
Any help would greatly be appreciated!
All the best
Leon
I have a question on the implementation of an interaction term in an IV-regression. I found some previous discussions but no solution yet, that´s why I am posting this question.
I have a panel of firms and run the following main regression where initial_size is a dummy denoting the initial size of a firm:
Code:
xtreg outcome c.tariff_rate c.tariff_rate#i.initial_size i.year, fe robust
Code:
xtivreg outcome i.year (c.tariff_rate c.tariff_rate#i.initial_size = c.tariff_rate_instrument c.tariff_rate_instrument#i.initial_size), fe vce(robust)
Any help would greatly be appreciated!
All the best
Leon
Comment