INFO_ppca: Information Criterion for PPCA.

Description Usage Arguments Value References Examples

View source: R/alternative.R

Description

The function returns the dimension that minimized the AIC or BIC based on the profile log-likelihood while considering all possible dimensions.

Usage

1
INFO_ppca(lambda, M, verbose = FALSE, tau = 0.001, AIC = TRUE)

Arguments

lambda

a numeric vector of positive sample eigenvalues pf length n

M

a positive integer for the number of observations or features.

verbose

a logical specifying whether the posterior evidence or the integer that minimized the evidence should be returned

tau

a tolerance threshold for the smallest eigenvalue, the default value is 0.001.

AIC

a logical indicator to use AIC as the information criterion, if FALSE, then BIC is used; the default option is AIC.

Value

an integer K between 1 and n that minimizes the AIC or BIC.

References

Akaike, H. (1974), A new look at the statistical model identification, **IEEE Transactions on Automatic Control**, *19*(6): 716–723, <doi:10.1109/TAC.1974.1100705>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(MASS)
X <- mvrnorm(1000, mu = rep(0,10), Sigma = diag(1,10))
eigen_values <- eigen(as.matrix(Matrix::nearPD(stats::cov(scale((X))))$mat))$val
INFO_ppca(lambda = eigen_values, M = 100)
INFO_ppca(lambda = eigen_values, M = 100, AIC = FALSE)
INFO_ppca(lambda = eigen_values, M = 5000)
INFO_ppca(lambda = eigen_values, M = 5000, AIC = FALSE)

## End(Not run)

WeiAkaneDeng/SPAC2 documentation built on Jan. 15, 2022, 5:01 a.m.