Displaying 20 results from an estimated 4000 matches similar to: "aggregate.ts (PR#514)"
1999 Dec 16
1
aggregate.ts (PR#376)
I'm having some problems with aggregate.ts, e.g.
R> x <- ts(1:20)
R> frequency(x)
[1] 1
R> aggregate(x, nfreq=1/3)
Error in aggregate.ts(x, nfreq = 1/3) : cannot change frequency from 1 to
0.333333333333333
In fact aggregate.ts only accepts a new frequency that is a negative
power of two in this example.
The problem with the current test for compatible frequencies
if
1999 Jul 02
0
Bug in "[.ts" for multivariate ts {Problem with plot.ts, "[" (PR#217)
This message is in MIME format
--_=XFMail.1.3.p0.Linux:990702182137:16900=_
Content-Type: text/plain; charset=us-ascii
There was some discussion a while back on R-devel between Ross Ihaka,
Paul Gilbert and myself about row subsetting in time series. I think
the consensus was that "[.ts" should not try to coerce its result
back to a time series object (which is underlying the problem
2007 Jul 25
3
aggregate.ts
Consider the following scrap of code:
> x<- ts(1:50,start=c(1,11),freq=12)
> y <- aggregate(x,nfreq=4)
> c(y)
[1] 6 15 24 33 42 51 60 69 78 87 96 105 114 123 132 141
> y
Error in rep.int("", start.pad) : invalid number of copies in rep.int()
> tsp(y)
[1] 1.833333 5.583333 4.000000
So we can aggregate into quarters, but we cannot print it using
2007 Jul 25
3
aggregate.ts
Consider the following scrap of code:
> x<- ts(1:50,start=c(1,11),freq=12)
> y <- aggregate(x,nfreq=4)
> c(y)
[1] 6 15 24 33 42 51 60 69 78 87 96 105 114 123 132 141
> y
Error in rep.int("", start.pad) : invalid number of copies in rep.int()
> tsp(y)
[1] 1.833333 5.583333 4.000000
So we can aggregate into quarters, but we cannot print it using
1997 Aug 25
0
R-alpha: ts problems
This message is in MIME format
--_=XFMail.1.1.p0.Linux:970825095458:252=_
Content-Type: text/plain; charset=us-ascii
Here is a patch which fixes some problems with time series functions.
Some examples of what goes wrong...
> x <- ts(rnorm(100),start=1,deltat=2)
> start(x)
Error in ts[1] : object is not subsettable
> end(x)
Error in ts[2] : object is not subsettable
> y <-
2005 Jan 31
2
changing the time base in a ts
I'm probably apporaching this all wrong to start but....
Suppose I have a monthly time series and I want to compute the mean of
months 6,7, and 8. I want to plot the original time series and the
seasonal time series, one above the other. When I do that as below the
time series don't line up for reasons that are obvious. How can I
change the base of the seasonal time series so I can make
1997 Oct 23
0
R-beta: time series structures
>represented. They are now R "objects" similar to S-PLUS "rts"
>time series, but they are 3-dimensional arrays (iterations x variables
>x chains). This seems like the best choice of data structure to me
>but if someone else has thought more deeply about this tell me now
>before I rewrite all my code!
Martyn
A couple of years ago I wrote a kernel of routines
1999 Jul 27
3
Preliminary version of ts package
There is now a preliminary version of a time series package in the R-devel
snapshots, and we would welcome feedback on it. It is based in part on the
packages bats (Martyn Plummer) and tseries (Adrian Trapletti) and in part
on code I had or have written. (Thanks for the contributions, Martyn and
Adrian!) Some of the existing ts code has been changed, for example to plot
multiple time series, so
2010 Apr 20
1
bug in aggregate.ts
Hi,
I am getting unexpected behaviour from aggregate.ts(). The 'ndeltat'
argument is effectively being reduced by 1 in some cases, even when it
is an integer, with the result that the blocks to be aggregated are
not of the expected size, and also that the end() of the aggregated
series is much later than the end() of the original series.
rawts <- ts(rep(1:10, each = 5), start = 1)
##
2008 Jan 06
1
aggregate.ts help
Hi,
I have a ts object with a frequency of 4, i.e., quarterly data, and I would
like to calculate the mean for each quarter. So for example:
> ts.data=ts(1:20,start=c(1984,2),frequency=4)
> ts.data
Qtr1 Qtr2 Qtr3 Qtr4
1984 1 2 3
1985 4 5 6 7
1986 8 9 10 11
1987 12 13 14 15
1988 16 17 18 19
1989 20
If I do this manually, the mean
1999 Jul 02
1
Bug in "[.ts" for multivariate ts {Problem with plot.ts, "["} (PR#216)
>>>>> On Fri, 02 Jul 1999, Adrian Trapletti <Adrian.Trapletti@wu-wien.ac.at> said:
Adrian> There seems to be a problem with plot.ts (R Version 0.64.2)
> x<-cbind(1:10,2:11)
> x<-as.ts(x)
> plot(x)
Adrian> Error: subscript (20) out of bounds, should be at most 10
This is definitely a bug
--> CC: R-bugs
ALL NOTE : This is *not* new
2000 Apr 11
0
start.ts, end.ts (PR#513)
I'm having trouble with column-subsetting a multivariate time
series. The underlying problem is with start().
R> x <- ts(matrix(rnorm(100), ncol=2))
R> y <- aggregate(x, ndeltat=2)
R> y[,1]
Error in ts(y, start = start(x), freq = frequency(x)) :
invalid start
R> start(y)
[1] 2 1
R> frequency(y)
[1] 0.5
The point where the error occurs in ts() is:
1999 Aug 12
1
ts in R (again)
I have done a re-working of the time series code in base R and library
ts that will appear in Friday's snapshot. I am sure at least one
person will be dissatisfied, but I am convinced there are fewer
errors than there were before (I found more than 20, as well as several
documented features that did not exist.)
The principles in the code are:
tsp attributes can only go on vectors of length
2009 Feb 17
0
What's the predict procedure of ARIMA in R?
Hello,guys:
Recently, I am working on a seasonal ARIMA model. And I met some problem in the forecasting.
Now I just want to know that How does R perform the predict procedure(the predict formula, the initial setting of errors,etc.)?
I run the following commands and get the original code of the "predict" command, but I can't read it.
Can anybody explain it to me?
Thanks!
saji from
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
2011 Nov 02
1
kernapply.ts
I have a suggestion for kernapply for ts objects. When we choose the
option circular=F, the returned series don't have the correct dates. The
removed dates are all at the beginning instead of half at the beginning
and half at the end. It is particularly useful when we need to smooth
the series (or remove a trend using a filter) before estimating a model
(like in macroeconomics) or simply
2013 Mar 22
0
predict.Arima error "'xreg' and 'newxreg' have different numbers of columns"
Hello all,
I use arima to fit the model with
fit <- arima(y, order = c(1,0,1), xreg = list.indep, include.mean = TRUE)
and would like to use predict() to forecast:
chn.forecast <- rep(0,times=num.record)
chn.forecast[1] <- y[1]
for (j in 2:num.record){
indep <- c(aa=chn.forecast[j-1], list.indep[j,2:num.indep]) # this is the newxreg in the
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
2005 Jun 03
1
ts.intersect a multivariate and univariate ts
This seems like a FAQ, but I can't figure it out.
I have a mv ts object:
R > tsp(pg)
[1] 1982 2003 1
R > dim(pg)
[1] 22 12
and a univariate ts:
R > tsp(rw)
[1] 1690 1996 1
Yet, when I try to intersect them:
R > tsp(ts.intersect(rw, pg))
[1] 1982 2176 1
the process goes awry.
How to I get rw and pg to be one ts that runs from 1982 to 1996 and has 13
univariate time
1999 Jul 19
9
time series in R
Time Series functions in R
==========================
I think a good basic S-like functionality for library(ts) in base R
would include
ts class, tsp, is.ts, as.ts
plot methods
start end window frequency cycle deltat
lag diff aggregate
filter
spectrum, spec.pgram, spec.taper, cumulative periodogram, spec.ar?
ar -- at least univariate by Yule-Walker
arima -- sim, filter, mle, diag, forecast