Last chance! 50% off unlimited learning
Sale ends in
"wcor"(x, groups, Fs, ..., cache = TRUE)
"wcor"(x, groups, Fs, ..., cache = TRUE)
"wcor"(x, L = (N + 1) %/% 2, ..., weights = NULL)
"plot"(x, grid = c(), ..., col = grey(c(1, 0)), cuts = 20, zlim = range(abs(x), 0, 1), at)
x
will be used.reconstruct
routine
for wcor
or to plot
for plot.wcor.matrix
colorRamp
)cuts
argument).Additional (non-standard) graphical parameters which can be transfered via ...:
For class `ossa', checking of Frobenius orthogonality is performed.
If there are reconstructed matrices, which are not F-orthogonal
(it is a usual case for Oblique SSA), the warning about possible irrelevancy will be shown,
since then weighted correlations do not indicate weak separability properly.
In such a case, the use of
owcor
is preferred.
reconstruct
owcor.
# Decompose co2 series with default parameters
s <- ssa(co2)
# Calculate the w-correlation matrix between first 20 series
# for a guess for grouping
w <- wcor(s, groups = 1:20)
plot(w, grid = c(2,4, 5,7))
# Calculate the w-correlation matrix for the chosen groups
# to check separability
w <- wcor(s, groups = list(c(1,4), c(2,3), c(5,6)))
# Artificial image for 2D SSA
mx <- outer(1:50, 1:50,
function(i, j) sin(2*pi * i/17) * cos(2*pi * j/7) + exp(i/25 - j/20)) +
rnorm(50^2, sd = 0.1)
# Decompose 'mx' with default parameters
s <- ssa(mx, kind = "2d-ssa")
# Plot wcor for first 12 components
plot(wcor(s, groups = 1:12), grid = c(2, 6))
# Real example: Mars photo
data(Mars)
# Decompose only Mars image (without backgroud)
s <- ssa(Mars, mask = Mars != 0, wmask = circle(50), kind = "2d-ssa")
# Plot wcor for the first 25 components
plot(wcor(s, groups = 1:25), grid = c(13, 15, 17,19))
Run the code above in your browser using DataLab