GVARCLUS Procedure

PROC GVARCLUS Statement

  • PROC GVARCLUS <options>;

The PROC GVARCLUS statement invokes the procedure. Table 1 summarizes the important options in the PROC GVARCLUS statement by function. The options are then described fully in alphabetical order.

Table 1: PROC GVARCLUS Statement Options

Option Description
Basic Options
DATA= Specifies the input data table
Options Related to Variable Clustering
EXACT Performs graphical variable clustering without preprocessing
MAXITER= Specifies the maximum number of iterations for each estimation step
MAXMEMBER= Specifies the maximum number of members within each final cluster
MAXSTEP= Specifies the maximum number of clustering steps
MINCLUSTER= Specifies the minimum number of clusters
RHO= Specifies the initial value of the regularization parameter
SELECT= Selects the optimal clustering on the basis of the specified criterion
STOP= Requests that the clustering process stop if the clustering structure does not change in the previous number of specified steps
TOL= Specifies the threshold of convergence
Options for Output Tables
OUTCP= Outputs the covariance matrix from the last step
OUTEDGE= Outputs the edges for defining an undirected network
OUTTREE= Outputs the hierarchical clustering results in a tree structure
OUTVERT= Outputs the vertices and their size for defining an undirected network


You can specify the following options:

DATA=libref.data-table

names the input data table for PROC GVARCLUS to use. The default is the most recently created data table. libref.data-table is a two-level name, where

libref

refers to a collection of information that is defined in the LIBNAME statement and includes the library, which includes a path to the data, and a session identifier, which defaults to the active session but which can be explicitly defined in the LIBNAME statement. For more information about libref, see the section Using CAS Sessions and CAS Engine Librefs.

data-table

specifies the name of the input data table.

EXACT

performs graphical variable clustering without preprocessing by thresholding the sample covariance into connected components. By default, the preprocessing step is performed.

MAXITER=n
MAXITERS=n

specifies the maximum number of iterations for estimating the sparse precision matrix by using coordinate descent. By default, MAXITER=50.

MAXMEMBER=n
MAXMEMBERS=n

stops PROC GVARCLUS when the number of members within any cluster is greater than or equal to n.

MAXSTEP=n
MAXSTEPS=n

stops PROC GVARCLUS after it runs n steps. By default, MAXSTEP=3.

MINCLUSTER=n
MINCLUSTERS=n

stops PROC GVARCLUS when the number of clusters is less than or equal to n. By default, MINCLUSTER=3.

OUTCP=libref.data-table < / LIST <EPS=number>>

creates a data table that contains a covariance matrix that depicts the relationships among variables and also creates a set of statistics about the input data table and variables. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.

When you specify the LIST option, the symmetric matrix is output in the list-of-list (LIL) format. In this format, the matrix is represented as a set of tuples left-parenthesis i comma j comma x right-parenthesis, where x is an entry in the matrix and i and j denote its row and column indices, respectively. LIL format can be used when the output contains too many columns to fit in a data table. For example, in most database systems, the maximum number of columns in a table is usually limited to several thousand. If an output matrix contains more columns than the limit, you must use the LIST option in order to avoid errors that would arise from writing too many columns to the table. When LIL format is used, all entries in the matrix that have a value of 0 are ignored in the output.

When you specify EPS=number in the LIST suboption, matrix entries whose absolute value is smaller than number are ignored in the output. This feature helps omit unreliable estimations and generate a compact representation of the matrix. When you do not specify the EPS= option, only the 0 entries in the matrix are ignored in the output.

OUTEDGE=libref.data-table

creates a data table that contains the information that defines the edges in the network, normal barFROMnormal bar, normal barTOnormal bar, and normal barWEIGHTnormal bar. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.

OUTTREE=libref.data-table

creates a data table that depicts a tree diagram to display the hierarchical clustering results. The tree diagram can be plotted using the DENDROGRAM statement in the Graph Template Language. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.

OUTVERT=libref.data-table

creates a data table that contains the vertices in the network and their size. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.

RHO=fraction

specifies the value of rho that determines the sequence of regularization parameters, StartSet rho Superscript 1 Baseline comma rho squared comma rho cubed comma ellipsis EndSet, that are used on sequential clustering steps. The higher the rho value, the more regularization and the sparser the inverse covariance. By default, RHO=0.8.

SELECT=NONE | PENALIZED

selects the optimal clustering on the basis of the specified criterion. You can specify the following values:

NONE

performs no selection, and the output tables of the edges and vertices of the network reflect the clustering from the last step.

PENALIZED

performs selection through minimizing the penalized log likelihood, as shown in the section Selection.

By default, SELECT=NONE.

STOP=n

requests that the procedure stop if the clustering results do not change in the previous n consecutive steps. By default, STOP=3.

TOLERANCE=fraction
TOL=fraction

specifies the minimal absolute tolerance at which an iteration stops. The tolerance number must be equal to or greater than 1.0E–12. By default, TOLERANCE=1.0E–3.

Last updated: August 06, 2026