BookmarkSubscribeRSS Feed
Raffik
Calcite | Level 5

Dose SAS have any proc to produce data for stem-and-leaf plot. Or how can I draw stem-and-leaf plot for this data:

124, 129, 118, 135, 114, 139, 127, 141, 111, 144, 133, 127,
122, 119, 132, 137, 146, 122, 119, 115, 125, 132, 118, 126,
134, 147, 122, 119, 116, 125, 128, 130, 127, 135, 122, 141

 

Thanks

 

5 REPLIES 5
Ksharp
Super User

Yes. Check PROC UNIVARIATE .

 

PLOTS | PLOT
produces a stem-and-leaf plot (or a horizontal bar chart), a box plot, and a normal probability
plot in line printer output. If you use a BY statement, side-by-side box plots that are labeled
“Schematic Plots” appear after the univariate analysis for the last BY group.
Raffik
Calcite | Level 5

Works. Thanks. 🙂

longornian
Calcite | Level 5

how to make normal probability plot in other line printer output

 

 

Ksharp
Super User

Please start a brand new session, this post is two years old.

And better post it at ODS Graph forum, if you want plot a scatter/series graph.

Ksharp
Super User

Example 4.5: Creating Plots for Line Printer Output
The PLOT option in the PROC UNIVARIATE statement requests several basic plots for display in
line printer output. For more information about plots created by the PLOT option, see the section
“Creating Line Printer Plots” on page 338. This example illustrates the use of the PLOT option as
well as BY processing in PROC UNIVARIATE.
A researcher is analyzing a data set consisting of air pollution data from three different measurement
sites. The data set AirPoll, created by the following statements, contains the variablesSite andOzone,
which are the site number and ozone level, respectively.
data AirPoll (keep = Site Ozone);
label Site = 'Site Number'
Ozone = 'Ozone level (in ppb)';
do i = 1 to 3;
input Site @@;
do j = 1 to 15;
input Ozone @@;
output;
end;
end;
datalines;
102 4 6 3 4 7 8 2 3 4 1 3 8 9 5 6
134 5 3 6 2 1 2 4 3 2 4 6 4 6 3 1
137 8 9 7 8 6 7 6 7 9 8 9 8 7 8 5
;
run;
The following statements produce stem-and-leaf plots, box plots, and normal probability plots for
each site in the AirPoll data set:
ods select Plots SSPlots;
proc univariate data=AirPoll plot;
by Site;
var Ozone;
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 4503 views
  • 0 likes
  • 3 in conversation