BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Bal23
Lapis Lazuli | Level 10

 

proc univariate data=numtem10;

VAR ACOSTY10;

histogram;

run;

ods select ParameterEstimates GoodnessOfFit FitQuantiles Bins MyPlot;

proc univariate data=numtem10;

histogram acosty / normal(percents=20 40 60 80 midpercents)

name='MyPlot distribution';

inset n normal(ksdpval) / pos = ne format = 6.3;

run;

 

my first one was able to generate a histogram but I want to add a curve to it. But the second cannot generate any figures.

Here is the error message. Any advice? Thanks.

**************

Output 'MyPlot' was not created. Make sure that the output object name, label, or path

is spelled correctly. Also, verify that the appropriate procedure options are used to

produce the requested output object. For example, verify that the NOPRINT option is not

used.

 

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

You may have excluded the graphs from ODS destinations. Try preceeding your proc univariate call with 

 

ODS select all;

PG

View solution in original post

10 REPLIES 10
Bal23
Lapis Lazuli | Level 10

I tried two variables, acosty is the orginal variable, acosty10 is to break into deciles. None can generate a histogram with a normal curve.

In addition to the error message, there is a note below

 

NOTE: At least one W.D format was too small for the number to be printed. The decimal may be

shifted by the "BEST" format

 

Rick_SAS
SAS Super FREQ

Put the MIDPERCENTS option outside of the parentheses:

proc univariate data=sashelp.class;
var height weight;
histogram height weight / normal(percents=20 40 60 80) midpercents;
inset n normal(ksdpval) / pos = ne format = 6.3;
run;

Also, the NAME= option is only for traditional graphics. It doesn't do anything when you use ODS graphics.

Bal23
Lapis Lazuli | Level 10

I am unable to get a curve with your code. below is the note I got. The error message disappeared but the note is same

 

NOTE: At least one W.D format was too small for the number to be printed. The decimal may be

shifted by the "BEST" format.

ballardw
Super User

The note about a format says that you have assigned a format that does not have enough positions to display the values you request.

 

a 6.3 format will display up to 99.999 (6 total characters with 3 decimals). If you variable is larger than 100 you would get that message. If the values much larger, say 1,000,000 you would get exponential notation such as 1E6.

So make the width of any formats used wider, try 9.3

Bal23
Lapis Lazuli | Level 10

NO curve nor histogram was generated.

 

1858 proc univariate data=numtem10;

1859 var acosty acost;

1860 histogram acosty acost / normal(percents=20 40 60 80) midpercents;

1861 inset n normal(ksdpval) / pos = ne format = 9.3;

1862 run;

NOTE: PROCEDURE UNIVARIATE used (Total process time):

real time 3.16 seconds

cpu time 0.32 seconds

 

PGStats
Opal | Level 21

You may have excluded the graphs from ODS destinations. Try preceeding your proc univariate call with 

 

ODS select all;

PG
PGStats
Opal | Level 21

The note "At least one W.D format..." does not prevent the production of a graph. The problem is elsewhere. Please post the entire log for what you have tried.

PG
Bal23
Lapis Lazuli | Level 10

 

For the one I am asking, I did not see any error message, but it just did not generate.

I did see another warning message on another statement

WARNING: Most ODS graphics with more than 5000 points have been suppressed. Use the

PLOTS(MAXPOINTS= ) option in the PROC REG statement to change or override the cutoff.

PGStats
Opal | Level 21

The message is self-explanatory. Making a graph with more than 5000 points will take some time and may not be very informative. 

PG
Rick_SAS
SAS Super FREQ

It is very important that you either 

1) Post your data, or

2) Post any NOTEs, WARNINGs, or ERRORs that appear in the log.  

 

Another suggestion: Please try to reproduce your problem by using a small data set such as Sashelp.Class. That will make it easier for those who are trying to diagnose your errors. For example, if you say "this code works with Sashelp.Class but does not work with my real data, that will let us know that the issue is with the data, not with the syntax.

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 3308 views
  • 6 likes
  • 4 in conversation