asl/rssa — pull request #13 by eodus (2013-01-27 00:18:45+00:00)
Title: Centering single

Dear Anton!

I add reconstruction for centering and forecast for row-centering (exactly as in GNZ2001 book).

I try to exclude ANY copypaste and use existing methods for 1dssa. And I had some success =) But I was coerced to add some fixes in some existing methods. At first, for singular case when 'group' == c() (It's really needed sometimes). At second, I added offset to LRR (as an attr) .

You can use following example (for syntax):
library(Rssa)
ss <- ssa(rep(1, 100) + sin(1:100) + rnorm(100, sd = 0.0001), L = 50, neig = 10, kind = "ro", svd.method = "e")

ff <- rforecast(ss, groups = list(0), len = 100)
ff <- rforecast(ss, groups = list(0:2), len = 100)
ff <- vforecast(ss, groups = list(0:2), len = 100)
plot(ff$F1)

"Zero" means ALL "special" (non SVD) components. Such components numbered by negative numbers (-1 for row centering, -2 for column one). This notation was invented by me and NG (but invented after midnight, so your critics will be pleasured)
In reconstruct it works too.
So, you can extract col-centering only by something like:
reconstruct(ss, gro = list(-2))$F1;

Alex.