# 2.13.3.1 pca(Pro)

Statistics: Multivariate Analysis: Principal Component Analysis

## Brief Information

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.

## Command Line Usage

 

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; 

## Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Variables irng

Input

Range

<active>
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

<optional>
Specify the dataset for observation label. It can be used for the scores plot.
Analyze mtype

Input

int

0
Select the matrix type to analyze.

Option list:

• corr:Correlation Matrix
Use correlation matrix to analyze.
• cov:Covariance Matrix
Use covariance matrix to analyze.
Number of Components to Extract npc

Input

int

2
Specify the number of principal components to extract. This value should be between 1 and the number of variables.
Standardize Scores std

Input

int

0
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

0
Specify the mode for excluding missing values from analysis.

Option list:

• Listwise
An observation containing one or more missing values will be excluded in the analysis.
• Pairwise
An observation is excluded only in the calculation of covariance or correlation between two variables if missing values exist in either of the two variables for the observation.
Simple Descriptive Statistics stat

Input

int

1
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

1
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

1
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

1
Specify whether to output eigenvectors for principal components specified by npc.
Scores scores

Input

int

1
Specify whether to output scores for principal components specified by npc.
Scree Plot screeplot

Input

int

1
Specify whether to show the Scree Plot for eigenvalues.
Principal Component for X Axis xcomp

Input

int

1
Specify the principal component for the X axis in component plots.
Principal Component for Y Axis ycomp

Input

int

2
Specify the principal component for the Y axis in component plots.

Input

int

1
Score Plot splot

Input

int

0
Specify whether to show the Score Plot for scores.
Biplot biplot

Input

int

1
Specify whether to show the Biplot for eigenvectors and scores.
PCA Report rt

Output

ReportTree

<new>
Specify the sheet for the Principal Component Analysis report.
Score Data rd

Output

ReportData

<new>
Specify the sheet for scores.
Plot Data rdplot

Output

ReportData

<new>
Specify the sheet for plot data. This variable is hidden in the dialog.

## Description

pca irng:=4:15 mtype:=cov -r 2;
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.504504919052124, "perplexity": 5376.780685769821}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-49/segments/1637964363332.1/warc/CC-MAIN-20211207014802-20211207044802-00562.warc.gz"}