Learn R Programming

ebdbNet (version 1.1)

sumFunc: Sum Function

Description

Helper function for hankel to determine what percentage of variance is explained by the singular values of the block-Hankel matrix.

Usage

sumFunc(x, cutoff)

Arguments

x
Vector of singular values from singular value decomposition of block-Hankel matrix
cutoff
Value to determine cutoff to be considered for singular values (e.g., 0.90)

Value

  • The number of large singular values, as defined by the user-supplied cutoff.

Details

This function is used to help determine the number of large singular values, which in turn determines the hidden state dimension to be estimated.

See Also

hankel

Examples

Run this code
library(ebdbNet)
tmp <- runif(1) ## Initialize random number generator
set.seed(1241901) ## Set seed

x <- matrix(rnorm(100), nrow = 10, ncol = 10)
svd <- svd(x)$d
dim <- sumFunc(svd, 0.90) ## 7 singular values contribute 90% of total variance

Run the code above in your browser using DataLab