Displaying 20 results from an estimated 4000 matches similar to: "s.window in stl()"
2001 May 16
1
stl in library(ts)
I am running R 1.2.2 under Linux. When using the function stl in
the ts library, how can I save the seasonal component? What I
would like was something like:
library(ts)
data(nottem)
data.stl <- stl(nottem, "per")
x <- data.stl$sea
This what I get:
> x
NULL
I would, however, like to store in x the seasonal component.
Thanks in advance. Francisco.
--
Francisco
2005 Dec 07
2
Change labels of x-axes in Plot of stl() function?
Hi all,
How can the label of the x-axes in the plot() of a stl.object be adapted?
e.g.,
When plotting: plot(stl(nottem, "per"))
In the labels of the x-axes is “time”. How can this be changed to e.g.,
“Time (dekade) “?
It does not work with xlab or others anymore…
Thanks,
Jan
_______________________________________________________________________
Ir. Jan Verbesselt
Research
2011 Jan 11
0
Add line to plot from stl decomposed time series?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
I would like to add a line to the plot of the data panel of a stl
decomposed time series.
Example:
plot(stl(nottem, "per"))
plots a 4(or is t 8?) panel graph. I thought that I might be able to use
mfg to plot in the top (left?) panel ("data"), but it is not working.
Any help appreciated,
Rainer
- --
Rainer M. Krug,
2006 Apr 26
1
stl function
Hi,
I have a monthly time series with missing values and I would use stl function to identify seasonality.
I tried all settings of na.action but the result is the same:
stl(tm245,s.window=11, na.action=na.pass)
Error in stl(tm245, s.window = 11, na.action = na.pass) :
NA/NaN/Inf in foreign function call (arg 1)
Can you help me?
Thanks
Andrea Toreti
[[alternative HTML version
2006 Jul 13
1
ts and stl functions - still a problem
Hi
I am still having problems with using the stl function, when I read the csv file into R into a file called tkr and use dim(tkr) the result is 132 1 which is fine.
When coerce it into a trime series using ts either:
tstkr <- ts(t(tkr), deltat=1/12) or
tstkr <- ts(c(tkr), deltat=1/12)
and use the stl function I get the following error:
Error in
2002 Apr 15
1
Re: Writting R Function
Hi,
I think I found the problem. It lies in my Fortran program. Is there a
way, after a DO loop, to make sure it does NOT return anything?
Cheers,
Kevin
On Mon, 15 Apr 2002, Ko-Kang Kevin Wang wrote:
> Date: Mon, 15 Apr 2002 17:27:20 +1200 (NZST)
> From: Ko-Kang Kevin Wang <kwan022 at stat1.stat.auckland.ac.nz>
> To: R Help <r-help at stat.math.ethz.ch>
> Subject:
2010 Feb 07
2
predicting with stl() decomposition
Hi mailinglist members,
I’m actually working on a time series prediction and my current approach is
to decompose the series first into a trend, a seasonal component and a
remainder. Therefore I’m using the stl() function. But I’m wondering how to
get the single components in order to predict the particular fitted series’.
This code snippet illustrates my problem:
series <-
2009 Nov 05
1
Build recommended packages from source under Windows
Hello,
>From the date time stamps I see that not only do I have the results of the build in 'gnuwin32/front-ends' but I can also see the time stamps have changed in the main bin directory so I assume that the result of 'make all recommended' also copies the results there.
Now on to the packages. I was interested in following the flow of 'stl' so I added the following
2003 Oct 22
1
Help with STL function in R compared to S-Plus
I am trying to understand the nuances of STL (seasonal trend
decomposition with loess) based on William Cleveland's (and others?)
original development. I do not understand the specification or use of
"frequency components" or equivalent "low-pass filter" components in
the stl() function.
I have run the stl() function on a standard example data (co2) in both
S-Plus and
2002 May 10
1
barplot()
Hi,
Is it possible to draw barplot with x-axis being shown? I looked up the
help file and I couldn't seem to find it.
For example, I tried to do
x <- 1:9
p <- log10(1 + 1/x)
barplot(p, xlab = "Digit d", ylab = "Probability",
ylim = c(0, 0.35), axes = F,
main = "Benford's Law Probability")
axis(1, 1:9)
axis(2, seq(0, 0.35, by = 0.05),
2002 Jul 03
0
R Guide for Windows Users
I've just completed(?) an R Guide for Windows users. It was extended from
my "Compile R for Windows" that I put up a few months ago. To get it go
to http://www.stat.auckland.ac.nz/~kwan022/rinfo.php
Here is the table of contents:
1 Introduction
2 Installation
2.1 Installing R Base
2.2 Installing packages
3 Running R
3.1 Rgui
3.2 Rcmd
3.3 Rterm
4 Comile
2002 May 06
4
Subtitle?
Hi,
Is it possible to add a subtitle that appears directly below the main
title?
I tried the "sub" parameter, but it adds sub-title to the bottom of the
plot.
Cheers,
Kevin
------------------------------------------------------------------------------
Ko-Kang Kevin Wang
Postgraduate PGDipSci Student
Department of Statistics
University of Auckland
New Zealand
Homepage:
2002 Apr 09
1
Fortran (77) in R
Hi,
I'm learning Fortran and trying to load a Fortran subroutine into R.
I've done:
R SHLIB Fibonacci.f
and it compiled fine.
Then I went into R and done:
> dyn.load("Fibonacci.so")
> Fib <- function(n) {
+ .Fortran("Fibonacci",
+ as.integer(n))[[1]]
+ }
> Fib(5)
Error in .Fortran("Fibonacci", as.integer(n)) :
2002 May 06
3
Using Object's Name in Function
Hi,
Suppose I have a function:
myfunc <- function(x, y) {
...
}
And within the function I want to print out the name of the x, y
vectors. For example, if I do:
> myfunc(foo, goo)
[1] "foo" "goo"
It shall return "foo", "goo" (with or without quotes is fine), where foo
and goo are two vectors with numbers.
I know this sounds strange, but I'd
2002 Jun 08
2
More on for() Loop...
Hi,
Say I want to do something like fitting 10 different sized trees with
rpart() function. The only modification I need to do is to set 10
different cp's, which I have in a vector called foo.
Can I do something like:
for(i in 1:10) {
rpart(y ~ ., cp = foo[i], data = mydata)
}
My problem is, I wish to save the 10 rpart objects into 10 different
names, my.rpart1 ~ my.rpart10, for
2002 May 25
2
Ploting in for() loop
Hi,
Suppose I have a for() loop that draws 6 boxplots as follows:
par(mfrow = c(2, 3))
for(i in 2:length(spam.sample)) {
boxplot(split(spam.sample[,i], yesno))
}
Where spam.sample is a data frame with 7 columns, and I'm interested in
plotting column 2 ~ 7 against column 1 (yesno).
The boxplots appeared fine, however I'm trying to add a meaningful title,
x and y labels to them.
2002 Sep 18
2
More on list to data frame (was: Re: List to Data Frame
Hi,
Now suppose I have just one list called FOO, which has 25 objects, e.g.:
[[1]]
1 2 3 4 5
[[2]]
6 7 8 9 10
.
.
.
And I want to do something like:
FRED <- data.frame(cbind(unlist(FOO[[1]]),
unlist(FOO[[2]]),
# ... for all 25 subsets
))
Is it possible to do this, without doing unlist(FOO[[i]]) 25
2003 Nov 27
0
stl and NA
Hi,
I try to figure out what the stl-function exactly do.
I was reading the paper by Cleveland et al. (1990) and tested some features of stl (the ability to decompose time series with missing values and the robustness feature).
I tried the following:
> data(co2)
> co2.na <- co2
> is.na(co2.na[c(50, 100)]) <- TRUE
> plot(stl(co2.na, s.window = 12, na.action = na.exclude))
With
2001 May 26
1
about s.window in stl
Hi,
Is there anybody who could explain a little bit the use of s.window and
t.window in STL. If I decompose a series using the default values, I get a
very irregular trends, but if I play with the options, I get less rare
trends. If anybody can explain me the concepts behind these options I will
appreciate a lot. I'm not a mathematician ;-)
Thanks in advance
Cheers,
Antonio
Antonio
2009 Oct 16
0
Problem with the stl function
Hi there,
My name is Renan X. Cortes, student of Statistics, from south of Brazil, and I'd
like to ask you a few questions about decomposition of time series.
In R, when I fit the decomposition using the "stl" function, an
object is returned when ask the summary of the fit, called STL.seasonal (%),
STL.trend (%) and STL.remainder (%).
Once the decomposition is additive,