BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cvilme1998
Fluorite | Level 6

My goal is to make this:

cc.png

I used this code, but I'm getting more outputs then I originally planned although I do get the graph:

proc univariate data=sashelp.bweight;
var weight;
class boy;
histogram weight / NORMAL;

 

An example of extra outputs that I get is this for boy=0 and boy=1. I just want the histogram not these extra outputs:

The SAS System

The UNIVARIATE Procedure
Boy = 1
Fitted Normal Distribution for Weight (Infant Birth Weight)
Parameters for Normal DistributionParameter Symbol EstimateMeanStd Dev
Mu3427.252
Sigma577.6727

 

Goodness-of-Fit Tests for Normal DistributionTest Statistic p ValueKolmogorov-Smirnov DPr > DCramer-von Mises W-SqPr > W-SqAnderson-Darling A-SqPr > A-Sq
0.052368<0.010
19.182203<0.005
129.781086<0.005

 

Quantiles for Normal DistributionPercent QuantileObserved Estimated1.05.010.025.050.075.090.095.099.0
1559.002083.38
2495.002477.07
2778.002686.93
3119.003037.62
3459.003427.25
3799.003816.89
4082.004167.57
4281.004377.44
4678.004771.12
1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Simply add an ODS select statement :

 

proc univariate data=sashelp.bweight;
var weight;
class boy;
histogram weight / NORMAL;
ods select Histogram;
run;

To get the list of ODS outputs (Histogram is one of them), add the statement

 

ods trace on;

 

before running proc univariate and check the log.

PG

View solution in original post

1 REPLY 1
PGStats
Opal | Level 21

Simply add an ODS select statement :

 

proc univariate data=sashelp.bweight;
var weight;
class boy;
histogram weight / NORMAL;
ods select Histogram;
run;

To get the list of ODS outputs (Histogram is one of them), add the statement

 

ods trace on;

 

before running proc univariate and check the log.

PG

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 518 views
  • 1 like
  • 2 in conversation