Question
5. Using a Macro to Generate SAS/GRAPH Code Consider the following two examples of producing bar charts with proc sgplot: proc sgplot data-orion customer
5. Using a Macro to Generate SAS/GRAPH Code Consider the following two examples of producing bar charts with proc sgplot: proc sgplot data-orion customer dim; run; vbar Customer Age Group/ fillattrs=( color=red transparency=.25); proc sgplot data=orion.customer_dim; hbar Customer Group/ fillattrs=( color-pink transparency=.5); run; Notice that you can produce both vertical (VBAR) and horizontal (HBAR) charts and also control color and transparency of the fill for each bar. a. Copy the following program into the Editor window. proc sgplot data=orion customer dim: xbar Customer Age Group/ fillattrs (color=red transparency=.25); run: b. Create a macro with keyword parameters that generalize the code so that the following chart attributes are controlled by macro variables. All parameters should have default values so that the code can execute properly. Bar orientation - VBAR or HBAR Bar Color Bar Transparency c. Execute the macro using the default parameter values. d. Call the macro again, but override all of the default parameter values. e. Call the macro again, but override the default parameter values except for the bar orientation and color.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started