Hi everyone.

I'm having some troubles with STL function to decompose some data.

My issue is that I have monthly data from September 2005 up to August 2010
i. e. 60 observations.

I define it in the following way:

*u<-read.csv("C:/CELEBREX.csv",header = TRUE)
u.ts<-ts(u, start=c(2005,9), frequency=12)
*
The issue is that when I try to use

stl(u.ts, 'per')

Then the following error message is displayed:

*Error en stl(u.ts, "per") : only univariate series are allowed
*

I know that stl needs a univariate time series in order to run, but I've
already defined it in *u.ts.

*Moreover, if I use the same *u.ts* with functions which also requires
univariate time series, i. e.

*auto.arima(u.ts, d=1, D=1)*

Series: u.ts
ARIMA(0,1,0)(0,1,1)[12]

Call: auto.arima(x = u.ts, d = 1, D = 1)

Coefficients:  sma1
                  -0.5300
s.e.              0.2553

sigma^2 estimated as 22788111:  log likelihood = -466.79
AIC = 937.57   AICc = 937.85   BIC = 941.27

or in

*StructTS(u.ts)

*Call:
StructTS(x = u.ts)

Variances:
   level     slope      seas   epsilon
       0         0    142829  12358227


or in

*decompose(u.ts)*

then I don't have any problem with *u.ts *defined as univariate time serie.

What is it happening with STL?, What am I doing wrong?

Thanks in advance.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to