Description Usage Arguments Details Value Author(s) References See Also Examples
This function performs NIPALS algorithm, i.e. the singular-value decomposition (SVD) of a data table that can contain missing values.
1 |
X |
a numeric matrix (or data frame) which provides the data for the principal components analysis. It can contain missing values. |
ncomp |
Integer, if data is complete |
reconst |
logical that specify if |
max.iter |
Integer, the maximum number of iterations in the NIPALS algorithm. |
tol |
Positive real, the tolerance used in the NIPALS algorithm. |
The NIPALS algorithm (Non-linear Iterative Partial Least Squares) has been developed by H. Wold at first for PCA and later-on for PLS. It is the most commonly used method for calculating the principal components of a data set. It gives more numerically accurate results when compared with the SVD of the covariance matrix, but is slower to calculate.
This algorithm allows to realize SVD with missing data, without having to delete the rows with missing data or to estimate the missing data.
An object of class 'mixo_nipals' contaning slots:
call |
The function call. |
eig |
Vector containing the pseudo-singular values of |
p |
Matrix whose columns contain the right singular vectors of |
t |
Matrix whose columns contain the left singular vectors of |
ncomp |
The number of principal components used. |
rec |
If |
sdev |
Same as 'eig' - for mixOmics consistency. |
var.tot |
Total variance in the data. |
loadings |
ame as 'p' to keep the mixOmics spirit |
x |
the value of the rotated data (the centred (and scaled if requested) data multiplied by the rotation/loadings matrix), also called the principal components. |
variates |
Same as 'x' to keep the mixOmics spirit |
explained_variance |
explained variance of each component. |
cum.var |
The cumulative explained variance for components. |
Sébastien Déjean, Ignacio González, Kim-Anh Le Cao, Al J Abadi
Tenenhaus, M. (1998). La regression PLS: theorie et pratique. Paris: Editions Technic.
Wold H. (1966). Estimation of principal components and related models by iterative least squares. In: Krishnaiah, P. R. (editors), Multivariate Analysis. Academic Press, N.Y., 391-420.
Wold H. (1975). Path models with latent variables: The NIPALS approach. In: Blalock H. M. et al. (editors). Quantitative Sociology: International perspectives on mathematical and statistical model building. Academic Press, N.Y., 307-357.
svd
, princomp
, prcomp
,
eigen
and http://www.mixOmics.org for more details.
1 2 3 4 5 6 7 8 9 10 | ## Hilbert matrix
hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, "+") }
X.na <- X <- hilbert(9)[, 1:6]
## Hilbert matrix with missing data
idx.na <- matrix(sample(c(0, 1, 1, 1, 1), 36, replace = TRUE), ncol = 6)
X.na[idx.na == 0] <- NA
X.rec <- nipals(X.na, reconst = TRUE)$rec
round(X, 2)
round(X.rec, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.