Principal Component Analysis Action Set

Provides actions for performing principal component analysis

eig Action

Extracts principal components by using the eigenvalue decomposition method.

CASL Syntax

pca.eig <result=results> <status=rc> /
attributes={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
code={
casOut={
caslib="string"
compress=TRUE | FALSE
indexVars={"variable-name-1" <, "variable-name-2", ...>}
label="string"
lifetime=64-bit-integer
maxMemSize=64-bit-integer
memoryFormat="DVR" | "INHERIT" | "STANDARD"
name="table-name"
onDemand=TRUE | FALSE
promote=TRUE | FALSE
replace=TRUE | FALSE
replication=integer
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE"
threadBlockSize=64-bit-integer
timeStamp="string"
where={"string-1" <, "string-2", ...>}
},
comment=TRUE | FALSE,
fmtWdth=integer,
indentSize=integer,
intoCutPt=double,
iProb=TRUE | FALSE,
labelId=integer,
lineSize=integer,
noTrim=TRUE | FALSE,
pCatAll=TRUE | FALSE,
tabForm=TRUE | FALSE
},
cov=TRUE | FALSE,
display={
caseSensitive=TRUE | FALSE,
exclude=TRUE | FALSE,
excludeAll=TRUE | FALSE,
keyIsPath=TRUE | FALSE,
names={"string-1" <, "string-2", ...>},
pathType="LABEL" | "NAME",
traceNames=TRUE | FALSE
},
freq="variable-name",
gpu={
enable=TRUE | FALSE
},
groupbyLimit=64-bit-integer,
inputs={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
n=integer,
noInt=TRUE | FALSE,
output={
required parameter casOut={
caslib="string"
compress=TRUE | FALSE
indexVars={"variable-name-1" <, "variable-name-2", ...>}
label="string"
lifetime=64-bit-integer
maxMemSize=64-bit-integer
memoryFormat="DVR" | "INHERIT" | "STANDARD"
name="table-name"
promote=TRUE | FALSE
replace=TRUE | FALSE
replication=integer
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE"
threadBlockSize=64-bit-integer
timeStamp="string"
where={"string-1" <, "string-2", ...>}
},
copyVars={"variable-name-1" <, "variable-name-2", ...>},
residual="string",
score="string"
},
outputTables={
groupByVarsRaw=TRUE | FALSE,
includeAll=TRUE | FALSE,
names={"string-1" <, "string-2", ...>} | {key-1={casouttable-1} <, key-2={casouttable-2}, ...>},
repeated=TRUE | FALSE,
replace=TRUE | FALSE
},
outStat={
required parameter casOut={
caslib="string"
compress=TRUE | FALSE
indexVars={"variable-name-1" <, "variable-name-2", ...>}
label="string"
lifetime=64-bit-integer
maxMemSize=64-bit-integer
memoryFormat="DVR" | "INHERIT" | "STANDARD"
name="table-name"
promote=TRUE | FALSE
replace=TRUE | FALSE
replication=integer
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE"
threadBlockSize=64-bit-integer
timeStamp="string"
where={"string-1" <, "string-2", ...>}
},
rPrefix="string"
},
partial={"variable-name-1" <, "variable-name-2", ...>},
prefix="string",
singular=double,
std=TRUE | FALSE,
store={
caslib="string",
compress=TRUE | FALSE,
indexVars={"variable-name-1" <, "variable-name-2", ...>},
label="string",
lifetime=64-bit-integer,
maxMemSize=64-bit-integer,
memoryFormat="DVR" | "INHERIT" | "STANDARD",
name="table-name",
promote=TRUE | FALSE,
replace=TRUE | FALSE,
replication=integer,
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE",
threadBlockSize=64-bit-integer,
timeStamp="string",
where={"string-1" <, "string-2", ...>}
},
required parameter table={
caslib="string",
computedOnDemand=TRUE | FALSE,
computedVars={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
computedVarsProgram="string",
dataSourceOptions={key-1=any-list-or-data-type-1 <, key-2=any-list-or-data-type-2, ...>},
groupBy={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
groupByMode="NOSORT" | "REDISTRIBUTE",
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter name="table-name",
orderBy={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
singlePass=TRUE | FALSE,
vars={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
where="where-expression",
whereTable={
casLib="string"
dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
required parameter name="table-name"
vars={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}}
where="where-expression"
}
},
varDef="DF" | "N" | "WDF" | "WEIGHT" | "WGT",
weight="variable-name"
;
indicates a required parameter

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.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

required parametertable

specifies the settings for an input table.

Parameters for Creating Output Tables

Parameter

Subparameter

Description

 code

casOut

writes SAS DATA step code for computing predicted values of the fitted model.

 outStat

required parametercasOut

specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors.

 output

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.

 outputTables

names

lists the names of results tables to save as CAS tables on the server.

 store

specifies the output table to be created to save model fit information that you can use for scoring.

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).

Aliases 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.

gpu={pca_gpu}

specifies the settings for graphics processing units (GPUs). If you specify the groupBy subparameter in the table parameter, the gpu parameter is ignored. If no GPU is available, the CPU is used to perform model computation.

enable=TRUE | FALSE

when set to True, enables the action to use GPUs to perform model computation on GPU-equipped machines (one GPU is used on each machine).

Default FALSE

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).

Aliases 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

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 (Form 1) 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.

Aliases 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

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 (Form 1) parameter (Appendix A: Common Parameters).

rPrefix="string"

specifies a prefix for naming the residual variables.

Aliases parPrefix
pPrefix
Default "R"

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

store={casouttable}

specifies the output table to be created to save model fit information that you can use for scoring.

For more information about specifying the store parameter, see the common casouttable (Form 1) parameter (Appendix A: Common Parameters).

Alias saveState

* table={castable}

specifies the settings for an input table.

For more information about specifying the table parameter, see the common castable (Form 1) 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

results, info = s:pca_eig{
attributes={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
code={
casOut={
caslib="string"
compress=true | false
indexVars={"variable-name-1" <, "variable-name-2", ...>}
label="string"
lifetime=64-bit-integer
maxMemSize=64-bit-integer
memoryFormat="DVR" | "INHERIT" | "STANDARD"
name="table-name"
onDemand=true | false
promote=true | false
replace=true | false
replication=integer
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE"
threadBlockSize=64-bit-integer
timeStamp="string"
where={"string-1" <, "string-2", ...>}
},
comment=true | false,
fmtWdth=integer,
indentSize=integer,
intoCutPt=double,
iProb=true | false,
labelId=integer,
lineSize=integer,
noTrim=true | false,
pCatAll=true | false,
tabForm=true | false
},
cov=true | false,
display={
caseSensitive=true | false,
exclude=true | false,
excludeAll=true | false,
keyIsPath=true | false,
names={"string-1" <, "string-2", ...>},
pathType="LABEL" | "NAME",
traceNames=true | false
},
freq="variable-name",
gpu={
enable=true | false
},
groupbyLimit=64-bit-integer,
inputs={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
n=integer,
noInt=true | false,
output={
required parameter casOut={
caslib="string"
compress=true | false
indexVars={"variable-name-1" <, "variable-name-2", ...>}
label="string"
lifetime=64-bit-integer
maxMemSize=64-bit-integer
memoryFormat="DVR" | "INHERIT" | "STANDARD"
name="table-name"
promote=true | false
replace=true | false
replication=integer
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE"
threadBlockSize=64-bit-integer
timeStamp="string"
where={"string-1" <, "string-2", ...>}
},
copyVars={"variable-name-1" <, "variable-name-2", ...>},
residual="string",
score="string"
},
outputTables={
groupByVarsRaw=true | false,
includeAll=true | false,
names={"string-1" <, "string-2", ...>} | {key-1={casouttable-1} <, key-2={casouttable-2}, ...>},
repeated=true | false,
replace=true | false
},
outStat={
required parameter casOut={
caslib="string"
compress=true | false
indexVars={"variable-name-1" <, "variable-name-2", ...>}
label="string"
lifetime=64-bit-integer
maxMemSize=64-bit-integer
memoryFormat="DVR" | "INHERIT" | "STANDARD"
name="table-name"
promote=true | false
replace=true | false
replication=integer
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE"
threadBlockSize=64-bit-integer
timeStamp="string"
where={"string-1" <, "string-2", ...>}
},
rPrefix="string"
},
partial={"variable-name-1" <, "variable-name-2", ...>},
prefix="string",
singular=double,
std=true | false,
store={
caslib="string",
compress=true | false,
indexVars={"variable-name-1" <, "variable-name-2", ...>},
label="string",
lifetime=64-bit-integer,
maxMemSize=64-bit-integer,
memoryFormat="DVR" | "INHERIT" | "STANDARD",
name="table-name",
promote=true | false,
replace=true | false,
replication=integer,
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE",
threadBlockSize=64-bit-integer,
timeStamp="string",
where={"string-1" <, "string-2", ...>}
},
required parameter table={
caslib="string",
computedOnDemand=true | false,
computedVars={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
computedVarsProgram="string",
dataSourceOptions={key-1=any-list-or-data-type-1 <, key-2=any-list-or-data-type-2, ...>},
groupBy={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
groupByMode="NOSORT" | "REDISTRIBUTE",
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter name="table-name",
orderBy={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
singlePass=true | false,
vars={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
where="where-expression",
whereTable={
casLib="string"
dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
required parameter name="table-name"
vars={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}}
where="where-expression"
}
},
varDef="DF" | "N" | "WDF" | "WEIGHT" | "WGT",
weight="variable-name"
}
indicates a required parameter

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.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

required parametertable

specifies the settings for an input table.

Parameters for Creating Output Tables

Parameter

Subparameter

Description

 code

casOut

writes SAS DATA step code for computing predicted values of the fitted model.

 outStat

required parametercasOut

specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors.

 output

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.

 outputTables

names

lists the names of results tables to save as CAS tables on the server.

 store

specifies the output table to be created to save model fit information that you can use for scoring.

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).

Aliases 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.

gpu={pca_gpu}

specifies the settings for graphics processing units (GPUs). If you specify the groupBy subparameter in the table parameter, the gpu parameter is ignored. If no GPU is available, the CPU is used to perform model computation.

enable=true | false

when set to True, enables the action to use GPUs to perform model computation on GPU-equipped machines (one GPU is used on each machine).

Default false

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).

Aliases 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

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 (Form 1) 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.

Aliases 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

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 (Form 1) parameter (Appendix A: Common Parameters).

rPrefix="string"

specifies a prefix for naming the residual variables.

Aliases parPrefix
pPrefix
Default "R"

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

store={casouttable}

specifies the output table to be created to save model fit information that you can use for scoring.

For more information about specifying the store parameter, see the common casouttable (Form 1) parameter (Appendix A: Common Parameters).

Alias saveState

* table={castable}

specifies the settings for an input table.

For more information about specifying the table parameter, see the common castable (Form 1) 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

results=s.pca.eig(
attributes=[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
code={
"casOut":{
"caslib":"string"
"compress":True | False
"indexVars":["variable-name-1" <, "variable-name-2", ...>]
"label":"string"
"lifetime":64-bit-integer
"maxMemSize":64-bit-integer
"memoryFormat":"DVR" | "INHERIT" | "STANDARD"
"name":"table-name"
"onDemand":True | False
"promote":True | False
"replace":True | False
"replication":integer
"tableRedistUpPolicy":"DEFER" | "NOREDIST" | "REBALANCE"
"threadBlockSize":64-bit-integer
"timeStamp":"string"
"where":["string-1" <, "string-2", ...>]
},
"comment":True | False,
"fmtWdth":integer,
"indentSize":integer,
"intoCutPt":double,
"iProb":True | False,
"labelId":integer,
"lineSize":integer,
"noTrim":True | False,
"pCatAll":True | False,
"tabForm":True | False
},
cov=True | False,
display={
"caseSensitive":True | False,
"exclude":True | False,
"excludeAll":True | False,
"keyIsPath":True | False,
"names":["string-1" <, "string-2", ...>],
"pathType":"LABEL" | "NAME",
"traceNames":True | False
},
freq="variable-name",
gpu={
"enable":True | False
},
groupbyLimit=64-bit-integer,
inputs=[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
n=integer,
noInt=True | False,
output={
required parameter "casOut":{
"caslib":"string"
"compress":True | False
"indexVars":["variable-name-1" <, "variable-name-2", ...>]
"label":"string"
"lifetime":64-bit-integer
"maxMemSize":64-bit-integer
"memoryFormat":"DVR" | "INHERIT" | "STANDARD"
"name":"table-name"
"promote":True | False
"replace":True | False
"replication":integer
"tableRedistUpPolicy":"DEFER" | "NOREDIST" | "REBALANCE"
"threadBlockSize":64-bit-integer
"timeStamp":"string"
"where":["string-1" <, "string-2", ...>]
},
"copyVars":["variable-name-1" <, "variable-name-2", ...>],
"residual":"string",
"score":"string"
},
outputTables={
"groupByVarsRaw":True | False,
"includeAll":True | False,
"names":["string-1" <, "string-2", ...>] | {"key-1":{casouttable-1} <, "key-2":{casouttable-2}, ...>},
"repeated":True | False,
"replace":True | False
},
outStat={
required parameter "casOut":{
"caslib":"string"
"compress":True | False
"indexVars":["variable-name-1" <, "variable-name-2", ...>]
"label":"string"
"lifetime":64-bit-integer
"maxMemSize":64-bit-integer
"memoryFormat":"DVR" | "INHERIT" | "STANDARD"
"name":"table-name"
"promote":True | False
"replace":True | False
"replication":integer
"tableRedistUpPolicy":"DEFER" | "NOREDIST" | "REBALANCE"
"threadBlockSize":64-bit-integer
"timeStamp":"string"
"where":["string-1" <, "string-2", ...>]
},
"rPrefix":"string"
},
partial=["variable-name-1" <, "variable-name-2", ...>],
prefix="string",
singular=double,
std=True | False,
store={
"caslib":"string",
"compress":True | False,
"indexVars":["variable-name-1" <, "variable-name-2", ...>],
"label":"string",
"lifetime":64-bit-integer,
"maxMemSize":64-bit-integer,
"memoryFormat":"DVR" | "INHERIT" | "STANDARD",
"name":"table-name",
"promote":True | False,
"replace":True | False,
"replication":integer,
"tableRedistUpPolicy":"DEFER" | "NOREDIST" | "REBALANCE",
"threadBlockSize":64-bit-integer,
"timeStamp":"string",
"where":["string-1" <, "string-2", ...>]
},
required parameter table={
"caslib":"string",
"computedOnDemand":True | False,
"computedVars":[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
"computedVarsProgram":"string",
"dataSourceOptions":{"key-1":{any-list-or-data-type-1} <, "key-2":{any-list-or-data-type-2}, ...>},
"groupBy":[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
"groupByMode":"NOSORT" | "REDISTRIBUTE",
"importOptions":{"fileType":"ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter "name":"table-name",
"orderBy":[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
"singlePass":True | False,
"vars":[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
"where":"where-expression",
"whereTable":{
"casLib":"string"
"dataSourceOptions":{adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}
"importOptions":{"fileType":"ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
required parameter "name":"table-name"
"vars":[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>]
"where":"where-expression"
}
},
varDef="DF" | "N" | "WDF" | "WEIGHT" | "WGT",
weight="variable-name"
)
indicates a required parameter

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.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

required parametertable

specifies the settings for an input table.

Parameters for Creating Output Tables

Parameter

Subparameter

Description

 code

casOut

writes SAS DATA step code for computing predicted values of the fitted model.

 outStat

required parametercasOut

specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors.

 output

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.

 outputTables

names

lists the names of results tables to save as CAS tables on the server.

 store

specifies the output table to be created to save model fit information that you can use for scoring.

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).

Aliases 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.

gpu={pca_gpu}

specifies the settings for graphics processing units (GPUs). If you specify the groupBy subparameter in the table parameter, the gpu parameter is ignored. If no GPU is available, the CPU is used to perform model computation.

"enable":True | False

when set to True, enables the action to use GPUs to perform model computation on GPU-equipped machines (one GPU is used on each machine).

Default False

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).

Aliases 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

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 (Form 1) 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.

Aliases 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

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 (Form 1) parameter (Appendix A: Common Parameters).

"rPrefix":"string"

specifies a prefix for naming the residual variables.

Aliases parPrefix
pPrefix
Default "R"

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

store={casouttable}

specifies the output table to be created to save model fit information that you can use for scoring.

For more information about specifying the store parameter, see the common casouttable (Form 1) parameter (Appendix A: Common Parameters).

Alias saveState

* table={castable}

specifies the settings for an input table.

For more information about specifying the table parameter, see the common castable (Form 1) 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

results <– cas.pca.eig(s,
attributes=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
code=list(
casOut=list(
caslib="string"
compress=TRUE | FALSE
indexVars=list("variable-name-1" <, "variable-name-2", ...>)
label="string"
lifetime=64-bit-integer
maxMemSize=64-bit-integer
memoryFormat="DVR" | "INHERIT" | "STANDARD"
name="table-name"
onDemand=TRUE | FALSE
promote=TRUE | FALSE
replace=TRUE | FALSE
replication=integer
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE"
threadBlockSize=64-bit-integer
timeStamp="string"
where=list("string-1" <, "string-2", ...>)
),
comment=TRUE | FALSE,
fmtWdth=integer,
indentSize=integer,
intoCutPt=double,
iProb=TRUE | FALSE,
labelId=integer,
lineSize=integer,
noTrim=TRUE | FALSE,
pCatAll=TRUE | FALSE,
tabForm=TRUE | FALSE
),
cov=TRUE | FALSE,
display=list(
caseSensitive=TRUE | FALSE,
exclude=TRUE | FALSE,
excludeAll=TRUE | FALSE,
keyIsPath=TRUE | FALSE,
names=list("string-1" <, "string-2", ...>),
pathType="LABEL" | "NAME",
traceNames=TRUE | FALSE
),
freq="variable-name",
gpu=list(
enable=TRUE | FALSE
),
groupbyLimit=64-bit-integer,
inputs=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
n=integer,
noInt=TRUE | FALSE,
output=list(
required parameter casOut=list(
caslib="string"
compress=TRUE | FALSE
indexVars=list("variable-name-1" <, "variable-name-2", ...>)
label="string"
lifetime=64-bit-integer
maxMemSize=64-bit-integer
memoryFormat="DVR" | "INHERIT" | "STANDARD"
name="table-name"
promote=TRUE | FALSE
replace=TRUE | FALSE
replication=integer
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE"
threadBlockSize=64-bit-integer
timeStamp="string"
where=list("string-1" <, "string-2", ...>)
),
copyVars=list("variable-name-1" <, "variable-name-2", ...>),
residual="string",
score="string"
),
outputTables=list(
groupByVarsRaw=TRUE | FALSE,
includeAll=TRUE | FALSE,
names=list("string-1" <, "string-2", ...>) | list(key-1=list(casouttable-1) <, key-2=list(casouttable-2), ...>),
repeated=TRUE | FALSE,
replace=TRUE | FALSE
),
outStat=list(
required parameter casOut=list(
caslib="string"
compress=TRUE | FALSE
indexVars=list("variable-name-1" <, "variable-name-2", ...>)
label="string"
lifetime=64-bit-integer
maxMemSize=64-bit-integer
memoryFormat="DVR" | "INHERIT" | "STANDARD"
name="table-name"
promote=TRUE | FALSE
replace=TRUE | FALSE
replication=integer
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE"
threadBlockSize=64-bit-integer
timeStamp="string"
where=list("string-1" <, "string-2", ...>)
),
rPrefix="string"
),
partial=list("variable-name-1" <, "variable-name-2", ...>),
prefix="string",
singular=double,
std=TRUE | FALSE,
store=list(
caslib="string",
compress=TRUE | FALSE,
indexVars=list("variable-name-1" <, "variable-name-2", ...>),
label="string",
lifetime=64-bit-integer,
maxMemSize=64-bit-integer,
memoryFormat="DVR" | "INHERIT" | "STANDARD",
name="table-name",
promote=TRUE | FALSE,
replace=TRUE | FALSE,
replication=integer,
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE",
threadBlockSize=64-bit-integer,
timeStamp="string",
where=list("string-1" <, "string-2", ...>)
),
required parameter table=list(
caslib="string",
computedOnDemand=TRUE | FALSE,
computedVars=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
computedVarsProgram="string",
dataSourceOptions=list(key-1=list(any-list-or-data-type-1) <, key-2=list(any-list-or-data-type-2), ...>),
groupBy=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
groupByMode="NOSORT" | "REDISTRIBUTE",
importOptions=list(fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters),
required parameter name="table-name",
orderBy=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
singlePass=TRUE | FALSE,
vars=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
where="where-expression",
whereTable=list(
casLib="string"
dataSourceOptions=list(adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters)
importOptions=list(fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters)
required parameter name="table-name"
vars=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>)
where="where-expression"
)
),
varDef="DF" | "N" | "WDF" | "WEIGHT" | "WGT",
weight="variable-name"
)
indicates a required parameter

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.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

required parametertable

specifies the settings for an input table.

Parameters for Creating Output Tables

Parameter

Subparameter

Description

 code

casOut

writes SAS DATA step code for computing predicted values of the fitted model.

 outStat

required parametercasOut

specifies the output table to be created to contain various statistics, including means, standard deviations, eigenvalues, and eigenvectors.

 output

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.

 outputTables

names

lists the names of results tables to save as CAS tables on the server.

 store

specifies the output table to be created to save model fit information that you can use for scoring.

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).

Aliases 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.

gpu=list(pca_gpu)

specifies the settings for graphics processing units (GPUs). If you specify the groupBy subparameter in the table parameter, the gpu parameter is ignored. If no GPU is available, the CPU is used to perform model computation.

enable=TRUE | FALSE

when set to True, enables the action to use GPUs to perform model computation on GPU-equipped machines (one GPU is used on each machine).

Default FALSE

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).

Aliases 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

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 (Form 1) 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.

Aliases 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

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 (Form 1) parameter (Appendix A: Common Parameters).

rPrefix="string"

specifies a prefix for naming the residual variables.

Aliases parPrefix
pPrefix
Default "R"

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

store=list(casouttable)

specifies the output table to be created to save model fit information that you can use for scoring.

For more information about specifying the store parameter, see the common casouttable (Form 1) parameter (Appendix A: Common Parameters).

Alias saveState

* table=list(castable)

specifies the settings for an input table.

For more information about specifying the table parameter, see the common castable (Form 1) 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.

Last updated: March 05, 2026