So far, you have seen bar charts where the Y axis represents the frequency count, or percentage,for values or ranges displayed on the X axis.PROC CHART can also provide charts where the Y axis represents the mean or sum of a numeric variable for each value of another variable shown on the X axis.
For example, suppose you want to see the total (SUM) of the variable QUANTITY for each region of the country from the SALES data set.You use the SUMVAR= option to select the numeric variable on which to compute the sum or mean,and the TYPE= option to indicate the desired statistic.The default type is SUM, but you should always include a TYPE= option whenever you use the SUMVAR= option. So,to produce the chart just described, use the following code:
ExamplePROC CHART DATA=SALES;
The resulting chart follows:
Output from Example - Plotting Sums and Means of Numeric Variables
The bars here represent the sum of the variable QUANTITY for each of the regions. If you had done this using an HBAR statement, you could have requested the actual sums to print alongside of the bars; if you used TYPE=MEAN, you could have requested the mean statistic.
SAS Programming Related Tutorials
|SASS (Syntactically Awesome Style sheets) Tutorial||R Programming language Tutorial|
SAS Programming Related Interview Questions
|Logistics Interview Questions||SAS Programming,SQL server Interview Questions|
|Clinical SAS Interview Questions||SASS (Syntactically Awesome Style sheets) Interview Questions|
|SQL Server Analysis Services (SSAS) Interview Questions||R Programming language Interview Questions|
|SAS DI Interview Questions||Advanced SAS Interview Questions|
|Base Sas Interview Questions||SAS Macro Interview Questions|
|Clinical Data Management Interview Questions|
Sas Programming Tutorial
Input And Infile
Set, Merge, And Update
Table Lookup Tools
Proc Means And Proc Uimivariate
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.