mlpca_e: Maximum likelihood principal component analysis for mode E...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/mlpca_e.R

Description

Performs maximum likelihood principal components analysis for mode E error conditions (correlated errors, with a different covariance matrix for each row, but no error correlation between the rows). Employs an ALS algorithm.

Usage

1
mlpca_e(X, Cov, p, MaxIter = 20000)

Arguments

X

IxJ matrix of measurements

Cov

JXJXI matrices of measurement error covariance

p

Rank of the model's subspace, p must be than the minimum of I and J

MaxIter

Maximum no. of iterations

Details

The returned parameters, U, S and V, are analogs to the truncated SVD solution, but have somewhat different properties since they represent the MLPCA solution. In particular, the solutions for different values of p are not necessarily nested (the rank 1 solution may not be in the space of the rank 2 solution) and the eigenvectors do not necessarily account for decreasing amounts of variance, since MLPCA is a subspace modeling technique and not a variance modeling technique.

Value

The parameters returned are the results of SVD on the estimated subspace. The quantity Ssq represents the sum of squares of weighted residuals. ErrFlag indicates the convergence condition, with 0 indicating normal termination and 1 indicating the maximum number of iterations have been exceeded.

Author(s)

Renan Santos Barbosa

References

Wentzell, P. D. "Other topics in soft-modeling: maximum likelihood-based soft-modeling methods." (2009): 507-558.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(RMLPCA)
data(data_clean_e)
data(data_error_e)
# covariance matrix
data(cov_e)
data(data_cleaned_mlpca_e)
# data that you will usually have on hands
data_noisy <- data_clean_e + data_error_e

# run mlpca_e with rank p = 1
results <- RMLPCA::mlpca_e(
  X = data_noisy,
  Cov = cov_e,
  p = 1
)

# estimated clean dataset
data_cleaned_mlpca <- results$U %*% results$S %*% t(results$V)

RMLPCA documentation built on Jan. 13, 2021, 9:40 a.m.