
hi,

I am trying to use stl to get a breakdown of the seasonal and trend in my timeseries data. I have tick data, and I have created a ts object.

I ran a SQL query to get the data in the below form 
>x
            V1                               V2
49995  2010-07-09 1341        9610
49996  2010-07-09 1341        9610
49997  2010-07-09 1342        9615
49998  2010-07-09 1342        9615
49999  2010-07-09 1342        9615

and I converted it into ts by running the following:
> xt<-ts(x[,2])
>xt
[99975] 9285 9285 9285 9285 9290 9290 9290 9290 9290 9290 9290 9290 9290 9290
[99989] 9290 9290 9290 9290 9285 9285 9290 9290 9290 9290 9290

> is.ts(xt)
[1] TRUE

now, when I try to plot the stl, I get the following error:
>require(graphics)
> plot(drg<-stl(log(xt), "per"))
Error in plot(drg <- stl(log(xt), "per")) : 
  error in evaluating the argument 'x' in selecting a method for function 'plot'

I even tried the following:
> plot(drg<-stl(log(xt), s.window=21))
Error in plot(drg <- stl(log(xt), s.window = 21)) : 
  error in evaluating the argument 'x' in selecting a method for function 'plot'
> 

any suggestion on how I can fix the error, to be able to see the breakdown of the different trend components...I suspect I need to create the ts object differently, but I am not quite clear how to do it.....I can create the xts object but I realize that doesn't work with stl.



 		 	   		  
	[[alternative HTML version deleted]]

