Principal Component Analysis Action Set: Syntax
Provides actions for performing principal component analysis
eig Action
Extracts principal components by using the eigenvalue decomposition method.
CASL Syntax
Summary: Input and Output Tables
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
required parametertable |
— |
specifies the settings for an input table. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
casOut |
writes SAS DATA step code for computing predicted values of the fitted model. | |
|
required parametercasOut |
specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors. | |
|
required parametercasOut |
specifies the output table to be created to contain observationwise statistics. If you do not specify any statistic, then only the principal component scores are included. | |
|
names |
lists the names of results tables to save as CAS tables on the server. |
Parameter Descriptions
attributes={{casinvardesc-1} <, {casinvardesc-2}, ...>}
changes the attributes of variables used in this action. Currently, attributes specified on the inputs and nominals parameter are ignored.
For more information about specifying the attributes parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | attribute, attr |
|---|
code={aircodegen}
writes SAS DATA step code for computing predicted values of the fitted model.
For more information about specifying the code parameter, see the common aircodegen parameter (Appendix A: Common Parameters).
cov=TRUE | FALSE
when set to True, computes the principal components from the covariance matrix.
| Alias | covariance |
|---|---|
| Default | FALSE |
display={displayTables}
specifies a list of results tables to send to the client for display.
For more information about specifying the display parameter, see the common displayTables parameter (Appendix A: Common Parameters).
freq="variable-name"
specifies a numeric variable that contains the frequency of occurrence of each observation.
groupbyLimit=64-bit-integer
suppresses the analysis if the number of BY groups exceeds the specified value.
| Minimum value | 1 |
|---|
inputs={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the variables to be analyzed. For the NIPALS, ITERGS, and EIG methods, you can analyze only numeric variables. If you omit the parameter, all numeric variables that are not specified in other parameters are analyzed. You must specify either INPUTS or MODEL for the RANDOMPCA method, but you can use both numeric and categorical variables.
For more information about specifying the inputs parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | input, vars, var |
|---|
n=integer
specifies the number of principal components to be computed. If the value is 0, all principal components are computed.
| Default | 0 |
|---|---|
| Minimum value | 0 |
noInt=TRUE | FALSE
when set to True, omits the intercept from the model.
| Default | FALSE |
|---|
outStat={eigOutstat}
specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors.
The eigOutstat value can be one or more of the following:
* casOut={casouttable}
specifies the output table.
For more information about specifying the casOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
rPrefix="string"
specifies a prefix for naming the residual variables.
| Alias | parPrefix, pPrefix |
|---|---|
| Default | "R" |
output={eigOutput}
specifies the output table to be created to contain observationwise statistics. If you do not specify any statistic, then only the principal component scores are included.
The eigOutput value can be one or more of the following:
* casOut={casouttable}
specifies the output table.
For more information about specifying the casOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
copyVars={"variable-name-1" <, "variable-name-2", ...>}
copies one or more variables from the input table to the output table.
| Alias | copyVar |
|---|
residual="string"
requests residuals for each analysis variable. The residuals are included only if you also specify the partial parameter. If set to an empty string, the prefix R is used for naming the output variables.
| Alias | r, resid |
|---|
score="string"
specifies principal component scores for each principal component. If the value is an empty string, the prefix Score is used to name the output variables.
outputTables={outputTables}
lists the names of results tables to save as CAS tables on the server.
For more information about specifying the outputTables parameter, see the common outputTables parameter (Appendix A: Common Parameters).
| Alias | displayOut |
|---|
partial={"variable-name-1" <, "variable-name-2", ...>}
specifies numerical variables to be partialed out if you want to analyze a partial correlation or covariance matrix.
prefix="string"
specifies a prefix for naming the principal components.
| Default | "Prin" |
|---|
singular=double
specifies the singularity criterion.
| Alias | sing |
|---|---|
| Default | 1E-08 |
| Range | 0–1 |
std=TRUE | FALSE
when set to True, standardizes to unit variance the principal component scores in the output table that is specified in the output parameter.
| Alias | standard |
|---|---|
| Default | FALSE |
* table={castable}
specifies the settings for an input table.
For more information about specifying the table parameter, see the common castable parameter (Appendix A: Common Parameters).
varDef="DF" | "N" | "WDF" | "WEIGHT" | "WGT"
specifies the divisor to use in calculating variances and standard deviations.
| Default | DF |
|---|
weight="variable-name"
specifies a numeric variable that is used as a weight to perform a weighted analysis of the data.
eig Action
Extracts principal components by using the eigenvalue decomposition method.
Lua Syntax
Summary: Input and Output Tables
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
required parametertable |
— |
specifies the settings for an input table. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
casOut |
writes SAS DATA step code for computing predicted values of the fitted model. | |
|
required parametercasOut |
specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors. | |
|
required parametercasOut |
specifies the output table to be created to contain observationwise statistics. If you do not specify any statistic, then only the principal component scores are included. | |
|
names |
lists the names of results tables to save as CAS tables on the server. |
Parameter Descriptions
attributes={{casinvardesc-1} <, {casinvardesc-2}, ...>}
changes the attributes of variables used in this action. Currently, attributes specified on the inputs and nominals parameter are ignored.
For more information about specifying the attributes parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | attribute, attr |
|---|
code={aircodegen}
writes SAS DATA step code for computing predicted values of the fitted model.
For more information about specifying the code parameter, see the common aircodegen parameter (Appendix A: Common Parameters).
cov=true | false
when set to True, computes the principal components from the covariance matrix.
| Alias | covariance |
|---|---|
| Default | false |
display={displayTables}
specifies a list of results tables to send to the client for display.
For more information about specifying the display parameter, see the common displayTables parameter (Appendix A: Common Parameters).
freq="variable-name"
specifies a numeric variable that contains the frequency of occurrence of each observation.
groupbyLimit=64-bit-integer
suppresses the analysis if the number of BY groups exceeds the specified value.
| Minimum value | 1 |
|---|
inputs={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the variables to be analyzed. For the NIPALS, ITERGS, and EIG methods, you can analyze only numeric variables. If you omit the parameter, all numeric variables that are not specified in other parameters are analyzed. You must specify either INPUTS or MODEL for the RANDOMPCA method, but you can use both numeric and categorical variables.
For more information about specifying the inputs parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | input, vars, var |
|---|
n=integer
specifies the number of principal components to be computed. If the value is 0, all principal components are computed.
| Default | 0 |
|---|---|
| Minimum value | 0 |
noInt=true | false
when set to True, omits the intercept from the model.
| Default | false |
|---|
outStat={eigOutstat}
specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors.
The eigOutstat value can be one or more of the following:
* casOut={casouttable}
specifies the output table.
For more information about specifying the casOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
rPrefix="string"
specifies a prefix for naming the residual variables.
| Alias | parPrefix, pPrefix |
|---|---|
| Default | "R" |
output={eigOutput}
specifies the output table to be created to contain observationwise statistics. If you do not specify any statistic, then only the principal component scores are included.
The eigOutput value can be one or more of the following:
* casOut={casouttable}
specifies the output table.
For more information about specifying the casOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
copyVars={"variable-name-1" <, "variable-name-2", ...>}
copies one or more variables from the input table to the output table.
| Alias | copyVar |
|---|
residual="string"
requests residuals for each analysis variable. The residuals are included only if you also specify the partial parameter. If set to an empty string, the prefix R is used for naming the output variables.
| Alias | r, resid |
|---|
score="string"
specifies principal component scores for each principal component. If the value is an empty string, the prefix Score is used to name the output variables.
outputTables={outputTables}
lists the names of results tables to save as CAS tables on the server.
For more information about specifying the outputTables parameter, see the common outputTables parameter (Appendix A: Common Parameters).
| Alias | displayOut |
|---|
partial={"variable-name-1" <, "variable-name-2", ...>}
specifies numerical variables to be partialed out if you want to analyze a partial correlation or covariance matrix.
prefix="string"
specifies a prefix for naming the principal components.
| Default | "Prin" |
|---|
singular=double
specifies the singularity criterion.
| Alias | sing |
|---|---|
| Default | 1E-08 |
| Range | 0–1 |
std=true | false
when set to True, standardizes to unit variance the principal component scores in the output table that is specified in the output parameter.
| Alias | standard |
|---|---|
| Default | false |
* table={castable}
specifies the settings for an input table.
For more information about specifying the table parameter, see the common castable parameter (Appendix A: Common Parameters).
varDef="DF" | "N" | "WDF" | "WEIGHT" | "WGT"
specifies the divisor to use in calculating variances and standard deviations.
| Default | DF |
|---|
weight="variable-name"
specifies a numeric variable that is used as a weight to perform a weighted analysis of the data.
eig Action
Extracts principal components by using the eigenvalue decomposition method.
Python Syntax
Summary: Input and Output Tables
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
required parametertable |
— |
specifies the settings for an input table. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
casOut |
writes SAS DATA step code for computing predicted values of the fitted model. | |
|
required parametercasOut |
specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors. | |
|
required parametercasOut |
specifies the output table to be created to contain observationwise statistics. If you do not specify any statistic, then only the principal component scores are included. | |
|
names |
lists the names of results tables to save as CAS tables on the server. |
Parameter Descriptions
attributes=[{casinvardesc-1} <, {casinvardesc-2}, ...>]
changes the attributes of variables used in this action. Currently, attributes specified on the inputs and nominals parameter are ignored.
For more information about specifying the attributes parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | attribute, attr |
|---|
code={aircodegen}
writes SAS DATA step code for computing predicted values of the fitted model.
For more information about specifying the code parameter, see the common aircodegen parameter (Appendix A: Common Parameters).
cov=True | False
when set to True, computes the principal components from the covariance matrix.
| Alias | covariance |
|---|---|
| Default | False |
display={displayTables}
specifies a list of results tables to send to the client for display.
For more information about specifying the display parameter, see the common displayTables parameter (Appendix A: Common Parameters).
freq="variable-name"
specifies a numeric variable that contains the frequency of occurrence of each observation.
groupbyLimit=64-bit-integer
suppresses the analysis if the number of BY groups exceeds the specified value.
| Minimum value | 1 |
|---|
inputs=[{casinvardesc-1} <, {casinvardesc-2}, ...>]
specifies the variables to be analyzed. For the NIPALS, ITERGS, and EIG methods, you can analyze only numeric variables. If you omit the parameter, all numeric variables that are not specified in other parameters are analyzed. You must specify either INPUTS or MODEL for the RANDOMPCA method, but you can use both numeric and categorical variables.
For more information about specifying the inputs parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | input, vars, var |
|---|
n=integer
specifies the number of principal components to be computed. If the value is 0, all principal components are computed.
| Default | 0 |
|---|---|
| Minimum value | 0 |
noInt=True | False
when set to True, omits the intercept from the model.
| Default | False |
|---|
outStat={eigOutstat}
specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors.
The eigOutstat value can be one or more of the following:
* "casOut":{casouttable}
specifies the output table.
For more information about specifying the casOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
"rPrefix":"string"
specifies a prefix for naming the residual variables.
| Alias | parPrefix, pPrefix |
|---|---|
| Default | "R" |
output={eigOutput}
specifies the output table to be created to contain observationwise statistics. If you do not specify any statistic, then only the principal component scores are included.
The eigOutput value can be one or more of the following:
* "casOut":{casouttable}
specifies the output table.
For more information about specifying the casOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
"copyVars":["variable-name-1" <, "variable-name-2", ...>]
copies one or more variables from the input table to the output table.
| Alias | copyVar |
|---|
"residual":"string"
requests residuals for each analysis variable. The residuals are included only if you also specify the partial parameter. If set to an empty string, the prefix R is used for naming the output variables.
| Alias | r, resid |
|---|
"score":"string"
specifies principal component scores for each principal component. If the value is an empty string, the prefix Score is used to name the output variables.
outputTables={outputTables}
lists the names of results tables to save as CAS tables on the server.
For more information about specifying the outputTables parameter, see the common outputTables parameter (Appendix A: Common Parameters).
| Alias | displayOut |
|---|
partial=["variable-name-1" <, "variable-name-2", ...>]
specifies numerical variables to be partialed out if you want to analyze a partial correlation or covariance matrix.
prefix="string"
specifies a prefix for naming the principal components.
| Default | "Prin" |
|---|
singular=double
specifies the singularity criterion.
| Alias | sing |
|---|---|
| Default | 1E-08 |
| Range | 0–1 |
std=True | False
when set to True, standardizes to unit variance the principal component scores in the output table that is specified in the output parameter.
| Alias | standard |
|---|---|
| Default | False |
* table={castable}
specifies the settings for an input table.
For more information about specifying the table parameter, see the common castable parameter (Appendix A: Common Parameters).
varDef="DF" | "N" | "WDF" | "WEIGHT" | "WGT"
specifies the divisor to use in calculating variances and standard deviations.
| Default | DF |
|---|
weight="variable-name"
specifies a numeric variable that is used as a weight to perform a weighted analysis of the data.
eig Action
Extracts principal components by using the eigenvalue decomposition method.
R Syntax
Summary: Input and Output Tables
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
required parametertable |
— |
specifies the settings for an input table. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
casOut |
writes SAS DATA step code for computing predicted values of the fitted model. | |
|
required parametercasOut |
specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors. | |
|
required parametercasOut |
specifies the output table to be created to contain observationwise statistics. If you do not specify any statistic, then only the principal component scores are included. | |
|
names |
lists the names of results tables to save as CAS tables on the server. |
Parameter Descriptions
attributes=list( list(casinvardesc-1) <, list(casinvardesc-2), ...>)
changes the attributes of variables used in this action. Currently, attributes specified on the inputs and nominals parameter are ignored.
For more information about specifying the attributes parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | attribute, attr |
|---|
code=list(aircodegen)
writes SAS DATA step code for computing predicted values of the fitted model.
For more information about specifying the code parameter, see the common aircodegen parameter (Appendix A: Common Parameters).
cov=TRUE | FALSE
when set to True, computes the principal components from the covariance matrix.
| Alias | covariance |
|---|---|
| Default | FALSE |
display=list(displayTables)
specifies a list of results tables to send to the client for display.
For more information about specifying the display parameter, see the common displayTables parameter (Appendix A: Common Parameters).
freq="variable-name"
specifies a numeric variable that contains the frequency of occurrence of each observation.
groupbyLimit=64-bit-integer
suppresses the analysis if the number of BY groups exceeds the specified value.
| Minimum value | 1 |
|---|
inputs=list( list(casinvardesc-1) <, list(casinvardesc-2), ...>)
specifies the variables to be analyzed. For the NIPALS, ITERGS, and EIG methods, you can analyze only numeric variables. If you omit the parameter, all numeric variables that are not specified in other parameters are analyzed. You must specify either INPUTS or MODEL for the RANDOMPCA method, but you can use both numeric and categorical variables.
For more information about specifying the inputs parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | input, vars, var |
|---|
n=integer
specifies the number of principal components to be computed. If the value is 0, all principal components are computed.
| Default | 0 |
|---|---|
| Minimum value | 0 |
noInt=TRUE | FALSE
when set to True, omits the intercept from the model.
| Default | FALSE |
|---|
outStat=list(eigOutstat)
specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors.
The eigOutstat value can be one or more of the following:
* casOut=list(casouttable)
specifies the output table.
For more information about specifying the casOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
rPrefix="string"
specifies a prefix for naming the residual variables.
| Alias | parPrefix, pPrefix |
|---|---|
| Default | "R" |
output=list(eigOutput)
specifies the output table to be created to contain observationwise statistics. If you do not specify any statistic, then only the principal component scores are included.
The eigOutput value can be one or more of the following:
* casOut=list(casouttable)
specifies the output table.
For more information about specifying the casOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
copyVars=list("variable-name-1" <, "variable-name-2", ...>)
copies one or more variables from the input table to the output table.
| Alias | copyVar |
|---|
residual="string"
requests residuals for each analysis variable. The residuals are included only if you also specify the partial parameter. If set to an empty string, the prefix R is used for naming the output variables.
| Alias | r, resid |
|---|
score="string"
specifies principal component scores for each principal component. If the value is an empty string, the prefix Score is used to name the output variables.
outputTables=list(outputTables)
lists the names of results tables to save as CAS tables on the server.
For more information about specifying the outputTables parameter, see the common outputTables parameter (Appendix A: Common Parameters).
| Alias | displayOut |
|---|
partial=list("variable-name-1" <, "variable-name-2", ...>)
specifies numerical variables to be partialed out if you want to analyze a partial correlation or covariance matrix.
prefix="string"
specifies a prefix for naming the principal components.
| Default | "Prin" |
|---|
singular=double
specifies the singularity criterion.
| Alias | sing |
|---|---|
| Default | 1E-08 |
| Range | 0–1 |
std=TRUE | FALSE
when set to True, standardizes to unit variance the principal component scores in the output table that is specified in the output parameter.
| Alias | standard |
|---|---|
| Default | FALSE |
* table=list(castable)
specifies the settings for an input table.
For more information about specifying the table parameter, see the common castable parameter (Appendix A: Common Parameters).
varDef="DF" | "N" | "WDF" | "WEIGHT" | "WGT"
specifies the divisor to use in calculating variances and standard deviations.
| Default | DF |
|---|
weight="variable-name"
specifies a numeric variable that is used as a weight to perform a weighted analysis of the data.