FOCUS AREAS


Contents | SAS Program | PDF

The %MktEval Macro

Introduction

The %MktEval autocall macro evaluates an experimental design for a linear model and reports on balance and orthogonality. You usually run it immediately after using the %MktEx macro. You do not call it after using the %ChoicEff macro to make a choice design. The descriptive statistics that the %MktEval macro produces are appropriate for linear models, not choice models. However, you can reasonably use the %MktEval macro with a linear arrangement that is to be transformed into a choice design later—for example, after using the %MkRoll macro.

The output from the %MktEval macro contains two default tables. The first table shows the canonical correlations between pairs of coded factors. A canonical correlation is the maximum correlation between linear combinations of the coded factors. A design that is orthogonal for main effects has all zeros on the off-diagonal elements of the canonical correlation matrix. The second table lists off-diagonal canonical correlations greater than 0.316 $(r^2 > 0.1)$.

For nonorthogonal designs and designs with interactions, the canonical-correlation matrix is not a substitute for using the %MktEx macro to look at the variance matrix. It just provides a quick and more compact picture of the correlations between the factors. The variance matrix is sensitive to the actual model that is specified and the coding. The canonical-correlation matrix just tells you whether there is some correlation between the main effects. When is a canonical correlation too big? You have to decide that for yourself. In part, the answer depends on the factors and how the design will be used. For example, a high correlation between the client’s and the main competitor’s price factor is a serious problem, indicating that you will need to use a different design. In contrast, a moderate correlation in a choice design between one brand’s minor attribute and another brand’s minor attribute might be perfectly fine.

The %MktEval macro also displays one-way, two-way, and n-way frequencies. Equal one-way frequencies occur when the design is balanced. Equal two-way frequencies occur when the design is orthogonal. Equal n-way frequencies, all equal to 1, occur when there are no duplicate runs or choice sets.

%MktEval Macro Syntax

%MktEval( <optional arguments>)

Optional Arguments

BLOCKS=variable

specifies a blocking variable. This argument displays separate canonical correlations within each block. By default, there is one block.

DATA=SAS-data-set

specifies the input SAS data set that contains the experimental design to be evaluated. By default, the macro uses the last data set that is created.

FACTORS=variable-list
VARS=variable-list

specifies a list of the factors in the experimental design. The default is all the numeric variables in the data set.

FREQS=frequency-list

specifies the frequencies to display. By default, FREQS=1 2 n, and 1-way, 2-way, and n-way frequencies, respectively, are displayed. Do not specify the exact number of ways instead of n. For ways other than n, the macro checks for and displays zero cell frequencies. For n-ways, the macro does not output or display zero frequencies. Only the full-factorial design has nonzero cells, so specifying something like FREQS=1 2 20 will cause the macro to take a long time; it will try to create huge data sets and can run out of memory or disk space before it is done. However, if FREQS=1 2 n, the macro usually runs in a reasonable amount of time.

FORMAT=format

specifies the format for displaying the canonical correlations. By default, FORMAT=4.2.

LIST=n

specifies the minimum canonical correlation to list. The default is 0.316, the square root of $r^2 = 0.1$.

OUTCORR=SAS-data-set

specifies the output SAS data set for the canonical correlation matrix. By default, OUTCORR=CORR.

OUTCB=SAS-data-set

specifies the output SAS data set for the within-block canonical correlation matrices. By default, OUTCB=CB.

OUTLIST=SAS-data-set

specifies the output data set for the list of largest canonical correlations. By default, OUTLIST=List.

OUTFREQ=SAS-data-set

specifies the output data set for the frequencies. By default, OUTFREQ=Freq.

OUTFSUM=SAS-data-set

specifies the output data set for the frequency summaries. By default, OUTFSUM=Fsum.

PRINT=print-options

controls the display of the results. You can specify one or more of the following print-options:

ALL

displays all output.

CORR

displays the canonical correlations matrix.

BLOCK

displays the canonical correlations within block.

FREQS

displays the frequencies, which are specified by the FREQS= argument.

GRAPH

displays a heat map of canonical correlations.

LIST

displays the list of canonical correlations greater than the LIST= argument value.

NONZERO

is the same as ORDERED but sets LIST=1e-6.

NOPRINT

displays no output.

ORDERED

is the same as LIST but orders by variable names.

SHORT

is equivalent to CORR LIST SUMM BLOCK.

SUMM

displays the frequency summaries.

By default, PRINT=SHORT. Also by default, the frequency list, which contains the factor names, levels, and frequencies, is not displayed. The more compact frequency summary list, which contains the factors and frequencies but not the levels, is displayed by default.

Help Option

You can specify either of the following to display the option names and simple examples of the macro syntax:

%mkteval(help)
%mkteval(?)

%MktEval Macro Notes

This macro specifies options nonotes throughout most of its execution. If you want to see all the notes, submit the following statement before running the macro:

%let mktopts = notes;

To see the macro version, submit the following statement before running the macro:

%let mktopts = version;

Example

The following statement creates a design by using the %MktEx macro:

%mktex(2 2 3 ** 6, n=18, balance=0, mintry=5*18, seed=289)

By default, the %MktEx macro saves a randomized version of the design in a data set named Randomized. The following invocation of the %MktEval macro evaluates the design:


%mkteval(data=randomized)

Figure 1 shows the output of the %MktEval macro.

Figure 1: %MktEval Macro Output

Canonical Correlations Between the Factors
There is 1 Canonical Correlation Greater Than 0.316

x1 x2 x3 x4 x5 x6 x7 x8
x1 1 0.33 0 0 0 0 0 0
x2 0.33 1 0 0 0 0 0 0
x3 0 0 1 0 0 0 0 0
x4 0 0 0 1 0 0 0 0
x5 0 0 0 0 1 0 0 0
x6 0 0 0 0 0 1 0 0
x7 0 0 0 0 0 0 1 0
x8 0 0 0 0 0 0 0 1

Canonical Correlations > 0.316 Between the Factors
There is 1 Canonical Correlation Greater Than 0.316


r

r Square
x1 x2 0.33 0.11

Summary of Frequencies
There is 1 Canonical Correlation Greater Than 0.316
* - Indicates Unequal Frequencies

Frequencies
  x1 9 9
  x2 9 9
  x3 6 6 6
  x4 6 6 6
  x5 6 6 6
  x6 6 6 6
  x7 6 6 6
  x8 6 6 6
* x1 x2 3 6 6 3
  x1 x3 3 3 3 3 3 3
  x1 x4 3 3 3 3 3 3
  x1 x5 3 3 3 3 3 3
  x1 x6 3 3 3 3 3 3
  x1 x7 3 3 3 3 3 3
  x1 x8 3 3 3 3 3 3
  x2 x3 3 3 3 3 3 3
  x2 x4 3 3 3 3 3 3
  x2 x5 3 3 3 3 3 3
  x2 x6 3 3 3 3 3 3
  x2 x7 3 3 3 3 3 3
  x2 x8 3 3 3 3 3 3
  x3 x4 2 2 2 2 2 2 2 2 2
  x3 x5 2 2 2 2 2 2 2 2 2
  x3 x6 2 2 2 2 2 2 2 2 2
  x3 x7 2 2 2 2 2 2 2 2 2
  x3 x8 2 2 2 2 2 2 2 2 2
  x4 x5 2 2 2 2 2 2 2 2 2
  x4 x6 2 2 2 2 2 2 2 2 2
  x4 x7 2 2 2 2 2 2 2 2 2
  x4 x8 2 2 2 2 2 2 2 2 2
  x5 x6 2 2 2 2 2 2 2 2 2
  x5 x7 2 2 2 2 2 2 2 2 2
  x5 x8 2 2 2 2 2 2 2 2 2
  x6 x7 2 2 2 2 2 2 2 2 2
  x6 x8 2 2 2 2 2 2 2 2 2
  x7 x8 2 2 2 2 2 2 2 2 2
  N-Way 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1


The results show that all the factors in this design are perfectly balanced, and almost all are orthogonal, but X1 and X2 are correlated with each other.