mr.T
mr.T

Reputation: 634

plotting of eigenvectors Rssa package

I'm trying to replicate the eigenvector plotting image from Rssa package

set.seed(1)
x <- cumsum(rnorm(200))

library(Rssa)
s <- ssa(x)
r <- reconstruct(s)

plot(s, t="paired")

enter image description here

But I get something completely different. What am I doing wrong?

par(mfrow = c(4,4), mar = c(2, 2, 2, 1))

n_comp = 5
    combn(n_comp, 2) |> 
      apply(MARGIN = 2, \(i)  plot(x= r[[  i[1]  ]], 
                                   y= r[[  i[2]  ]], 
                                   type = "l"))

enter image description here

Upvotes: 0

Views: 15

Answers (0)

Related Questions