Description Usage Arguments Details Value Author(s) References See Also
The function genpca
computes a generalized Principal Component Analysis (PCA).
It calculates the principal components, the coordinates of the variables and
in these principals components axes and the inertia of these principal components.
1 2 |
data |
matrix n x p |
w |
vector of size n of weight (by default : weight=t(1/n,...,1/n)) |
m |
matrix p x p (by default : metric=Identity matrix) |
center |
boolean. if TRUE, centered PCA (by default : center=TRUE) |
reduc |
boolean. if TRUE, reduced PCA (by default : reduce=TRUE) |
Let
W=diag(w)
x=data=(x_1',...,x_n')'
with
x_i=(x_i^1,...,x_i^p)
Let
1_n=(1,...,1)'
with n rows and :
1_p=(1,...,1)'
with p rows. Normalization of weight :
w_i=w_i/sum_iw_i
Vector of means :
bar(x)=(bar(x^1),...,bar(x^p))'
with:
bar(x^j)=sum_iw_ix_i^j
If center=True,
x_c=x-bar(x)'
Standart deviation :
sigma^j^2=sum_iw_i(x_i^j)^2-(bar(x^j))^2
Sigma=diag((sigma^1)^2,...,(sigma^p)^2)'
If reduc=True :
x_{cr}=x_c Sigma^(-1/2)
Variance-Covariance matrix:
C=x_cr'Wx_cr
Cholesky decomposition : M=LL' where M=m
Let
C_l=LCL'
Let U and D as :
C_lU=UD
with D=diag(lambda_1,...,lambda_p)
Let
V=L'U
Then :
Coordinates of individuals in the principals components basis :
CC=x_cr V
Coordinates of variables in principals components :
VC=CVD^(-1/2)
Inertia :
I=D1_p
Returns ‘inertia’ vector of size p with percent of inertia of each component (corresponding to I), ‘casecoord’ matrix n x p (corresponding to matrix CC), ‘varcoord’ matrix p x n (corresponding to matrix VC0).
Thomas-Agnan C., Aragon Y., Ruiz-Gazen A., Laurent T., Robidou L.
Thibault Laurent, Anne Ruiz-Gazen, Christine Thomas-Agnan (2012), GeoXp: An R Package for Exploratory Spatial Data Analysis. Journal of Statistical Software, 47(2), 1-23.
Caussinus H., Fekri M., Hakam S., Ruiz-Gazen A. (2003) , A monitoring display of Multivariate Outliers, Computational Statistics and Data Analysis, vol. 44, 1-2, 237-252.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.