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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!