[R] Rolling range and regression calculations

From: rcoder <mpdotbook_at_gmail.com>
Date: Thu, 24 Jul 2008 18:07:58 -0700 (PDT)

Hi everyone,

I want to calculate a min and max (i.e. range) on a rolling time frame of 50 periods for a matrix with the number of periods extending along the row direction. So for 300 periods, there will be 6 time frame windows per column, and 6 min max pairs. I then want to o/p these pairs to a separate matrix.

On a separate matter, I have a matrix containing data on which perform a regresssion over a rolling time period. Is there a convenient way I can do this for each column, and then save the gradient to an o/p matrix?



View this message in context: http://www.nabble.com/Rolling-range-and-regression-calculations-tp18643465p18643465.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 25 Jul 2008 - 02:43:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Jul 2008 - 11:32:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive