0
$\begingroup$

How to remove/identify trend and the seasonal component separately from time series data? what are the technique available in MINITAB or R software.Can I use Moving Average filter to decompose original time series data? I tryied to use stl command in forecast package in R but when I run code it occur an error.I used monthly tourists arrivals data only. code:fit <- stl(data, t.window=15, s.window="periodic", robust=TRUE) Error in stl(data, t.window = 15, s.window = "periodic", robust = TRUE) : only univariate series are allowed.can anyone give idea to slove my problem

$\endgroup$
  • $\begingroup$ Yes, you can use any of the moving average , weighted moving average, exponential smoothing, centered moving average to identify trend. Forecast package in R can be used for the same. You can use stl command for decomposition. $\endgroup$ – Siddhesh Nov 6 '15 at 8:26
  • $\begingroup$ What kind of data are you talking about? Daily, weekly, monthly, quarterly... ? $\endgroup$ – RandomDude Nov 6 '15 at 9:19
  • $\begingroup$ @RandomDude's question is a good one. If you have grannular data (e.g. daily) you may have day-of-week seasonality along with time-of-year seasonality. This makes things more complex. Post again and give us more info. $\endgroup$ – zbicyclist Nov 6 '15 at 20:25
  • $\begingroup$ I used monthly data. first I took moving average(length=12) .after that trend identified. But I have no idea to identify seasonal component. Should I take to identify seasonal component in detrend data or original data? $\endgroup$ – Hansanie Nov 7 '15 at 16:46
0
$\begingroup$

Where I would START (since you mentioned Minitab) is with a seasonal decomposition. (Stat > Time Series > Decomposition) on the raw data. This will give you seasonal factors for each month, and you can save the deseasonalized data. Note that this should be used for seasonality ONLY. The trend from this procedure is often poor. But once you get rid of seasonality, then you can see how reliable the trend is. Plot your deseasonalized data and stare at it for a bit.

If you are lucky, your trend is linear (or if it is linear after you transform the data in some way) then you can fit this in Minitab as well using a variety of procedures (see @Siddhesh's list).

And R is a good choice (with a very good forecasting package), but with a bit tougher learning curve.

$\endgroup$
  • $\begingroup$ I tryied to use stl command in forecast package but when I run code it occur an error.I used monthly tourists arrivals data only. fit <- stl(data, t.window=15, s.window="periodic", robust=TRUE) Error in stl(data, t.window = 15, s.window = "periodic", robust = TRUE) : only univariate series are allowed $\endgroup$ – Hansanie Nov 9 '15 at 8:14
  • $\begingroup$ Do you have more than one time series in data? If so, try separating it out and running one time series at a time. $\endgroup$ – zbicyclist Nov 10 '15 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.