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

     Hi.

Did any one of you encounter a situation where SAS renders a graph showing "unknown" instead of the true values?

Please see attached.

And the code that creates:

ods graphics / reset width=5in imagename="Cancer" imagefmt=png
antialias=on;

   title "Prevalence of Something Bad";

   proc sgplot data=my_data;

series x=year y=something_bad_avg / markers;
yaxis values=(0 to .5 by .1);
xaxis values=(2000 to 2011 by 1);

   run;

Any idea what would cause this?

Thanks.

Actually, to be more concise, is not the plot procedure that causes the problem...but the proc means output lists "unknown" as possible values....

See another attachment.


freqCANCER.PNG
1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Try adding option NOINHERIT to your OUTPUT statement in proc means.

PG

View solution in original post

5 REPLIES 5
PGStats
Opal | Level 21

What is the format attached to variable something_bad_freq  in my_data?

PG

PG
AncaTilea
Pyrite | Level 9

Hi.

So, in the first step there is a proc means on the data, by year, that will list the average of a variable for each year.

That said average is then plotted.

So, the format is a number.

PGStats
Opal | Level 21

Try adding option NOINHERIT to your OUTPUT statement in proc means.

PG
AncaTilea
Pyrite | Level 9

I shall try, and let you know.

Thank you!

AncaTilea
Pyrite | Level 9

Thank you, Pierre.

It worked great. It was the format....

Thanks!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 5 replies
  • 909 views
  • 0 likes
  • 2 in conversation