plot.odpc | R Documentation |
Plots an odpc
object.
## S3 method for class 'odpc' plot(x, which = 'Component', which_load = 0, ...)
x |
An object of class |
which |
String. Indicates what to plot, either 'Component' or 'Loadings'. Default is 'Component'. |
which_load |
Lag number indicating which loadings should be plotted. Only used if which = 'Loadings'. Default is 0. |
... |
Additional arguments to be passed to the plotting functions. |
odpc
T <- 200 #length of series m <- 10 #number of series set.seed(1234) f <- rnorm(T + 1) x <- matrix(0, T, m) u <- matrix(rnorm(T * m), T, m) for (i in 1:m) { x[, i] <- 10 * sin(2 * pi * (i/m)) * f[1:T] + 10 * cos(2 * pi * (i/m)) * f[2:(T + 1)] + u[, i] } fit <- odpc(x, ks = c(1)) plot(fit[[1]], xlab = '', ylab = '')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.