components_odpcs: Get One-Sided Dynamic Principal Components From an odpcs...

Description Usage Arguments Value See Also Examples

View source: R/methodsODPC.R

Description

Get One-Sided Dynamic Principal Components from an odpcs object.

Usage

1
components_odpcs(object, which_comp = 1)

Arguments

object

An object of class odpcs, usually the result of odpc.

which_comp

Numeric vector indicating which components to get. Default is 1.

Value

A list whose entries are the desired dynamic principal components.

See Also

odpc, crit.odpc, cv.odpc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  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 = matrix(c(1, 1, 1, 0), 2, 2))
  comps <- components_odpcs(fit, which_comp = c(1, 2))

odpc documentation built on Nov. 16, 2020, 9:15 a.m.

Related to components_odpcs in odpc...