Dear Stata listers
I am doing a panel data regression using the xtreg (with fe) command on Stata 13. I have 5 years of monthly data and I would like to include time trend in the regression. I have already included the following command in my regression
gen date = ym(year,month)
format date %tm
I have both year and month variables in my data. Will using i.month and i.year in my xtreg, fe be sufficient in accounting for time trend i.e. xtreg dependentvar (explanatory variables) i.month i.year, fe? Or should I be using i.date instead (I understand that c.date will assume a linear trend and I would prefer not to assume so)? Is there something else I have to do to account for time trend in Stata?
On a related note, what's the difference between using i.month i.year, and specifying the date using - xtreg panelvar timevar - ? Do these two methods account for time trend in the same way?
Can someone help me on this? Thank you.
I am doing a panel data regression using the xtreg (with fe) command on Stata 13. I have 5 years of monthly data and I would like to include time trend in the regression. I have already included the following command in my regression
gen date = ym(year,month)
format date %tm
I have both year and month variables in my data. Will using i.month and i.year in my xtreg, fe be sufficient in accounting for time trend i.e. xtreg dependentvar (explanatory variables) i.month i.year, fe? Or should I be using i.date instead (I understand that c.date will assume a linear trend and I would prefer not to assume so)? Is there something else I have to do to account for time trend in Stata?
On a related note, what's the difference between using i.month i.year, and specifying the date using - xtreg panelvar timevar - ? Do these two methods account for time trend in the same way?
Can someone help me on this? Thank you.
Comment