When graphing the relationship between a categorical explanatory variable and

a categorical response variable, we use the code,

PROC GCHART; VBAR categoricalexplanatoryvariable/discrete

TYPE=mean SUMVAR=categoricalresponsevariable and

end it with a semi-colon.

So the exact code we'll use for the program is,

PROC GCHART; VBAR PACKCATEGORY/discrete

TYPE=mean SUMVAR=TAB12MDX;.

Just like the proc gchart code in univariate graphing,

VBAR requests a vertical bar chart.

The categorical explanatory variable,

PACKCATEGORY/discrete tells SAS that we want levels of

our categorical explanatory variable to be represented on the X axis.

The rest of the code in this statement provides instructions to SAS, for

how the response variable should be represented on the y axis.

Specifically, TYPE=mean requests a calculated average.

And SUMVAR is short for summary variable.

So we're asking for the response variable, TAB12MDX,

to be displayed as a mean on on the Y Axis.