Cross Sectional Average of a TimeSeriesCollection

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
rohans
Posts: 4
Joined: Wed Jul 07, 2010 3:07 am
antibot: No, of course not.

Cross Sectional Average of a TimeSeriesCollection

Post by rohans » Thu Jul 08, 2010 3:12 am

I'm looking to calculate the average of a collection of time series (cross-sectionally) all defined over the same periods. Is there a library method that does this?

So for example I want to calculate the average for 01-Jun over a set of series and then the average for 02-Jun etc..

The Staistics package will be useful to actually do the calculations but i was hoping there was a library function that takes a TimeSeriesCollection

http://www.jfree.org/jfreechart/api/jav ... stics.html

What about calculating the standard deviation of a collection of time series?

rohans
Posts: 4
Joined: Wed Jul 07, 2010 3:07 am
antibot: No, of course not.

Re: Cross Sectional Average of a TimeSeriesCollection

Post by rohans » Thu Jul 08, 2010 3:23 am

Just realised this will be easier if we can get a cross sectional slice of values from a TimeSeriesCollection object;

as an example:

Code: Select all

Number[] slice = timeSeriesCollection.getValues(RegularTimePeriod period)
Statistics.calculateMean(slice)

SomeAwesomeGuy
Posts: 8
Joined: Tue Jul 06, 2010 4:18 pm
antibot: No, of course not.

Re: Cross Sectional Average of a TimeSeriesCollection

Post by SomeAwesomeGuy » Tue Jul 20, 2010 11:41 pm

Did anyone ever figure this out?

Locked