Displaying 20 results from an estimated 8000 matches similar to: "Aggregating frequency of irregular time series"
2008 Oct 20
4
aggregating along bins and bin-quantiles
Dear all,
I would like to aggregate a data frame (consisting of 2 columns - one
for the bins, say factors, and one for the values) along bins and
quantiles within the bins.
I have tried
aggregate(data.frame$values, list(bin = data.frame
$bin,Quantile=cut2(data.frame$bin,g=10)),sum)
but then the quantiles apply to the population as a whole and not the
individual bins. Upon this
2004 Mar 25
1
S+Finmetrics cointegration functions
Dear all,
S+Finmetrics has a number of very specilised functions. I am
particularly interested in the estimation of cointegrated VARs (chapter
12 of Zivot and Wang). In this context the functions coint() and
VECM() stand out. I looked at package "dse1", but found no comparable
functionality. Are there any other packages you could point me to? In
general, are there efforts for
2004 Mar 02
2
Stuck in trying to convert repetitive code into a function
Folks,
I have the following repetitive code which works correctly:
A = read.table(file="junior.csv", sep=",", col.names=c("date", "l"));
A$date = chron(as.character(A$date), format="m/d/y");
r.junior = levels2weeklyret(lastfriday, A$date, A$l);
plot(A$date, A$l, type="l", col="red", main="Junior levels")
2008 Nov 11
2
Manipulation in timeSeries object:how to use the function "applySeries" by daily?
Hi all
I have some tick-by-tick data and I have calculated the intraday returns. I
want to sum up the intraday squared returns to calculate the daily
volatility(or daily variance). I know that the s-plus FinMerics has the
function aggregateSeries function that can be apply to daily data:
aggregateSeries(x, Fun, by="daily"), but the counterpart function in
R:applySeries can not be apply
2009 Aug 18
1
aggregating values at discreet irregular time intervals into hourly values
Hello R users,
I'm a newby to R (and programming software at large) and I would need some help to sum up event data at discreet time and irregular time interval into a hourly frequency.
Here is an example of my time series frame (irregular time-serie object - irts in the tseries package):
time value
2008-12-19 19:11:03 GMT 1
2008-12-19 19:12:00 GMT 0
2008-12-19
2004 Sep 22
5
block statistics with POSIX classes
I have a monthly price index series x, the related return series y = diff(log(x)) and a POSIXlt date-time variable dp. I would like to apply annual blocks to compute for example annual block maxima and mean of y.
When studying the POSIX classes, in the first stage of the learning curve, I computed the maximum drawdown of x:
> mdd <- maxdrawdown(x)
> max.dd <- mdd$maxdrawdown
> from
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
2011 Apr 29
1
Handling of irregular time series in lineChart
Hi,
I realized that when I have irregular series to feed into lineChart,
the interval of each point in the chart does not seem to take care of
irregular time interval I specified in my input xts time series. But
rather, lineChart seems to take each point as equal spaced time
series. For example, I have the following code:
library(quantmod)
options(digits.sec=3)
t0 <-
2008 Apr 17
1
Moving from Splus to R: irregular and regular time series
Dear R developpers,
I am a user of Splus since many years and I have developped lots of
functions to plot graph of data and model results of irregular or
regular times series.
In Splus regular times series are created using the rts function and
irregular time series using the its functions. In both cases, times is
given as a numeric vector.
There is no problem in plotting a regular and an
2005 May 13
1
where is aggregateSeries
What package is aggregateSeries in?
It is referred to in the fCalendar document but I do not see it in the package.
2007 Feb 12
2
help with tryCatch
Could smb please help with try-catch encapsulating a function for
downloading. Let's say I have a character vector of symbols and want to
download each one and surround by try and catch to be safe
# get.hist.quote() is in library(tseries), but the question does not
depend on it, I could be sourcing local files instead
ans=null;error=null;
for ( sym in sym.vec){
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
2004 Jan 02
3
Importing Excel/Openoffice Dates into R
Hi,
I would like to import some daily financial data from excel via csv.
More specifically, I would like to be able to use the ts.union function
from the tseries library as the dates are irregular and I need to line
up the dates so that I can place all the variables into one data frame.
The trouble is, how do I import the dates from excel into R? At the
moment I'm just importing the data
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
2005 Apr 19
1
type.convert error with read.csv function
Dear all,
I obtained and successfully compiled R 2.1.0 on Mac OSX 10.3.9. The
flags used for configuration are:
./configure --enable-utf8 --enable-R-shlib --with-blas='-framework
vecLib' --with-lapack --with-aqua
--with-tcl-config=/Library/Frameworks/Tcl.framework/tclConfig.sh
--with-tk-config=/Library/Frameworks/Tk.framework/tkConfig.sh
TCLTK_LIBS='-framework Tcl -framework
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
2006 Aug 28
1
Help on function adf.test
Hello everybody,
I've got a matrix called EUROPEDATA and I want to calculate the adf test statistic (part of the tseries package) on a rolling basis for window my.win on each column; i.e. each column of EUROPEDATA represents a particular variable; for the first column I calculate the adf test statistic for window my.win = 60 for example, roll forward one observation, calculate the adf
2003 May 18
2
irregular ts plot?
hi guys: sorry, one more. I have irregularly spaced time series, often
with big gaps. a good analogy is:
tsvec <- ts(c(1,NA,2,NA,1, NA, 2),freq=12, start=c(1965,12))
Unfortunately, plot( tsvec ) does not plot the data. is it possible to
convince plot to just ignore the NA items (either with points or lines)
help appreciated.
/iaw
2004 Nov 06
1
calendar-based time-series in R
Hello,
I am trying to switch to R from S-PLUS 6.1, and one problem I am having is
using R for manipulation of calendar-based time-series. In S-PLUS, I
commonly use the functions timeSequence(), timeDate(), and timeSeries() to
align/average/aggregate data; and I also do a lot of plotting of
time-series data (with calendar-based labels on the x-axis).
I was wondering if anyone is familiar with
2018 Jan 30
2
Could the Odds represent weight in Generalized Linear Model?
Hello all,
I'm sorry if my question seems basic.
Im studying a responses (Yes,No) in a survey and, thanks to GLM I obtain
the following relation with my variables : (Yes,No)~ ?0 + Age We note this
this certain type of (Yes,No) response is linked to age (p<0.05 in glm) .
After that we calculated :
model1=glm(cbind(Yes,No) ~ Age + Times + Type, family=binomial)
summary(model1)