Displaying 20 results from an estimated 100 matches similar to: "ts and stl functions - still a problem"
2006 Jul 12
1
ts and stl functions
Hi,
I have imported a csv file into R which contains one column (the rate er 100,000 population of a disease, by month over 11 years) I coerced into a time series using the following function,
tstkr<-ts(tkr,deltat=1/12)
This seems to work fine, and when I check for the class of the object using class(tstkr) I get "ts" as the response.
When I try to use the stl function in
2006 Jul 12
0
ts command and stl function
Hi,
I have imported a csv file into R which contains one column (the rate er
100,000 population of a disease, by month over 11 years) I coerced into
a time series using the following function,
tstkr<-ts(tkr,deltat=1/12)
This seems to work fine, and when I check for the class of the object
using class(tstkr) I get "ts" as the response.
When I try to use the stl function in stats
2012 Mar 05
1
index instead of loop?
Hello,
Does anyone know of a way I can speed this up? Basically I'm attempting to
get the data item on the same row as the report date for each report date
available. In reality, I have over 11k of columns, not just A, B, C, D and
I have to do that over 100 times. My solution is slow, but it works. The
loop is slow because of merge.
# create sample data
z.dates =
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
2004 Jul 21
2
Testing autocorrelation & heteroskedasticity of residuals in ts
Hi,
I'm dealing with time series. I usually use stl() to
estimate trend, stagionality and residuals. I test for
normality of residuals using shapiro.test(), but I
can't test for autocorrelation and heteroskedasticity.
Is there a way to perform Durbin-Watson test and
Breusch-Pagan test (or other simalar tests) for time
series?
I find dwtest() and bptest() in the package lmtest,
but it
2012 Mar 03
0
removing data look-ahead, something faster.
Hello,
Thank you for your help/advice!
The issue here is speed/efficiency. I can do what I want, but its really
slow.
The goal is to have the ability to do calculations on my data and have it
adjusted for look-ahead. I see two ways to do this:
(I'm open to more ideas. My terminology: Unadjusted = values not adjusted
for look-ahead bias; adjusted = values adjusted for look-ahead bias.)
1) I
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
2002 Oct 17
4
Newbie Time Series Questions
I have a data set of monthly river flows from 1960-2000, which are
similar in structure to the nottem data:
> klam.flow
Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep
1961 1461 1716 2524 1773 1906 2005 1756 1575 1387 983 1094 1382
1962 1907 2253 1985 1907 1769 1676 2634 1386 929 766 968 1309
...
I tried plotting with
> ts.plot(klam.flow)
Which quickly led me to
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
2002 Jan 28
2
R/Tk from batch file
Dear R-help,
Reccently I've been working on sample size estimates for our forensic
scientists and have to make the work accessible to them, preferably
in some Windows based graphical form. The obvious choise was Tk via R,
so I now have a couple of very nice, user friendly front ends for
calculating betas and beta-binomials which run equally well under
Windows and other systems (same code -
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
2005 Feb 02
4
(no subject)
can you recommend a good manual for R that starts with a data set and gives
demonstrations on what can be done using R? I downloadedR Langauage
definition and An introduction to R but haven't found them overly useful.
I'd really like to be able to follow some tutorials using a dataset or many
datasets. The datasets I have available on R are
Data sets in package 'datasets':
2008 Apr 04
1
Problems with Unit Root testing using ur.df function
Hi All,
I'm new to R and am trying to run a unit root test on the vector "y" (a time
series of inflation (i.e. changes in the Consumer Price Index quarter on
quarter)).
I've run the Augmented-Dickey-Fuller Test below (R's URCA package). It gives
me an error that it cannot find the function ur.df unless I comment out the
third last line of code (see below).
I try to call
2007 Jun 21
0
use ts objects within the "seas" package for seasonal stats ; to compare years with each other for change detection
Hi all,
Does anyone know how ts objects ts(base) can be used within the 'seas'
package? I would like to obtain seasonal statistics of regular
time-series and for example look at the result of the plot.seas.var()
function or use the change function() to look at change between periods
or time-series.
The nottem time-series are similar to the time-series we are analyzing
(but with
2005 Mar 05
1
Object containing different classes
Hi,
i want to create an object which contains different classes: for example i
have some time series and test if ARIMA models are best than HoltWinters
models: for each of my time serie i want to collect in an unique object
which model was the best: for some it will be an HoltWinters class and for
some other an Arima class.
is there any solution?? thanks in advance, with my best, erik sauleau
2004 Feb 06
1
nnet problem
Hello everybody,
I want to use the nnet library and my problem is that the algorithm seems
to accept only class as target when the neural is fiiting. So the output
when I use predict.nnet is also a class. Is it possible to have numeric
variable as target ? If yes, what is the syntax ?
Thank you.
Cordialement,
R?gis CHARIGNON
2007 May 29
0
Function tsmooth
Hi,
Assume that we may model the Nottingham temperature data (nottem) or Sunspot
data (sunspot) set by a nonparametric autoregressive model of the form
Yt = m(Yt-1) + et.
Using the kernel estimation method, produce the resulting plots. We may use
the fucntion
tsmooth(x,y,"notmal",bandwidth=0.01).
How can i define x and y using data nottem and sunspot?
2002 Oct 09
1
s.window in stl()
Hi,
This is actually a theory question.
I'm a bit confused by the s.window parameter in the stl() function (which
is in the ts package). For example, in the stl documentation it uses the
nottem data, and then:
plot(stl(nottem, s.win = 4, t.win = 50, t.jump = 1))
What does it mean by s.win = 4? Is it because a year has 4 seasons
(namely Spring, Summer, Autumn and Winter)? If so will it
2005 Mar 24
0
critical value for HEGY test in uroot
R-users,
i have some time series and use HEGY seasonal UR tests in the uroot package.
But i have problems with interpretation of t and F statistics. Is there any
critical values for these tests in R? is anybody ever write a bootstrap of
these tests?
thanks for advance, with all my bests, erik.
=================================
Erik-André SAULEAU
SEAIM
Centre Hospitalier
87, Avenue
2005 Jan 11
0
StructTS
Dear R-list,
I try to use StructTS for some univariate time series, with a type="BSM". I
have two questions:
1-in the "fitted" value of the object, it seems to me that for getting back
fitted values, one have to add level, slope and seasonal (or "level"
contains already the two other ones)
2-i am really circumspect about the results of "KalmanForecast"