The MBC Procedure

OUTPUT Statement

  • OUTPUT OUT=CAS-libref.data-table <options>;

The OUTPUT statement creates a data table that contains observationwise statistics that PROC MBC computes after fitting the model. The variables in the input data table are not included in the output data table, in order to avoid data duplication for large data tables; however, variables that you specify in the COPYVAR= option are included. The output statistics are computed on the basis of the final parameter estimates. If no model converges, then the output data table is not created.

You must specify the following option:

OUT=CAS-libref.data-table

names the output data table for PROC MBC to use. You must specify this option before any other options. CAS-libref.data-table is a two-level name, where

CAS-libref

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

data-table

specifies the name of the output data table.

You can also specify the following options:

ALL
ALLSTAT

adds all available statistics to the output data table.

COPYVAR=variable
COPYVARS=(variables)

transfers one or more variables from the input data table to the output data table.

keyword <=name>

specifies a statistic to include in the output data table and optionally names the variable name. If you provide the keyword but do not provide a name, PROC MBC assigns a default name that is based on the type of statistic requested. PROC MBC produces the NEXTCLUS statistics even if you do not provide the corresponding keyword.

Table 12.2 summarizes the keywords available in the OUTPUT statement.

Table 12.2: OUTPUT Statement Keywords

Keyword

Description

Default Name

Statistic Options

CURRCLUS

Specifies the cluster weights that produce the final parameter estimates

CURR

LOGLIK

Specifies the log likelihood produced by the final parameter estimates

LOGLIK

MAXPOST

Specifies the index of the component with the maximum posterior probability

MAXPOST

NEXTCLUS

Specifies the cluster weights produced by the final parameter estimates

NEXT


The following list describes these keywords. For more information, see the section Posterior Probabilities and Clustering.

CURRCLUS <=name>

specifies the cluster weights that produce the final parameter estimates. The default name is CURRn, where n indicates the cluster index. You can modify the name by specifying the name option.

LOGLIK <=name>

specifies the component and total log likelihood by using the final parameter estimates. The default name for the component log likelihoods is LOGLIKn, where n indicates the cluster index. The default name for the total log likelihood is LOGLIK. You can modify this name by specifying the name option.

MAXPOST <=name>

specifies the identification of the cluster that has the maximum posterior weight by using the final parameter estimates. The default name is MAXPOST. You can modify this name by specifying the name option.

NEXTCLUS <=name>

specifies the cluster weights that the final parameter estimates produce. The default name is NEXTn, where n indicates the cluster index. You can modify the name by specifying the name option.

Last updated: December 21, 2018