Skip to content

help with R

3 messages · Brian Ripley, Ed Wang, Kjetil Halvorsen

#
On Wed, 30 Nov 2005, Ed Wang wrote:

            
Well, amongst the things you are not telling us are your OS and version of 
R and what commands you are using.

The only relevant thing I know of is that NT-based versions of Windows 
were causing R to take a long time (but not hang completely) when plotting 
longish series in 2.1.0, but that was worked around in 2.1.1, and even 
there n=3690 would only just begin to show up the Windows bug.

  
    
#
Morning,

I've downloaded the precompiled R 2.1.1 version and am using Windows XP
on my office workstation.  As mentioned previously, I've resorted to batch
jobs to avoid the hanging that occurs when I try to plot the 3690 length
vector of data.  If it's warranted, I can do a build from the source and 
change
specific parameters in the makefile if people feel it is warranted.

Based on Berton's suggestion to look at the range of packages available
I think stl() might be as appropriate a package to use to identify all three
components of the time series data I have: underlying trend, seasonality
over a full year period (periodicity of one year, or 246 days in my case),
and residual (which I have no expectation that it will necessarily be
~N(0,\sigma^2)).

For the following dataset (15 years, 246 days/year => 3690 days of data)
what reasonal parameters for running stl() would folks suggest?  I've not
had any luck with getting stl() to return any useful information.  It 
continues
to stop with the statement

        series is not periodic or has less than two periods

using

stl(zHO, s.window=1, s.degree=2, l.window=246)

or the obvious ways I might try running stl() (i.e. plot(stl(zHO))).  It's
possible I've not properly specified the length of expected periodicity as
a parameter (246 days in my case).

All suggestions are welcome!  I'm trying to avoid going back and fitting
a linear model with 245 dummy variables.

Thanks.

Ed
#
Ed Wang wrote:
In creating the timeseries 9ts) object you need
myts <-  ts(mydata,    ....,   frequency=246)


Kjetil