I am testing a panel data set for unit roots. I am using xtunitroot
fisher
(option) dfuller
(as opposed pperron
) in Stata.
First, I have drawn a scatter plot of my variables of interest against a time variable to see if there is a time trend. Many of my variables seem to have a time trend. Now, I am unsure as to which options to employ in my Fisher unit-root test.
- I assume that I should use
trend
for those variables that appear to have a time trend; but, if I test for a unit root using thetrend
option, does that mean that I somehow have to correct for a time trend in my regression model? - Also, I'm not sure how to know if I should use the
demean
option (see page 2 of the help file).
Does anyone have an idea on this?
P.S. Command names and some details were edited following the answer by Richard Hardy.
Best Answer
Are you using the regular
dfuller
or thextunitroot
? Fisher has nothing to do (at least directly) with the regulardfuller
, so I wonder why you are mentioning that. I will for now give an answer assuming you are usingdfuller
.You might need to use
drift
rather thantrend
as an option in thedfuller
function. If you observe a linear time trend in the data, it is normally called "drift" rather than "trend". Usingtrend
gives a quadratic time trend in the data (but a linear time trend in first differences). See more details in the help file for thedfuller
command, especially page 2.If there is a drift or a trend in the data, it would of course make sense to account for it not only in the unit root testing but also later when you model the variable in levels or first differences. Just as you are including a drift and/or a trend term in the test equation, you could include these terms in the model later on (just watch out whether the dependent variable is in levels or first differences and adjust accordingly).
I do not see the
demean
option in thedfuller
command (could you indicate more precisely where you encounter it?), so I cannot comment on it.Update
Now that the command names and some details have been edited in the original post, I am updating my answer.
demean
, this option is said to subtract the cross-sectional average for the given time point from all series, and do this for all time points. I am not sure if this is a secure choice. For example, if all time series are cointegrated and are driven by just one stochastic time trend,demean
will effectively remove that stochastic trend and all the series will be stationary. But that does not make the original series stationary (they are integrated). I do not know this methodology well, so perhaps I am missing something. You should rather check the reference in the help file for details. And here is what Levin et al. (2002) say about the idea of demeaning (emphasis is mine):References: