- Ajuda Scilab
- Estatística
- cdfbet
- cdfbin
- cdfchi
- cdfchn
- cdff
- cdffnc
- cdfgam
- cdfnbn
- cdfnor
- cdfpoi
- cdft
- center
- wcenter
- cmoment
- correl
- covar
- ftest
- ftuneq
- geomean
- harmean
- iqr
- mad
- mean
- meanf
- median
- moment
- msd
- mvvacov
- nancumsum
- nand2mean
- nanmax
- nanmean
- nanmeanf
- nanmedian
- nanmin
- nanstdev
- nansum
- nfreq
- pca
- perctl
- princomp
- quart
- regress
- sample
- samplef
- samwr
- show_pca
- st_deviation
- stdevf
- strange
- tabul
- thrownan
- trimmean
- variance
- variancef

Please note that the recommended version of Scilab is 6.0.2. This page might be outdated.

See the recommended documentation of this function

# princomp

Principal components analysis

### Calling Sequence

[facpr,comprinc,lambda,tsquare] = princomp(x,eco)

### Arguments

- x
is a

`n`

-by-`p`

(`n`

individuals,`p`

variables) real matrix.- eco
a boolean, use to allow economy size singular value decomposition.

- facpr
A

`p`

-by-`p`

matrix. It contains the principal factors: eigenvectors of the correlation matrix`V`

.- comprinc
a

`n`

-by-`p`

matrix. It contains the principal components. Each column of this matrix is the M-orthogonal projection of individuals onto principal axis. Each one of this columns is a linear combination of the variables x1, ...,xp with maximum variance under condition`u'_i M^(-1) u_i=1`

- lambda
is a

`p`

column vector. It contains the eigenvalues of`V`

, where`V`

is the correlation matrix.- tsquare
a

`n`

column vector. It contains the Hotelling's T^2 statistic for each data point.

### Description

This function performs "principal component analysis" on the
`n`

-by-`p`

data matrix
`x`

.

The idea behind this method is to represent in an approximative manner a cluster of n individuals in a smaller dimensional subspace. In order to do that, it projects the cluster onto a subspace. The choice of the k-dimensional projection subspace is made in such a way that the distances in the projection have a minimal deformation: we are looking for a k-dimensional subspace such that the squares of the distances in the projection is as big as possible (in fact in a projection, distances can only stretch). In other words, inertia of the projection onto the k dimensional subspace must be maximal.

To compute principal component analysis with standardized variables may use
`princomp(wcenter(x,1))`

or use the pca function.

### Examples

a=rand(100,10,'n'); [facpr,comprinc,lambda,tsquare] = princomp(a);

### See Also

### Authors

Carlos Klimann

### Bibliography

Saporta, Gilbert, Probabilites, Analyse des Donnees et Statistique, Editions Technip, Paris, 1990.

## Comments

Add a comment:Please login to comment this page.