
AGREE < (options)>

requests the simple and weighted kappa coefficients with their standard errors and confidence limits. Kappa coefficients can
be computed for square twoway tables, where the number of rows equals the number of columns. For tables, the weighted kappa coefficient equals the simple kappa coefficient, and PROC SURVEYFREQ displays only the simple
kappa coefficient. For more information, see the section Kappa Coefficients.
Kappa coefficients are available when you specify variance estimation by the jackknife method (VARMETHOD=JACKKNIFE
) or by balanced repeated replication (VARMETHOD=BRR
); kappa coefficients are not available with the Taylor series method (VARMETHOD=TAYLOR
).
The weighted kappa coefficient is computed by using agreement weights that reflect the relative agreement between pairs of
variable levels. Agreement weights are not the same as sampling weights, which you provide by specifying the WEIGHT
statement. PROC SURVEYFREQ uses sampling weights to compute both the simple and weighted kappa coefficients. For more information,
see the section Weighted Kappa Coefficient.
You can specify the level for the kappa confidence limits in the ALPHA=
option. By default, ALPHA=0.05, which produces 95% confidence limits.
You can request the simple kappa coefficient or the weighted kappa coefficient separately by specifying the KAPPA
or WTKAPPA
option, respectively.
You can specify the following options:

PRINTKWTS

displays the agreement weights that PROC SURVEYFREQ uses to compute the weighted kappa coefficient. Agreement weights reflect
the relative agreement between pairs of variable levels. By default, PROC SURVEYFREQ uses the CicchettiAllison form of agreement
weights. If you specify the WT=FC
option, the procedure uses the FleissCohen form of agreement weights. For more information, see the section Weighted Kappa Coefficient.

WT=FC

requests FleissCohen agreement weights for the weighted kappa computation. By default, PROC SURVEYFREQ uses CicchettiAllison
agreement weights to compute the weighted kappa coefficient. Agreement weights reflect the relative agreement between pairs
of variable levels. For more information, see the section Weighted Kappa Coefficient.

ALPHA=

specifies the level for confidence limits. The value of must be between 0 and 1; a confidence level of produces % confidence limits. By default, ALPHA=0.05, which produces 95% confidence limits.
You can request confidence limits for percentages by specifying the CL
option, and you can request confidence limits for weighted frequencies by specifying the CLWT
option. For more information, see the sections Confidence Limits for Proportions and Confidence Limits for Totals.
The ALPHA= option also applies to confidence limits for the risks and risk difference (which you can request by specifying
the RISK
option) and to confidence limits for the odds ratio and relative risks (which you can request by specifying the OR
option). For more information, see the sections Risks and Risk Difference and Odds Ratio and Relative Risks.

CELLCHI2

displays each table cell’s contribution to the Pearson chisquare statistic in the crosstabulation table. The cell chisquare
is computed as , where weighted frequency is the weighted frequency of the table cell and expected is the expected weighted frequency, which is computed under the null hypothesis that the row and column variables are independent.
You can display the expected weighted frequencies by specifying the EXPECTED
option, and you can display the deviations (weighted frequency – expected) by specifying the DEVIATION
option. For more information, see the sections Expected Weighted Frequency and RaoScott ChiSquare Test. This option has no effect for oneway tables.

CHISQ < (options)>

requests the RaoScott chisquare test. This is a designadjusted test that is computed by applying a design correction to
the weighted Pearson chisquare statistic. By default, PROC SURVEYFREQ provides a firstorder RaoScott chisquare test. If
you specify CHISQ(SECONDORDER)
, the procedure provides a secondorder (Satterthwaite) RaoScott chisquare test. For more information, see the section RaoScott ChiSquare Test.
For oneway tables, the CHISQ option produces a designbased goodnessoffit test. By default, this is a goodnessoffit test
for equal proportions. If you specify the null hypothesis proportions in the TESTP=
option, the CHISQ option produces a chisquare goodnessoffit test for the specified proportions.
By default for oneway tables, and for firstorder tests for twoway tables, the design correction is computed from proportion
estimates. If you specify CHISQ(MODIFIED)
, the design correction is computed from null hypothesis proportions. For secondorder tests for twoway tables, the design
correction is always computed from null hypothesis proportions.
You can specify the following options:

FIRSTORDER

requests a firstorder RaoScott chisquare test. This is the default for the CHISQ option; if you do not specify CHISQ(SECONDORDER)
, the procedure provides a firstorder RaoScott test.

MODIFIED

uses the null hypothesis proportions to compute the RaoScott design correction. By default (if you do not specify CHISQ(MODIFIED)),
the procedure uses proportion estimates to compute the design correction for all firstorder tests and for secondorder tests
for oneway tables. For secondorder tests for twoway tables, the procedure always uses null hypothesis proportions to compute
the design correction.

SECONDORDER

requests a secondorder (Satterthwaite) RaoScott chisquare test. For more information, see the section RaoScott ChiSquare Test.

CL < (options)>

requests confidence limits for the percentages (proportions) in the crosstabulation table. By default, PROC SURVEYFREQ computes
standard Wald ("linear") confidence limits for proportions by using the variance estimates that are based on the sample design.
For more information, see the section Confidence Limits for Proportions. You can specify the confidence level in the ALPHA=
option. By default, ALPHA=0.05, which produces 95% confidence limits.
You can specify options in parentheses after the CL option to control the confidence limit computations. You can use the TYPE=
option to request an alternative confidence limit type. In addition to Wald confidence limits, the following types of designbased
confidence limits are available for proportions: modified ClopperPearson (exact), modified Wilson (score), and logit confidence
limits.
If you specify the PSMALL
option, PROC SURVEYFREQ uses the alternative confidence limit type for extreme (small or large) proportion estimates and
uses Wald confidence limits for all other proportion estimates. If you do not specify the PSMALL option, PROC SURVEYFREQ computes
the specified confidence limit type for all proportion values.
You can specify the following options:

ADJUST=NO  YES

controls the degreesoffreedom adjustment to the effective sample size for the modified ClopperPearson and Wilson confidence
limits. By default, ADJUST=YES. If you specify ADJUST=NO, the confidence limit computations do not apply the degreesoffreedom
adjustment to the effective sample size. For more information, see the section Modified Confidence Limits.
The ADJUST= option is available for TYPE=CLOPPERPEARSON
and TYPE=WILSON
confidence limits.

PSMALL < =p >

uses the alternative confidence limit type that you specify in the TYPE= option for extreme (small or large) proportion values.
The PSMALL value p defines the range of extreme proportion values, where those proportions less than or equal to p or greater than or equal to (1 – p) are considered to be extreme, and those proportions between p and (1 – p) are not extreme. If you do not specify a PSMALL value p, PROC SURVEYFREQ uses p = 0.25 by default. For , the procedure computes Wald confidence limits for proportions between 0.25 and 0.75 and computes the alternative confidence
limit type for proportions less than or equal to 0.25 or greater than or equal to 0.75.
The PSMALL value p must be a nonnegative number. You can specify p as a proportion between 0 and 0.5. Or you can specify p in percentage form as a number between 1 and 50, and PROC SURVEYFREQ converts that number to a proportion. The procedure
treats the value 1 as the percentage form 1%.
The PSMALL option is available for TYPE=CLOPPERPEARSON
, TYPE=LOGIT
, and TYPE=WILSON
confidence limits. For more information, see the section Confidence Limits for Proportions.

TRUNCATE=NO  YES

controls the truncation of the effective sample size for the modified ClopperPearson and Wilson confidence limits. By default,
TRUNCATE=YES truncates the effective sample size if it is larger than the original sample size. If you specify TRUNCATE=NO,
the effective sample size is not truncated. For more information, see the section Modified Confidence Limits.
The TRUNCATE= option is available for TYPE=CLOPPERPEARSON
and TYPE=WILSON
confidence limits.

TYPE=type

specifies the type of confidence limits to compute for proportions. If you do not specify the TYPE= option, PROC SURVEYFREQ computes Wald confidence
limits (TYPE=WALD) by default.
If you specify the CL(PSMALL)
option, the procedure uses the specified confidence limit type for extreme proportions (outside the PSMALL range) and uses
Wald confidence limits for proportions that are not outside the range. If you do not specify the CL(PSMALL) option, the procedure
uses the specified confidence limit type for all proportions.
You can specify one of the following confidence limit types:

CLOPPERPEARSON
CP

requests modified ClopperPearson (exact) confidence limits for proportions. For more information, see the section Modified ClopperPearson Confidence Limits.

LOGIT

requests logit confidence limits for proportions. For more information, see the section Logit Confidence Limits.

WALD

requests standard Wald ("linear") confidence limits for proportions. This is the default confidence limit type if you do not
specify the TYPE= option. For more information, see the section Wald Confidence Limits.

WILSON
SCORE

requests modified Wilson (score) confidence limits for proportions. For more information, see the section Modified Wilson Confidence Limits.

CLWT

requests confidence limits for the weighted frequencies (totals) in the crosstabulation table. You can specify the confidence
level in the ALPHA=
option. By default, ALPHA=0.05, which produces 95% confidence limits. For more information, see the section Confidence Limits for Totals.

COLUMN < (option)>

displays the column percentage (estimated proportion of the column total) for each cell in a twoway table. The COLUMN option
also provides the standard errors of the column percentages. For more information, see the section Row and Column Proportions. This option has no effect for oneway tables.
You can specify the following option:

DEFF

displays the design effect for each column percentage in the crosstabulation table. For more information, see the section
Design Effect.

COV

requests the covariance matrix of the table cell frequency estimates. For more information, see the section Covariances of Frequency Estimates.

COVP

requests the covariance matrix of the proportion estimates.

CV

displays the coefficient of variation for each percentage (proportion) estimate in the crosstabulation table. For more information,
see the section Coefficient of Variation.

CVWT

displays the coefficient of variation for each weighted frequency (estimated total), in the crosstabulation table. For more
information, see the section Coefficient of Variation.

DEFF

displays the design effect for each overall percentage (proportion) estimate in the crosstabulation table. For more information,
see the section Design Effect.
To request design effects for row or column percentages, specify the DEFF option in parentheses after the ROW
or COLUMN
option.

DEVIATION

displays the deviations of the weighted frequencies from the expected weighted frequencies (weighted frequency – expected) in the crosstabulation table. The expected weighted frequencies are computed under the null hypothesis that the row and
column variables are independent. You can display the expected values by specifying the EXPECTED
option. For more information, see the section Expected Weighted Frequency. This option has no effect for oneway tables.

DF=df

specifies the degrees of freedom for the analysis. The value of df must be a nonnegative number. By default, PROC SURVEYFREQ computes the degrees of freedom as described in the section Degrees of Freedom.
PROC SURVEYFREQ uses the value df to obtain the tpercentile for confidence limits for proportions, totals, and other statistics. For more information, see the section Confidence Limits for Proportions. PROC SURVEYFREQ also uses df to compute the denominator degrees of freedom for the F statistics in the RaoScott and Wald chisquare tests. For more information, see the sections RaoScott ChiSquare Test, RaoScott Likelihood Ratio ChiSquare Test, Wald ChiSquare Test, and Wald LogLinear ChiSquare Test.

EXPECTED

displays the expected weighted frequencies for the cells in the crosstabulation table. The expected weighted frequencies are
computed under the null hypothesis that the row and column variables are independent. For more information, see the section
Expected Weighted Frequency. This option has no effect for oneway tables.

KAPPA

requests the simple kappa coefficient with its standard error and confidence limits. The kappa coefficient can be computed
for square twoway tables, where the number of rows equals the number of columns. For more information, see the section Simple Kappa Coefficient.
The kappa coefficient is available when you specify variance estimation by the jackknife method (VARMETHOD=JACKKNIFE
) or by balanced repeated replication (VARMETHOD=BRR
); the kappa coefficient is not available with the Taylor series method (VARMETHOD=TAYLOR
).
You can specify the level for the kappa confidence limits in the ALPHA=
option. By default, ALPHA=0.05, which produces 95% confidence limits.

LRCHISQ < (options)>

requests the RaoScott likelihood ratio chisquare test. This is a designadjusted test that is computed by applying a design
correction to the weighted likelihood ratio chisquare statistic. By default, PROC SURVEYFREQ provides a firstorder RaoScott
likelihood ratio test. If you specify LRCHISQ(SECONDORDER)
, the procedure provides a secondorder (Satterthwaite) RaoScott likelihood ratio test. For more information, see the section
RaoScott Likelihood Ratio ChiSquare Test.
For oneway tables, the LRCHISQ option produces a designbased likelihood ratio goodnessoffit test. By default, the null
hypothesis is equal proportions. If you specify null hypothesis proportions in the TESTP=
option, the LRCHISQ option produces a designbased likelihood ratio test for the specified proportions.
By default for oneway tables, and for firstorder tests for twoway tables, the design correction is computed from proportion
estimates. If you specify LRCHISQ(MODIFIED)
, the design correction is computed from null hypothesis proportions. For secondorder tests for twoway tables, the design
correction is always computed from null hypothesis proportions.
You can specify the following options:

FIRSTORDER

requests a firstorder RaoScott likelihood ratio test. This is the default for the LRCHISQ option; if you do not specify
LRCHISQ(SECONDORDER)
, the procedure provides a firstorder RaoScott test.

MODIFIED

uses the null hypothesis proportions to compute the RaoScott design correction. By default (if you do not specify LRCHISQ(MODIFIED)),
the procedure uses proportion estimates to compute the design correction for all firstorder tests and for secondorder tests
for oneway tables. For secondorder tests for twoway tables, the procedure always uses null hypothesis proportions to compute
the design correction.

SECONDORDER

requests a secondorder (Satterthwaite) RaoScott likelihood ratio test. For more information, see the section RaoScott Likelihood Ratio ChiSquare Test.

NOCELLPERCENT

suppresses the display of overall cell percentages in the crosstabulation table, as well as the standard errors of the percentages.
The NOCELLPERCENT option does not suppress the display of row or column percentages, which you can request by specifying the
ROW
or COLUMN
option.

NOFREQ

suppresses the display of cell frequencies in the crosstabulation table. The NOFREQ option also suppresses the display of
row, column, and overall table frequencies.

NOPERCENT

suppresses the display of all percentages in the crosstabulation table. The NOPERCENT option also suppresses the display of
standard errors of the percentages. Use the NOCELLPERCENT
option to suppress display of overall cell percentages but allow display of row or column percentages.

NOPRINT

suppresses the display of frequency and crosstabulation tables but displays all requested statistical tests. This option disables
the Output Delivery System (ODS) for the suppressed tables. For more information, see Chapter 20: Using the Output Delivery System.

NOSPARSE

suppresses the display of variable levels with zero frequency in twoway tables. By default, the procedure displays all levels
of the column variable within each level of the row variable, including any column variable levels with zero frequency for
that row. For multiway tables, the procedure displays all levels of the row variable for each layer of the table by default,
including any row variable levels with zero frequency for the layer.

NOSTD

suppresses the display of all standard errors in the crosstabulation table.

NOTOTAL

suppresses the display of row totals, column totals, and overall totals in the crosstabulation table.

NOWT

suppresses the display of weighted frequencies in the crosstabulation table. The NOWT option also suppresses the display of
standard errors of the weighted frequencies.

OR
RELRISK

requests estimates of the odds ratio, the column 1 relative risk, and the column 2 relative risk for tables. The OR option also provides confidence limits for these statistics. For more information, see the section Odds Ratio and Relative Risks.
You can specify the confidence level in the ALPHA=
option. By default, ALPHA=0.05, which produces 95% confidence limits.

PEARSONRES

displays each crosstabulation table cell’s Pearson residual, which is the square root of the table cell’s contribution to
the Pearson chisquare statistic. The Pearson residual is computed as , where weighted frequency is the weighted frequency of the table cell and expected is the expected weighted frequency, which is computed under the null hypothesis that the row and column variables are independent.
You can display the expected values, the deviations, and the cell chisquares by specifying the EXPECTED
, DEVIATION
, and CELLCHI2
options, respectively. For more information, see the sections Expected Weighted Frequency and RaoScott ChiSquare Test. This option has no effect for oneway tables.

PLOTS < (globalplotoptions)> < =plotrequest < (plotoptions)> >
PLOTS < (globalplotoptions)>
< =(plotrequest < (plotoptions)> < …plotrequest < (plotoptions)> > )>

controls the plots that are produced through ODS Graphics. Plotrequests identify the plots, and plotoptions control the appearance and content of the plots. You can specify plotoptions in parentheses after a plotrequest. A globalplotoption applies to all plots for which it is available unless it is altered by a specific plotoption. You can specify globalplotoptions in parentheses after the PLOTS option.
When you specify only one plotrequest, you can omit the parentheses around the plotrequest. For example:
plots=all
plots=wtfreqplot
plots=(wtfreqplot oddsratioplot)
plots(only)=(riskdiffplot relriskplot)
ODS Graphics must be enabled before plots can be requested. For example:
ods graphics on;
proc surveyfreq;
tables treatment*response / chisq plots=wtfreqplot;
weight wt;
run;
ods graphics off;
For more information about enabling and disabling ODS Graphics, see the section Enabling and Disabling ODS Graphics in Chapter 21: Statistical Graphics Using ODS.
If ODS Graphics is enabled but you do not specify the PLOTS= option, PROC SURVEYFREQ produces all plots that are associated
with the analyses that you request, with the exception of weighted frequency plots and mosaic plots. To produce a weighted
frequency plot or mosaic plot when ODS Graphics is enabled, you must specify the WTFREQPLOT
or MOSAICPLOT
plotrequest, or you must specify the PLOTS=ALL
option. PROC SURVEYFREQ produces the remaining plots (listed in Table 97.5) by default when you request the corresponding TABLES statement options.
You can suppress default plots and request specific plots by using the PLOTS(ONLY)=
option; PLOTS(ONLY)=(plotrequests) produces only the plots that are specified as plotrequests. You can suppress all plots by specifying the PLOTS=NONE
option.
See Figure 97.4 and Figure 97.7 for examples of plots that PROC SURVEYFREQ produces. For information about ODS Graphics, see Chapter 21: Statistical Graphics Using ODS.
Plot Requests
Table 97.5 lists the available plotrequests together with their required TABLES statement options. Descriptions of the plotrequests follow the table in alphabetical order.
Table 97.5: Plot Requests
The following plotrequests are available:

ALL

requests all plots that are associated with the specified analyses. If you specify the PLOTS=ALL option, PROC SURVEYFREQ also
produces the weighted frequency and mosaic plots that are associated with the tables that you request. (PROC SURVEYFREQ does
not produce weighted frequency and mosaic plots by default when ODS Graphics is enabled.)

KAPPAPLOT < (plotoptions)>

requests a plot of kappa coefficients with confidence limits. Kappa plots are available for multiway square tables and display
the simple kappa coefficient (with confidence limits) for each twoway table layer. To produce a kappa plot, you must specify
the KAPPA
or AGREE
option in the TABLES
statement to compute kappa coefficients.
Table 97.6 lists the plotoptions that are available for kappa plots. For descriptions of the plotoptions, see the subsection "Plot Options."
Table 97.6: Plot Options for KAPPAPLOT and WTKAPPAPLOT
Plot Option

Description

Values

CLDISPLAY=

Error bar type

BAR, LINE, LINEARROW,



SERIF, or SERIFARROW

NPANELPOS=

Statistics per graphic

Number (All)

ORDER=

Order of twoway levels

ASCENDING or DESCENDING

RANGE=

Range to display

Values or CLIP

STATS

Statistic values

None

Default


MOSAICPLOT < (plotoptions)>

requests a mosaic plot. Mosaic plots are available for crosstabulation tables. For multiway tables, PROC SURVEYFREQ provides
a mosaic plot for each twoway table layer.
To produce a mosaic plot, you must specify the MOSAICPLOT plotrequest in the PLOTS= option, or you must specify the PLOTS=ALL
option. PROC SURVEYFREQ does not produce mosaic plots by default when ODS Graphics is enabled.
Mosaic plots display tiles that correspond to the crosstabulation table cells. The areas of the tiles are proportional to
the weighted frequencies of the table cells. The column variable is displayed on the X axis, and the tile widths are proportional
to the relative weighted frequencies of the column variable levels. The row variable is displayed on the Y axis, and the tile
heights are proportional to the relative weighted frequencies of the row levels within column levels. For more information,
see Friendly (2000).
By default, the colors of the tiles correspond to the row variable levels. If you specify the COLORSTAT
plotoption, the tiles are colored according to the values of the Pearson residuals.
You can specify the following plotoptions:

COLORSTAT < =PEARSONRES >

colors the mosaic plot tiles according to the values of the Pearson residuals. A table cell’s Pearson residual is the square
root of its contribution to the Pearson chisquare statistic. The Pearson residual is computed as , where weighted frequency is the weighted frequency of the table cell and expected is the expected weighted frequency. You can specify the PEARSONRES
option to display the Pearson residuals in the crosstabulation table.

SQUARE

produces a square mosaic plot, where the height of the Y axis equals the width of the X axis. In a square mosaic plot, the
scale of the relative weighted frequencies is the same on both axes. By default, PROC SURVEYFREQ produces a rectangular mosaic
plot.

NONE

suppresses all plots.

ODDSRATIOPLOT < (plotoptions)>

requests a plot of odds ratios with confidence limits. Odds ratio plots are available for multiway tables and display the odds ratio (with confidence limits) for each table layer. To produce an odds ratio plot, you must specify the OR
option in the TABLES statement for a multiway table.
Table 97.7 lists the plotoptions that are available for odds ratio plots. For descriptions of the plotoptions, see the subsection "Plot Options."
Table 97.7: Plot Options for ODDSRATIOPLOT, RELRISKPLOT, and RISKDIFFPLOT
Plot Option

Description

Values

CLDISPLAY=

Error bar type

BAR, LINE, LINEARROW,



SERIF, or SERIFARROW

COLUMN=

Risk column

1 or 2

LOGBASE=

Axis scale

2, E, or 10

NPANELPOS=

Statistics per graphic

Number (All)

ORDER=

Order of twoway levels

ASCENDING or DESCENDING

RANGE=

Range to display

Values or CLIP

STATS

Statistic values

None

Default

Available for RELRISKPLOT and RISKDIFFPLOT

Available for ODDSRATIOPLOT and RELRISKPLOT


RELRISKPLOT < (plotoptions)>

requests a plot of relative risks with confidence limits. Relative risk plots are available for multiway tables and display the relative risk (with confidence limits) for each table layer. To produce a relative risk plot, you must specify the OR
option in the TABLES statement for a multiway table.
Table 97.7 lists the plotoptions that are available for relative risk plots. For descriptions of the plotoptions, see the subsection "Plot Options."

RISKDIFFPLOT < (plotoptions)>

requests a plot of risk differences with confidence limits. Risk difference plots are available for multiway tables and display the risk difference (with confidence limits) for each table layer. To produce a risk difference plot, you must specify the RISK
, RISK1
, or RISK2
option in the TABLES statement for a multiway table.
Table 97.7 lists the plotoptions that are available for risk difference plots. For descriptions of the plotoptions, see the subsection "Plot Options."

WTFREQPLOT < (plotoptions)>

requests a weighted frequency plot. Weighted frequency plots are available for frequency and crosstabulation tables. For multiway
tables, PROC SURVEYFREQ provides a twoway weighted frequency plot for each twoway table layer.
To produce a weighted frequency plot, you must specify the WTFREQPLOT plotrequest in the PLOTS= option, or you must specify the PLOTS=ALL
option. PROC SURVEYFREQ does not produce weighted frequency plots by default when ODS Graphics is enabled.
By default, PROC SURVEYFREQ displays weighted frequency plots as bar charts. You can specify the TYPE=DOTPLOT
plotoption to display frequency plots as dot plots. You can plot weighted percentages instead of frequencies by specifying the SCALE=PERCENT
plotoption. There are four frequency plot layouts available, which you can request by specifying the TWOWAY=
plotoption. For more information, see the subsection "Plot Options."
By default, the primary grouping of graph cells in a twoway layout is by column variable. Row variable levels are then displayed
within column variable levels. You can specify the GROUPBY=ROW
plotoption to group first by row variable.
Weighted frequency plots for oneway tables display confidence limits by default. For twoway tables, weighted frequency plots
display confidence limits by default in the TWOWAY=GROUPVERTICAL
and TWOWAY=GROUPHORIZONTAL
layouts. You can suppress confidence limits by specifying the CLBAR=NO
plotoption. Confidence limits are not available for twoway plots in the TWOWAY=CLUSTER
and TWOWAY=STACKED
layouts.
Table 97.8 lists the plotoptions that are available for weighted frequency plots. For descriptions of the plotoptions, see the subsection "Plot Options."
Table 97.8: Plot Options for WTFREQPLOT
Plot Option

Description

Values

CLBAR=

Confidence limit bars

NO or YES

GROUPBY=

Primary group

COLUMN or ROW

NPANELPOS=

Sections per panel

Number (4)

ORIENT=

Orientation

HORIZONTAL or VERTICAL

SCALE=

Scale

PERCENT or WTFREQ

TWOWAY=

Twoway layout

CLUSTER, GROUPHORIZONTAL,



GROUPVERTICAL, or STACKED

TYPE=

Type

BARCHART or DOTPLOT

Default



For twoway tables




WTKAPPAPLOT < (plotoptions)>

requests a plot of weighted kappa coefficients with confidence limits. Weighted kappa plots are available for multiway square
tables and display the weighted kappa coefficient (with confidence limits) for each twoway table layer. To produce a weighted
kappa plot, you must specify the WTKAPPA
or AGREE
option in the TABLES
statement to compute weighted kappa coefficients, and the table dimension must be greater than 2.
Table 97.6 lists the plotoptions that are available for weighted kappa plots. For descriptions of the plotoptions, see the subsection "Plot Options."
Global Plot Options
A globalplotoption applies to all plots for which the option is available unless it is altered by an individual plotoption. All plotoptions that are listed in Table 97.8 and Table 97.7 are available as globalplotoptions. The ONLY
option is also available as a globalplotoption.
You can specify globalplotoptions in parentheses after the PLOTS option. For example:
plots(order=ascending stats)=(riskdiffplot oddsratioplot)
plots(only)=wtfreqplot
In addition to the plotoptions that are listed in Table 97.8 and Table 97.7, you can specify the following globalplotoption in parentheses after the PLOTS option:

ONLY

suppresses the default plots and requests only the plots that are specified as plotrequests.
Plot Options
You can specify the following plotoptions in parentheses after a plotrequest.

CLBAR=NO  YES

controls the confidence limit error bars in weighted frequency plots (WTFREQPLOT
). By default, CLBAR=YES, which displays confidence limits error bars; CLBAR=NO suppresses confidence limit error bars.
This plotoption applies to all weighted frequency plots except those twoway plots that are displayed in the TWOWAY=CLUSTER
or TWOWAY=STACKED
layout. Confidence limit error bars are not available in the TWOWAY=CLUSTER and TWOWAY=STACKED layouts.

CLDISPLAY=BAR < width >  LINE  LINEARROW  SERIF  SERIFARROW

controls the appearance of the confidence limit error bars. This plotoption is available for the following plots: KAPPAPLOT
, ODDSRATIOPLOT
, RELRISKPLOT
, RISKDIFFPLOT
, and WTKAPPAPLOT
.
The default is CLDISPLAY=SERIF, which displays the confidence limits as lines with serifs. CLDISPLAY=LINE displays the confidence
limits as plain lines without serifs. The CLDISPLAY=SERIFARROW and CLDISPLAY=LINEARROW plotoptions display arrowheads on any error bars that are clipped by the RANGE=
plotoption; if an entire error bar is cut from the plot, the plot displays an arrowhead that points toward the statistic.
CLDISPLAY=BAR displays the confidence limits as bars. By default, the width of the bars equals the size of the marker for
the estimate. You can control the width of the bars and the size of the marker by specifying the value of width as a percentage of the distance between bars, . The bar might disappear when the value of width is very small.

COLUMN=1  2

specifies the table column to use to compute the risk (proportion). This plotoption is available for the relative risk plot (RELRISKPLOT
) and the risk difference plot (RISKDIFFPLOT
). If you specify COLUMN=1, the plot displays the column 1 relative risks or the column 1 risk differences. Similarly, if
you specify COLUMN=2, the plot displays the column 2 relative risks or risk differences.
For relative risk plots, the default is COLUMN=1. For risk difference plots, the default if COLUMN=1 if you request computation
of both column 1 and column 2 risk differences with the RISK
option. If you request computation of only column 1 (or only column 2) risk differences by specifying the RISK1
(or RISK2
) option, by default the risk difference plot displays these risk differences.

GROUPBY=COLUMN  ROW

specifies the primary grouping for twoway weighted frequency plots, which you can request by specifying the WTFREQPLOT
plotrequest.
The default is GROUPBY=COLUMN, which groups graph cells first by column variable and displays row variable levels within column
variable levels. You can specify GROUPBY=ROW to group first by row variable. In twoway and multiway table requests, the column
variable is the last variable specified and forms the columns of the crosstabulation table. The row variable is the nexttolast
variable specified and forms the rows of the table.
By default for a bar chart that is displayed in the TWOWAY=STACKED
layout, bars correspond to the column variable levels and row levels are displayed (stacked) within each column bar. By default
for a bar chart that is displayed in the TWOWAY=CLUSTER
layout, bars are first grouped by column variable levels, and row levels are displayed as adjacent bars within each columnlevel
group. You can reverse the default row and column variable groupings by specifying GROUPBY=ROW.

LOGBASE=2  E  10

applies to the odds ratio plot (ODDSRATIOPLOT
) and the relative risk plot (RELRISKPLOT
). This plotoption displays the odds ratio or relative risk axis on the log scale that you specify.

NPANELPOS=n

divides the plot into multiple panels that display at most statistics or sections.
If n is positive, the number of statistics or sections per panel is balanced; if n is negative, the number of statistics per panel is not balanced. For example, suppose you want to display 21 odds ratios.
NPANELPOS=20 displays two panels, the first with 11 odds ratios and the second with 10 odds ratios; NPANELPOS=–20 displays
20 odds ratios in the first panel but only 1 in the second panel. This plotoption is available for all plots except mosaic plots and oneway weighted frequency plots.
For twoway weighted frequency plots (WTFREQPLOT
), NPANELPOS=n requests that panels display at most sections, where sections correspond to row or column variable levels, depending on the type of plot and the grouping. By
default, n=4 and each panel includes at most four sections. This plotoption applies to twoway plots that are displayed in the TWOWAY=GROUPVERTICAL
or TWOWAY=GROUPHORIZONTAL
layout. The NPANELPOS= plotoption does not apply to the TWOWAY=CLUSTER
and TWOWAY=STACKED
layouts, which are always displayed in a single panel.
For plots that display statistics with confidence limits, NPANELPOS=n requests that panels display at most statistics. By default, n=0 and all statistics are displayed in a single panel. This plotoption applies to the following plots: KAPPAPLOT
, ODDSRATIOPLOT
, RELRISKPLOT
, RISKDIFFPLOT
, and WTKAPPAPLOT
.

ORDER=ASCENDING  DESCENDING

displays the twoway table (layer) statistics in order of the statistic value. If you specify ORDER=ASCENDING or ORDER=DESCENDING,
the plot displays the statistics in ascending or descending order, respectively. By default, the order of the statistics in
the plot matches the order that the twoway table layers appear in the multiway table.
This plotoption is available for the following plots: KAPPAPLOT
, ODDSRATIOPLOT
, RELRISKPLOT
, RISKDIFFPLOT
, and WTKAPPAPLOT
.

ORIENT=HORIZONTAL  VERTICAL

controls the orientation of weighted frequency plots (WTFREQPLOT
). This plotoption places the variable levels on the Y axis and the weighted frequencies or percentages on the X axis. ORIENT=VERTICAL places
the variable levels on the X axis. The default orientation is ORIENT=VERTICAL for bar charts (TYPE=BARCHART
) and ORIENT=HORIZONTAL for dot plots (TYPE=DOTPLOT
).

RANGE=(< min > < , max > ) CLIP

specifies the range of values to display. If you specify RANGE=CLIP, the confidence limits are clipped and the display range
is determined by the minimum and maximum values of the estimates. By default, the display range includes all confidence limits.
This plotoption is available for the following plots: KAPPAPLOT
, ODDSRATIOPLOT
, RELRISKPLOT
, RISKDIFFPLOT
, and WTKAPPAPLOT
.

SCALE=PERCENT  WTFREQ

specifies the scale of the frequencies in weighted frequency plots (WTFREQPLOT
). SCALE=WTFREQ displays weighted frequencies (totals), and SCALE=PERCENT displays percentages. The default scale is SCALE=WTFREQ.

STATS

displays the values of the statistics and their confidence limits on the right side of the plot. If you do not specify this
plotoption, the statistic values are not displayed.
This plotoption is available for the following plots: KAPPAPLOT
, ODDSRATIOPLOT
, RELRISKPLOT
, RISKDIFFPLOT
, and WTKAPPAPLOT
.

TWOWAY=CLUSTER  GROUPHORIZONTAL  GROUPVERTICAL  STACKED

specifies the layout for twoway weighted frequency plots (WTFREQPLOT
).
All TWOWAY= layouts are available for bar charts (TYPE=BARCHART
). All TWOWAY= layouts except TWOWAY=CLUSTER are available for dot plots (TYPE=DOTPLOT
). Confidence limits (CLBAR=
) can be displayed in the GROUPVERTICAL and GROUPHORIZONTAL layouts. Confidence limits are not available in the STACKED and
CLUSTER layouts. The ORIENT=
and GROUPBY=
plotoptions are available for all TWOWAY= layouts.
The default twoway layout is TWOWAY=GROUPVERTICAL, which produces a grouped plot that has a vertical common baseline. By
default for bar charts (TYPE=BARCHART
, ORIENT=VERTICAL
), the X axis displays column variable levels, and the Y axis displays weighted frequencies. The plot includes a vertical
(Yaxis) block for each row variable level. The relative positions of the graph cells in this plot layout are the same as
the relative positions of the table cells in the crosstabulation table. You can reverse the default row and column grouping
by specifying the GROUPBY=ROW
plotoption.
The TWOWAY=GROUPHORIZONTAL layout produces a grouped plot that has a horizontal common baseline. By default (GROUPBY=COLUMN
), the plot displays a block on the X axis for each column variable level. Within each columnlevel block, the plot displays
row variable levels.
The TWOWAY=STACKED layout produces stacked displays of weighted frequencies. By default (GROUPBY=COLUMN
) in a stacked bar chart, the bars correspond to column variable levels, and row levels are stacked within each column level.
By default in a stacked dot plot, the dotted lines correspond to column levels, and cell weighted frequencies are plotted
as data dots on the corresponding column line. The dot color identifies the row level.
The TWOWAY=CLUSTER layout, which is available only for bar charts, displays groups of adjacent bars. By default, the primary
grouping is by column variable level, and row levels are displayed within each column level.
You can reverse the default row and column grouping in any layout by specifying the GROUPBY=ROW
plotoption. The default is GROUPBY=COLUMN
, which groups first by column variable.

TYPE=BARCHART  DOTPLOT

specifies the type (form) of the weighted frequency plots (WTFREQPLOT
). TYPE=BARCHART produces a bar chart and TYPE=DOTPLOT produces a dot plot. The default type is TYPE=BARCHART.

RISK
RISKDIFF

requests risk statistics for tables. The RISK option also provides standard errors and confidence limits for these statistics. Risk statistics include the row 1 risk (proportion),
row 2 risk, overall risk, and risk difference. For more information, see the section Risks and Risk Difference.
The RISK option provides both column 1 and column 2 risks. To request only column 1 or column 2 risks, use the RISK1
or RISK2
option.
You can specify the confidence level in the ALPHA=
option. By default, ALPHA=0.05, which produces 95% confidence limits.

RISK1
RISKDIFF1

requests column 1 risk statistics for tables, together with their standard errors and confidence limits. Risk statistics include the row 1 risk (proportion), row
2 risk, overall risk, and risk difference. For more information, see the section Risks and Risk Difference.
You can specify the confidence level in the ALPHA=
option. By default, ALPHA=0.05, which produces 95% confidence limits.

RISK2
RISKDIFF2

requests column 2 risk statistics for tables, together with their standard errors and confidence limits. Risk statistics include the row 1 risk (proportion), row
2 risk, overall risk, and risk difference. For more information, see the section Risks and Risk Difference.
You can specify the confidence level in the ALPHA=
option. By default, ALPHA=0.05, which produces 95% confidence limits.

ROW < (option)>

displays the row percentage (estimated proportion of the row total) for each cell in a twoway table. The ROW option also provides the standard errors of the row percentages. For more
information, see the section Row and Column Proportions. This option has no effect for oneway tables.
You can specify the following option:

DEFF

displays the design effect for each row percentage in the crosstabulation table. For more information, see the section Design Effect.

TESTP=(values)

specifies null hypothesis proportions (test percentages) for chisquare tests for oneway tables (goodnessoffit tests). You can separate values with blanks or commas, and you must enclose the list of values in parentheses. Specify values in probability form as numbers between 0 and 1, where the proportions sum to 1. Or specify values in percentage form as numbers between 0 and 100, where the percentages sum to 100. PROC SURVEYFREQ treats the value 1 as
the percentage form 1%. The number of TESTP= values must equal the number of variable levels in the oneway table. List these
values in the same order in which the corresponding variable levels appear in the output.
When you specify the TESTP= option, PROC SURVEYFREQ displays the specified test percentages in the oneway frequency table.
The TESTP= option has no effect for twoway tables.
PROC SURVEYFREQ uses the TESTP= values for the oneway RaoScott chisquare test (CHISQ
) and for the oneway RaoScott likelihood ratio chisquare test (LRCHISQ
). See the sections RaoScott ChiSquare Test and For more information, see the section RaoScott Likelihood Ratio ChiSquare Test.

VAR

displays the variance estimate for each percentage in the crosstabulation table. For more information, see the section Proportions. By default, PROC SURVEYFREQ displays the standard errors of the percentages.

VARWT

displays the variance estimate for each weighted frequency, or estimated total, in the crosstabulation table. For more information,
see the section Totals. By default, PROC SURVEYFREQ displays the standard deviations of the weighted frequencies.

WCHISQ

requests the Wald chisquare test for twoway tables. For more information, see the section Wald ChiSquare Test.

WLLCHISQ

requests the Wald loglinear chisquare test for twoway tables. For more information, see the section Wald LogLinear ChiSquare Test.

WTFREQ

displays totals (weighted frequencies) and their standard errors when you do not specify a WEIGHT
or REPWEIGHTS
statement. By default, PROC SURVEYFREQ displays the weighted frequencies only when you specify a WEIGHT or REPWEIGHTS statement.
When you do not specify a WEIGHT or REPWEIGHTS statement, PROC SURVEYFREQ assigns all observations a weight of one.

WTKAPPA < (options)>

requests the weighted kappa coefficient with its standard error and confidence limits. Weighted kappa coefficients can be
computed for square twoway tables, where the number of rows equals the number of columns. For tables, the weighted kappa coefficient equals the simple kappa coefficient, and PROC SURVEYFREQ displays only the simple
kappa coefficient. For more information, see the section Weighted Kappa Coefficient.
Weighted kappa coefficients are available when you specify variance estimation by the jackknife method (VARMETHOD=JACKKNIFE
) or by balanced repeated replication (VARMETHOD=BRR
); weighted kappa coefficients are not available with the Taylor series method (VARMETHOD=TAYLOR
).
The weighted kappa coefficient is computed by using agreement weights that reflect the relative agreement between pairs of
variable levels. Agreement weights are not the same as sampling weights, which you provide by specifying the WEIGHT
statement. PROC SURVEYFREQ uses the sampling weights to compute both the simple kappa and weighted kappa coefficients. For
more information, see the section Weighted Kappa Coefficient.
You can specify the confidence level in the ALPHA=
option. By default, ALPHA=0.05, which produces 95% confidence limits.
You can specify the following options:

PRINTKWTS

displays the agreement weights that PROC SURVEYFREQ uses to compute the weighted kappa coefficient. Agreement weights reflect
the relative agreement between pairs of variable levels. By default, PROC SURVEYFREQ computes these weights by using the CicchettiAllison
form. If you specify the WT=FC
option, the procedure uses the FleissCohen form of agreement weights. For more information, see the section Weighted Kappa Coefficient.

WT=FC

requests FleissCohen agreement weights for the weighted kappa computation. By default, PROC SURVEYFREQ uses CicchettiAllison
agreement weights to compute the weighted kappa coefficient. Agreement weights reflect the relative agreement between pairs
of variable levels. For more information, see the section Weighted Kappa Coefficient.