[R] rolling regression between adjacent columns

rcoder mpdotbook at gmail.com
Wed Jul 30 00:15:12 CEST 2008


Hi everyone,

I am trying to apply linear regression to adjacent columns in a matrix (i.e.
col1~col2; col3~col4; etc.). The columns in my matrix come with identifiers
at the top of each column, but when I try to use these identifiers to
reference the columns in the regression function using rollapply(), the
columns are not recognised and the regression breaks down. Is there a more
robust way to reference the columns I need, so that I can apply the
regression across the matrix; 'by.column', but every other column?

Thanks,

rcoder
-- 
View this message in context: http://www.nabble.com/rolling-regression-between-adjacent-columns-tp18722392p18722392.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list