Displaying 20 results from an estimated 40000 matches similar to: "plotting question"
2018 Mar 13
2
Understanding TS objects
R Help Community
I'm trying to understand time series (TS) objects. Thought I understood but recently have run into a series of error messages that I'm not sure how to handle. I have 15 years of quarterly data and I typically create a TS object via something like...
data.ts <- ts(mydata, start = 2002, frequency = 4)
this create a matric as opposed to a vector object as I receive a
2010 Oct 12
1
Help with STL function to decompose
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
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
2006 Oct 12
3
ts vs zoo
> Hello,
>
> I have lots of data in zoo format and would like to do some time
> series analysis. (using library(zoo), library(ts) )
>
> My data is usually from one year, and I try for example stl() to find
> some seasonalities or trends.
>
> I have now accepted, that I might have to convert my series into ts()
> but still I am not able to execute the comand since
2011 May 18
1
Multiple plots on one device using stl
G'day,
I am looking at monthly reports, and have three series of monthly data from 2007 to 2009. I would like to show the season decomposition of these two series side by side on the one device, however using plot doesn't seem to respect any use of layout(matrix(1:3, ncol=3)) or par(mfcol=c(1,3)).
I'm guessing that this means that the plot(stl) perhaps uses them, but I can't find
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
2011 Dec 01
3
Assign name to object for each iteration in a loop.
Hi R-users,
I'm trying to produce decompositions of a multiple time-series, grouped by a
factor (called "area"). I'm modifying the code in the STLperArea function of
package ndvits, as this function only plots produces stl plots, it does not
return the underlying data.
I want to extract the trend component of each decomposition
("x$time.series[,trend]), assign a name
2003 Jul 30
2
STL- TimeSeries Decomposition
Dear R Helpers,
Currently I'm working with the ts package of R and created a TimeSerie
from pixels extracted from satellite imagery(S10 NDVI data, 10 daily
composites). I'm trying to decompose this signal in different signals
(seasonal and trend).
When testing out the STL method is says => Only univariate timeseries
are allowed, but the current Timeserie I'm using is univariate!
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 <-
2005 Jun 30
2
ts.plot data labels
Dear R users,
I am trying to put labels on the data points on a ts.plot.
I have tried:
ts.plot(df.ts, gpars=list(xy.labels=colnames(df.ts), xlab="group", ylab="level"))
which plots fine but gives no labels
xy.labels=TRUE
also plots without labels
I also tried using text() but got an error
Error in xy.coords(x, y, recycle = TRUE) :
Argument "x" is
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
2011 Dec 14
1
series temporales. índices de variación estacional
Hola.
Estoy empezando a ver temas de series temporales y me gustaría saber
como obtener con R los IVES (índices de variación estacionales).
Por el momento estoy viendo cosas muy simples, como descomponer una
serie en tendencia y componente estacional, usando la función decompose
y también la función stl.
Por ejemplo
# generamos 48 datos de una normal por ejemplo
x <- rnorm(48)
# creamos el
2008 Sep 02
2
More help with stl?
I don't understand the output of stl. As a simple example:
y <- numeric(1:365)
y[250] = 1
stl <- stl(ts(y, frequency=7), s.window="periodic")
This returns without error but the results are puzzling to me. If you plot the results it is probably easiest to visualize what I mean.
plot(stl)
This shows the original data (a single spike at 250). A trend (which also shows a bump
2005 Jul 18
2
how to change bar colours in plot.stl
Dear helpeRs,
Is it possible to change the shading colour of the range bars in the plot
generated by plot.stl? By default they are grey, but I would prefer them
white (I am preparing some graphics for a powerpoint presentation so I'm
inverting all colours).
As far as I can see plot.stl allows you to turn off the range bars, but
nothing about the shading colour. I tried to look at the
2011 Jan 18
1
Semi-Regular Time Series with Missing Values
Hi,
I'm trying to make a ts object that has both NA values and a frequency other
than 1 (so I can use stl). I've tried all permutations I can think of, but
cannot get the desired (expected?) results.
The values live in x and the corresponding semi-regular time stamps are in
t:
> library('zoo')
> z = zoo(x, order.by=t, frequency=24)
> zzr = as.zooreg(z, start=0)
> zr
2008 Jul 15
1
methods/namespaces/possible bug
Using
> methods("plot")
[1] plot.Date* plot.HoltWinters* plot.POSIXct*
[4] plot.POSIXlt* plot.TukeyHSD plot.acf*
[7] plot.data.frame* plot.decomposed.ts* plot.default
[10] plot.dendrogram* plot.density plot.ecdf
[13] plot.factor* plot.formula* plot.hclust*
[16] plot.histogram* plot.isoreg* plot.lm
[19] plot.medpolish*
2006 Jan 10
1
Find last row (observation) for each combination of variables
Let's say I have a data.frame like
A B C TS other columns
1 1 1 12345
1 1 1 56789
1 2 1 23456
1 2 2 23457
2 4 7 23458
2 4 7 34567
2 4 7 45678
and I want the last row for each unique combination of A/B/C, where by "last" I mean greatest TS.
A B C TS other columns
1 1 1 56789
1 2 1 23456
1 2 2 23457
2 4 7 45678
I did this simply in SAS:
proc sort data=DF;
by A B C descending TS
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
2011 Mar 04
3
Análisis de una serie temporal diaria
Hola a todos
Estoy tratando de analizaruna serie temporal con datos diarios de
temperaturas (40 años). He creado un objeto zoo (con ayuda de la lista,
gracias) sobre el que encuentro la regresión lineal. He probado también
a crear un objeto ts a partir del zoo. El problema que encuentro es que
nose puede aplicar la función stl para hallar la componente estacional y
la tendencia. Rdice que la
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