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.
Try adding option NOINHERIT to your OUTPUT statement in proc means.
What is the format attached to variable something_bad_freq in my_data?
PG
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.
Try adding option NOINHERIT to your OUTPUT statement in proc means.
I shall try, and let you know.
Thank you!
Thank you, Pierre.
It worked great. It was the format....
Thanks!
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.