Statistics: Multivariate Analysis: Discriminant Analysis
Perform discriminant analysis and canonical discriminant analysis.
This feature is for OriginPro only.
Minimum Origin Version Required: 8.6
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 |
---|---|---|---|---|
Group for Training Data | group |
Input Range |
|
Select data from a column to specify group for training data. |
Training Data | var |
Input Range |
|
Select data to specify training data. 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. |
Predict Membership for Test Data | test |
Input int |
|
Determine whether to predict membership for test data. If checked (1), pvar is available. |
Test Data | pvar |
Input Range |
|
Select data to specify test data. |
Prior Probabilities | prior |
Input int |
|
Select the type of prior probabilities for each group.
Option list:
|
Discriminant Function | method |
Input int |
|
Select the method to classify.
Option list:
For more details, see the algorithm of discriminant functions. |
Canonical Discriminant Analysis | candisc |
Input int |
|
Specify whether (1) or not (0) to perform Canonical Discriminant Analysis. |
Cross Validation | cv |
Input int |
|
Specify whether (1) or not (0) to classify training data using Cross Validation method. |
Descriptive Statistics | stat |
Input int |
|
Specify whether (1) or not (0) to perform Descriptive Statistics on training data including means, standard deviations for each variable in each group and total. |
Descriptive Matrices | dmat |
Input int |
|
Specify whether (1) or not (0) to calculate covariance matrix, correlation matrix and group distance(squared Mahalanobis) matrices of training data. |
Univariate ANOVA | anova |
Input int |
|
Specify whether (1) or not (0) to perform Univariate ANOVA on training data to test the difference in group means for each variable. |
Equality Test of Covariance Matrices | equal |
Input int |
|
Specify whether (1) or not (0) to perform Equality Test of Covariance Matrices on training data to test the equality of within-group covariance matrices. |
Pooled Within-group Covariance/Correlation Matrix | pcov |
Input int |
|
Specify whether (1) or not (0) to output pooled within-group covariance matrix and correlation matrix for training data. |
Within-group Covariance Matrices | gcov |
Input int |
|
Specify whether (1) or not (0) to output within-group covariance matrices for training data. |
Discriminant Function Coefficients | dcoeff |
Input int |
|
Specify whether (1) or not (0) to calculate discriminant function coefficients including constant and linear coefficients. This option is enabled only when method is Linear. |
Canonical Structure Matrix | cstruct |
Input int |
|
Specify whether (1) or not (0) to calculate the canonical structure matrix in Canonical Discriminant Analysis. |
Canonical Coefficients | ccoeff |
Input int |
|
Specify whether (1) or not (0) to calculate canonical coefficients in Canonical Discriminant Analysis including unstandardized canonical coefficients and standardized canonical coefficients. |
Canonical Scores | cscore |
Input int |
|
Specify whether (1) or not (0) to calculate canonical scores and canonical group means in Canonical Discriminant Analysis. |
Posterior Probabilities | prob |
Input int |
|
Specify whether (1) or not (0) posterior probabilities are included in the classification result for observations of training data and test data in different groups. |
Squared Mahalanobis Distance | dist |
Input int |
|
Specify whether (1) or not (0) squared Mahalanobis distance is included in the classification result for observations of training data and test data in different groups. |
Atypicality Index | ai |
Input int |
|
Specify whether (1) or not (0) atypicality index is included in the classification result for observations of training data and test data in different groups. |
Classification Summary | cstat |
Input int |
|
Specify whether (1) or not (0) to summarize the classification result including observation count in each predicted group, error rate for training data and cross validation of training data. |
Classification Summary Plot | cplot |
Input int |
|
Specify whether (1) or not (0) to show Classification Summary Plot in the report, which shows the source of predicted group members. |
Classification Fit Plot | fplot |
Input int |
|
Specify whether (1) or not (0) to show Classification Fit Plot in the report, which shows the posterior probabilities of observations for the predicted group. |
Canonical Score Plot | splot |
Input int |
|
Specify whether (1) or not (0) to show Canonical Score Plot in the report, which shows scores of observations in the first two canonical variables. |
Discriminant Analysis Report | rt |
Output ReportTree |
|
Specify the sheet for the discriminant analysis report. |
Classification Result for Training Data | rdtrain |
Output ReportData |
|
Specify the sheet for the classification result of training data. |
Classification Result for Test Data | rdtest |
Output ReportData |
|
Specify the sheet for the classification result of test data. |
Canonical Scores | rdscore |
Output ReportData |
|
Specify the sheet for canonical scores. |
Plot Data | rdplot |
Output ReportData |
|
Specify the sheet for plot data. This variable is hidden in the dialog. |
This function performs the Discriminant Analysis on range data. For more information, see the Discriminant Analysis.
discrim group:=5 var:=1:4 rdtrain:=[<input>]<input> -r 2;
kmeans ir:=4:15 num:=5 rd:=[<input>]<input> -r 2; page.active=1; discrim group:=17 var:=4:15 -t "Canonical Discriminant Analysis";
See the algorithm of Discriminant Analysis.
See the reference of Discriminant Analysis.