Displaying 20 results from an estimated 4000 matches similar to: "aggregating values at discreet irregular time intervals into hourly values"
2003 Jun 06
3
irregular time-series
I make quite a lot of use of irregular time-series, and had already spent a
bit of time writing an 'its' class when the 'irts' class was released via
the package 'tseries'.
I have experimented with the 'irts' class, and have some practical issues
with its use. In some applications of irregular time-series (in my case
these are financial and econometric) there are
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
2004 Jul 23
1
ts to irts
Hi R-list,
I'm working with irregular time series (time series of climate data,
daily data 365/6 days a year) and would like to create regular time
series from them ( irts
e.g. Rain <-
irts(as.POSIXct(Climate[,1]),Climate[,5])
to ts
e.g. test <- ts(x, start=c(1997,1), frequency=365) )
such that I can find where the gaps (lacking temperature data, ...) are
and try
2010 Sep 29
1
Trying to avoid loop structure
Dear R-helpers,
I'm trying to associate linear coefficients (intercept and slope) to tens of thousands of observations based on a table with benchmark values.
#####Example - Value table and their corresponding coefficients (intercept and slope)
coef = data.frame(cbind(st=c(1:5),b = runif(5,0.3,5),a = seq(0.5,5,1)))print(coef)
#Example of observations to be computedobs = runif(20,1,5)print(obs)
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
2004 Aug 09
1
Easy acf and pacf for irregular time series in R
R:
Is there an easy way to get the acf and pacf for an irregular times
series? That is, the acf and pacf with lag lengths that are in units of
time, not observation number.
Thanks,
Jason Higbee
Research Associate
Federal Reserve Bank of St. Louis
The views expressed in this email are the author's and not necessarily
those of the Federal Reserve Bank of St. Louis or the Federal Reserve
2009 Aug 30
2
aggregating irregular time series
Hi,
I have a couple of aggregation operations that I don't know how to
accomplish. Let me give an example. I have the following irregular
time series
time x
10:00:00.021 20
10:00:00.224 20
10:00:01.002 19
10:00:02:948 20
1) For each entry time, I'd like to get sum of x for the next 2
seconds
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
2011 Mar 24
2
Help with creating a ts (time series) object with daily sampling values
Hi All,
I have a data set of daily measurements of river flow. I would like to
create a "ts" object from this data.
Here's a sample data set:
date <- as.Date(c(1:300), format="%Y")
year=as.numeric(format(date, format = "%Y"))
month=as.numeric(format(date, format = "%m"))
julianday=as.numeric(format(date, format = "%j"))
2003 Mar 04
0
tseries contains a class for irregularly spaced time series
A new version of tseries (0.9-10) has been uploaded to CRAN. The new
version contains the class "irts" for irregularly spaced time series.
Irregular time series are basically time series where each observation
(uni- or multivariate) has a time-stamp represented by an object of
class "POSIXct". It provides some basic functionality such as reading
and writing irregular time
2003 Mar 04
0
tseries contains a class for irregularly spaced time series
A new version of tseries (0.9-10) has been uploaded to CRAN. The new
version contains the class "irts" for irregularly spaced time series.
Irregular time series are basically time series where each observation
(uni- or multivariate) has a time-stamp represented by an object of
class "POSIXct". It provides some basic functionality such as reading
and writing irregular time
2004 Apr 30
1
daily time series in R
I have some daily data and would like to apply some of the time series functions to it.
I have read various notes in the help archive on this, the latest I found suggested
that I need to use the irts class (Irregularly spaced time series) for daily data
since a year does not divide into an integer number of days.
I see why I would have to do that if I have gaps (e.g. only data on weekdays)
but
2002 Feb 11
2
Time Series ts() Objects
Hi,
Is it possible to create a ts() object, whose data is daily based BUT
measured only on working days?
In other words, suppose I have a data set with 255 observations, measured
from 29 June 1959 to 30 June 1960. How would I create such a data? I
tried something like:
ts(c(...), start(1959, 180))
but I'm not sure what to use for frequency. In other words I don't know
how to
2004 Aug 17
1
strptime() bug? And additional problem in package "tseries"
Hi all, I've got some problems with irts objects, one of which could be a bug:
1) Read a table with several columns from Postgres and the first column is
Timestamp with timezone (this is OK). An extract is:
raincida$ts:
[2039] "25/03/2000 22:00:00 UTC" "25/03/2000 23:00:00 UTC"
[2041] "26/03/2000 00:00:00 UTC" "26/03/2000 01:00:00 UTC"
[2043]
2009 Jun 28
1
testing an ARFIMA model for structural breaks with unknown breakpoint
Dear R users,
I'm trying to use the "strucchange" package to determine structural breaks
in an ARFIMA model.
Unfortunately I'm not so familiar with this topic (and worse, I'm a beginner
in R), so I don't know exactly how to specify my model so that the
"Fstats","sctest" and "breakpoint" functions to recognize it and to
calculate the
2004 Feb 23
6
Need help on parsing dates
I know this:
> library(date)
> x="1979-04-04"
> try=as.date(x, "ymd")
> print(try)
[1] 4Apr79
and that `x' here has to be a string, e.g.:
> x=1979-04-04
> print(x)
[1] 1971
I'm stuck in reading from a file. I say:
> A <- read.table(file="try")
> print(A)
V1 V2
1 1979-04-04
2005 Dec 29
1
R and read.irts
I thought r-help let you
attach asci files but
I don't think it does now
so below is a sample of my data set.
Thanks again.
09:40:08.5238,67.00,33
09:40:09.1968,67.00,2
09:40:09.7945,67.00,2
09:40:09.7975,67.00,2
09:40:09.8318,66.99,-3
09:40:17.6335,66.95,3
09:41:09.3393,66.95,6
09:41:11.1482,66.95,-1
09:42:07.4552,66.90,-5
09:42:12.5823,66.85,-5
09:42:14.4329,66.80,-2
2004 Mar 29
9
Aggregating frequency of irregular time series
> S-Plus has the function AggregateSeries() whose name is self
> explanatory. For instance one can derive monthly series from daily
> ones by specifying end-of-period, averages, sums, etc. I looked for
> a similar function in the packages "its" and "tseries", but found
> nothing. I also help.searched() for aggregate to no avail. Would
> anybody be so kind
2000 Apr 11
0
aggregate.ts (PR#514)
aggregate.ts does not behave in the same way as the equivalent
method aggregate.rts in S-PLUS. In particular it
- changes the start of the time series
- tends to have a length which is 1 shorter
For example:
R> x <- ts(1:10)
R> aggregate(x, nfreq=0.5, FUN=min)
Time Series:
Start = 2
End = 8
Frequency = 0.5
[1] 2 4 6 8
S> x <- rts(1:10)
S> aggregate(x, nf=0.5, fun = min)
[1]
2003 Oct 22
2
High frequency time-series
Having to collect hourly electricity loads and quarter-of-an-hour electricity production data for some years I think that the tidiest way of doing it is to resort to ts but I don't know how to define such a frequency starting from a set date.
Leafing through r-help mail archives I've found this *ALMOST* satisfactory message:
==========================================================