Unit root tests: how to decide if to include a trend and/or a constant Applying a test to univariate time series data for checking if the series has a unit root or not, one is faced with a decision if one would like to test if the series is stationary around a constant or a trend. But I am not pretty sure, based on what sign should I infer which test is the reasonable one? Is it correct to look at the plot of the data and see if there is a trend visible, and if yes, then opt for a test of stationarity around a trend? And with the constant the same way: if there is no trend visible then see if the series might have a mean different from zero?
 A: In general, if you decide what hypotheses to test by looking at the data you have to take the resulting p-values with a pinch of salt. The test for stationarity around a trend is the less specific (the slope can be as small as you like), so it's perhaps the better one if you're not prepared to assume beforehand that there's no trend. (And for some tests the null hypothesis is that there is a unit root; for others that there isn't, so you have another choice there.) Many people prefer just to examine the auto-correlation & partial auto-correlation functions for raw, de-trended, & differenced data.
As for the mean of a stationary series: you can certainly test whether it's significantly different from zero. But don't confuse lack of significance with positive evidence that it's exactly equal to zero & therefore remove it just for this reason.
A: Unit root test refers to ARIMA model while the trend, seasonal effect and random component approach is about decomposition approach.
They are different approach of time series.
If ARIMA model is decided to use, unit root test can be employed and decide whether differencing is needed. But in this approach, seasonal component and trend should not be added to the model, because differencing can handle these effects.
On the other hand, in decomposition approach, unit root test is not appropriate, neither the differencing.
A: You can check out this article which clearly specifies the test strategy one needs to follow in order to determine if your series has a trend or a constant.  If you do not know whether the data contains a trend or not, then go to case 3 and assume it has a constant and a trend and carry an ADF test on the series.  If the test fails to reject the null of 'its integrated', then the parameter in front of the trend line is 0.  Then you regress change in your series against the constant plus lagged value of the original series.  (the normal aDF test).  Get the p value in front of the constant.  If its greater than 5%, accept that your data has no trend or constant.  
A: I watch other way to find if your data has a trend or not. It shows that if the value of your acf is exponentially decreasing then it has a trend but if it flunctuates randomly from positive to neg vice versa then there is none . 
