Quartz | Level 8

## BoxPlot for

Hello,

I would like to create a box plot for 4 continous variables, but that are not linked with any categorical variable.
Actually, i'd like to plot the output of the proc univariate with the means and quantiles.

Here is an excerpt of what the Proc univariate gives me for one of my 4 variables :

 ``` Quantile Estimate 100% Max 6.24719 99% 5.68653 95% 5.43895 90% 5.24901 75% Q3 4.82637 50% Median 4.32900 25% Q1 4.02401 10% 3.62096 5% 3.45388 1% 3.23710 0% Min 2.77457```

Now, I would like to plot thoses pieces of information in the style of a boxplot, for my 4 variables.

Also, I work on SAS 9.1...

Any idea ?

5 REPLIES 5
Diamond | Level 26

## Re: BoxPlot for

I think PROC BOXPLOT works in 9.1

--
Paige Miller
Quartz | Level 8

## Re: BoxPlot for

I does, but i didn't find how to use it for only one continuous variable, without gaving so specify a categorical variable.

Diamond | Level 26

## Re: BoxPlot for

You could have PROC UNIVARIATE create a box plot by using the PLOTS option. https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=procstat&docsetTarget=pro...

--
Paige Miller

## Re: BoxPlot for

Hello @Mathis1,

For PROC BOXPLOT you can temporarily define a constant "dummy" variable and use that after the asterisk in the PLOT statement.

Example:

``````data _tmp / view=_tmp;
set have;
retain _c 'A0'x;
run;

proc boxplot data=_tmp;
plot var1*_c / nohlabel;
run;``````

The NOHLABEL option suppresses the label "_c" of the horizontal axis (but feel free to define a label using a LABEL statement in the PROC BOXPLOT step instead). The constant value of variable _c is used as the tick mark label. If you have a better idea than a non-missing blank value ('A0'x), use that.

Barite | Level 11

## Re: BoxPlot for

@Mathis1 Do you want 4 boxplots on 1 graph? Or 4 different box plots?

Discussion stats
• 5 replies
• 272 views
• 0 likes
• 4 in conversation