Here's the code -
PROC SGPLOT data=STAN.cardata;
scatter x=year y=age_adjusted_rate;
series x=year y=age_adjusted_rate;
RUN;
What I get is a straight line from lower left to upper right, with the y-axis values aligning with the year of the observation, rather than the value of the 'age adjusted rate'.
From the graph, here's a sample of the values of 'age adjusted rate' values on the y-axis from top to bottom:
2.81
2.52
2.48
2.65
3.09
3.43
.(10 additional values, also in improper order)
6.73
6.59
6.55
What am I missing?
Thanks-
It seems to me the most likely explanation is that age_adjusted_rate is a character variable. Is it?
Can you show us the plot? (Use the "Insert Photos" icon to include your screen capture in your reply)
Yes, that's the answer. Thank you!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.