Description Usage Arguments Note See Also Examples
This is a plotting method for objects of class functional singular spectrum analysis (fssa
). The method is designed to help the user make decisions
on how to do the grouping stage of univariate or multivariate functional singular spectrum analysis.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
x |
an object of class |
d |
an integer which is the number of elementary components in the plot |
idx |
a vector of indices of eigen elements to plot |
idy |
a second vector of indices of eigen elements to plot (for type="paired") |
contrib |
a logical where if the value is 'TRUE' (the default), the contribution of the component to the total variance is displayed |
groups |
a list or vector of indices determines grouping used for the decomposition(for type="wcor") |
type |
the type of plot to be displayed where possible types are:
|
var |
an integer specifying the variable number |
ylab |
the character vector of name of variables |
... |
arguments to be passed to methods, such as graphical parameters |
for a multivariate example, see the examples in fssa
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ## Not run:
## Simulated Data Example
require(Rfssa)
require(fda)
n <- 50 # Number of points in each function.
d <- 9
N <- 60
sigma <- 0.5
set.seed(110)
E <- matrix(rnorm(N*d,0,sigma/sqrt(d)),ncol = N, nrow = d)
basis <- create.fourier.basis(c(0, 1), d)
Eps <- fd(E,basis)
om1 <- 1/10
om2 <- 1/4
f0 <- function(tau, t) 2*exp(-tau*t/10)
f1 <- function(tau, t) 0.2*exp(-tau^3) * cos(2 * pi * t * om1)
f2 <- function(tau, t) -0.2*exp(-tau^2) * cos(2 * pi * t * om2)
tau <- seq(0, 1, length = n)
t <- 1:N
f0_mat <- outer(tau, t, FUN = f0)
f0_fd <- smooth.basis(tau, f0_mat, basis)$fd
f1_mat <- outer(tau, t, FUN = f1)
f1_fd <- smooth.basis(tau, f1_mat, basis)$fd
f2_mat <- outer(tau, t, FUN = f2)
f2_fd <- smooth.basis(tau, f2_mat, basis)$fd
Y_fd <- f0_fd+f1_fd+f2_fd
L <-10
U <- fssa(Y_fd,L)
plot(U)
plot(U,d=4,type="lcurves")
plot(U,d=4,type="vectors")
plot(U,d=5,type="paired")
plot(U,d=5,type="wcor")
plot(U,d=5,type="lheats")
plot(U,d=5,type="periodogram")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.