# Signal with trend + seasonal + noise
t <- seq(0, 10, length.out = 200)
X <- matrix(0.05 * t + sin(2 * pi * t / 1.5) + rnorm(length(t), sd = 0.3), nrow = 1)
fd <- fdata(X, argvals = t)
# Perform SSA
result <- ssa.fd(fd)
print(result)
# Plot components
plot(result)
# Examine singular value spectrum (scree plot)
plot(result, type = "spectrum")
Run the code above in your browser using DataLab