Statistics: Multivariate Analysis: Principal Component Analysis
Perform principal component analysis.
This feature is for OriginPro only.
Minimum Origin Version Required:Origin 8.6
The label variable is available since Origin 2015.
1. pca -r 1 mtype:=cov std:=1 screeplot:=0 splot:=1;
2. pca std:=1 lplot:=0 biplot:=0;
3. pca std:=1 eigenvec:=0 xcomp:=2 ycomp:=1 splot:=1;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Variables | irng |
Input Range |
|
Specify the input variables. At least two input datasets are required. Note that beginning with Origin 2020b, there is a shortened syntax that follows the form [Book]Sheet!(N1:N2), N1 = the beginning column index and N2 being the ending column index in a contiguous range of columns. More complex strings from non-contiguous data of the form [Book]Sheet!([Book]Sheet!N1:N2,[Book]Sheet!N3:N4) are also possible. |
Observation Labels | label |
Input Range |
|
Specify the dataset for observation label. It can be used for the scores plot. |
Analyze | mtype |
Input int |
|
Select the matrix type to analyze.
Option list:
|
Number of Components to Extract | npc |
Input int |
|
Specify the number of principal components to extract. This value should be between 1 and the number of variables. |
Standardize Scores | std |
Input int |
|
Determine whether to standardize scores.
For excluding missing values in listwise fashion, scores will be standardized as unit variance. For the pairwise, scores will be scaled by the square root of the eigenvalue. The scores data in Score Plot and Biplot will be standardized if std is 1. |
Exclude Missing Values | missing |
Input int |
|
Specify the mode for excluding missing values from analysis.
Option list:
|
Simple Descriptive Statistics | stat |
Input int |
|
Specify whether to perform simple statistics on input data including the mean, standard deviation and number of observations in the analysis for each variable. |
Correlation Matrix | corr |
Input int |
|
Specify whether to calculate correlation matrix. Note that the method to calculate the correlation matrix depends on the mode of missing. |
Eigenvalues | eigenval |
Input int |
|
Specify whether to output eigenvalues including the proportion and the cumulative proportion. Bartlett's Test result is shown when mtype is cov. |
Eigenvectors | eigenvec |
Input int |
|
Specify whether to output eigenvectors for principal components specified by npc. |
Scores | scores |
Input int |
|
Specify whether to output scores for principal components specified by npc. |
Scree Plot | screeplot |
Input int |
|
Specify whether to show the Scree Plot for eigenvalues. |
Principal Component for X Axis | xcomp |
Input int |
|
Specify the principal component for the X axis in component plots. |
Principal Component for Y Axis | ycomp |
Input int |
|
Specify the principal component for the Y axis in component plots. |
Loading Plot | lplot |
Input int |
|
Specify whether to show the Loading Plot for eigenvectors. |
Score Plot | splot |
Input int |
|
Specify whether to show the Score Plot for scores. |
Biplot | biplot |
Input int |
|
Specify whether to show the Biplot for eigenvectors and scores. |
PCA Report | rt |
Output ReportTree |
|
Specify the sheet for the Principal Component Analysis report. |
Score Data | rd |
Output ReportData |
|
Specify the sheet for scores. |
Plot Data | rdplot |
Output ReportData |
|
Specify the sheet for plot data. This variable is hidden in the dialog. |
For more information, please refer to our User Guide.
pca irng:=4:15 mtype:=cov -r 2;