Hello!
I am using Stata/SE 16.1. I have a panel date set of 407 municipalities over a thirty years period (12,210 observations in total). This is an instrumental variable approach and I am using the command xtivreg2.
I need to include time fixed effects (along with entity FE), which is usually stated as i.year. However, xtivreg2 does not allow to use factor-variable operators.
I get the message: "factor-variable operators not allowed".
If I take out i.year I can run the regression.
My question is: How could I include time (year) fixed effects without using them as a factor-variable operator?
Thank you in advance.
I am using Stata/SE 16.1. I have a panel date set of 407 municipalities over a thirty years period (12,210 observations in total). This is an instrumental variable approach and I am using the command xtivreg2.
I need to include time fixed effects (along with entity FE), which is usually stated as i.year. However, xtivreg2 does not allow to use factor-variable operators.
Code:
xtset mun_code year xtivreg2 displacement i.year (concessions=gold_anomalies), fe cluster (department) first
I get the message: "factor-variable operators not allowed".
If I take out i.year I can run the regression.
My question is: How could I include time (year) fixed effects without using them as a factor-variable operator?
Thank you in advance.
Comment