SAS/STAT 9.1 Users Guide, Volumes 1-7

The following statements are available in PROC CANDISC.

The BY, CLASS, FREQ, VAR, and WEIGHT statements are described after the PROC CANDISC statement.

PROC CANDISC Statement

This statement invokes the CANDISC procedure. The options listed in the following table can appear in the PROC CANDISC statement.

Table 21.1: CANDISC Procedure Options

Task

Options

Specify Data Sets

DATA=

OUT=

OUTSTAT=

Control Canonical Variables

NCAN=

PREFIX=

Determine Singularity

SINGULAR=

Control Displayed Correlations

BCORR

PCORR

TCORR

WCORR

Control Displayed Covariances

BCOV

PCOV

TCOV

WCOV

Control Displayed SSCP Matrices

BSSCP

PSSCP

TSSCP

WSSCP

Suppress Output

NOPRINT

SHORT

Miscellaneous

ALL

ANOVA

DISTANCE

SIMPLE

STDMEAN

ALL

ANOVA

BCORR

BCOV

BSSCP

DATA= SAS-data-set

DISTANCE

NCAN= n

NOPRINT

OUT = SAS-data-set

OUTSTAT= SAS-data-set

PCORR

PCOV

PREFIX= name

PSSCP

SHORT

SIMPLE

SINGULAR= p

STDMEAN

TCORR

TCOV

TSSCP

WCORR

WCOV

WSSCP

BY Statement

You can specify a BY statement with PROC CANDISC to obtain separate analyses on observations in groups defined by the BY variables. When a BY statement appears, the procedure expects the input data set to be sorted in order of the BY variables.

If your input data set is not sorted in ascending order, use one of the following alternatives:

For more information on the BY statement, refer to the discussion in SAS Language Reference: Concepts . For more information on the DATASETS procedure, refer to the discussion in the SAS Procedures Guide .

CLASS Statement

The values of the CLASS variable define the groups for analysis. Class levels are determined by the formatted values of the CLASS variable. The CLASS variable can be numeric or character. A CLASS statement is required.

FREQ Statement

If a variable in the data set represents the frequency of occurrence for the other values in the observation, include the name of the variable in a FREQ statement. The procedure then treats the data set as if each observation appears n times, where n is the value of the FREQ variable for the observation. The total number of observations is considered to be equal to the sum of the FREQ variable when the procedure determines degrees of freedom for significance probabilities.

If the value of the FREQ variable is missing or is less than one, the observation is not used in the analysis. If the value is not an integer, the value is truncated to an integer.

VAR Statement

You specify the quantitative variables to include in the analysis using a VAR statement. If you do not use a VAR statement, the analysis includes all numeric variables not listed in other statements.

WEIGHT Statement

To use relative weights for each observation in the input data set, place the weights in a variable in the data set and specify the name in a WEIGHT statement. This is often done when the variance associated with each observation is different and the values of the WEIGHT variable are proportional to the reciprocals of the variances. If the value of the WEIGHT variable is missing or is less than zero, then a value of zero for the weight is assumed.

The WEIGHT and FREQ statements have a similar effect except that the WEIGHT statement does not alter the degrees of freedom.

Категории