

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


1. Producing Vertical Bar Charts and Pie Charts
Use the ia.personl date set and a WHERE statement to produce the charts requested below for the ticket agents ( JobCode values of TA1, TA2, and TA3).
a) Produce a vertical bar chart that displays the number of male and female ticket agents ( Gender values are M and F). b) Compare the average salaries of each ticket agent job level by showing a solid pie slice for each of the three Jobcode values. Add an appropriate title that displays the text in red with the SWISS font. c) Enhance the pie chart by filling the pie slices with crosshatched lines and exploding the slice represents the TA3 value of JobCode.
2. Producing a Two-Dimensional Plot
The data set ia.delay contains dates and delays in minutes for International Airlines flights. Use the data set and an appropriate WHERE statement to select flights to Copenhagen ( Dest='CPH' ) and produce the plot described below:
Rotating, or transposing, a SAS data set can be accomplished by using explicit OUTPUT statements in a DATA step. When a data set is rotated, the values of an observation in the input data set become values of a variable in the output data set.
Use explicit OUTPUT statements to rotate prog2.donate into a data set called rotate. Create four output observations in rotate from each input observation in prog2.donate.
The rotate data set should have three variables: ID , Qtr , and Amount. Print the data set to verify your results.
4. Using Conditional Logic to Output Multiple Observations
The buyhistory data set should have two variables: ID and Method. Print the data set to verify your results.
5. Writing to Multiple SAS Data Sets
The data set prog2.elements contains information about the known elements on the periodic table. Each observation contains an element's name, symbol, atomic number, and state. The value of State refers to whether the element is a gas, liquid, solid, or synthetic at room temperature.
Create four SAS data sets, gas , liquid , solid , and synthetic. Each data set will contain information about those elements that have that state at room temperature. Each of these four data sets should contain three variables; they should not contain the State variable.
The gas data set should contain 11 observations. The liquid data set should contain 3 observations. The solid data set should contain 78 observations. The synthetic data set should contain 21 observations.
6. Controlling Input and Output Size
Recall that prog2.elements contains information about the known elements on the periodic table. Each observation contains an element’s name, symbol, atomic number, and state. The value of State refers to whether the element is a gas, liquid, solid, or synthetic at room temperature.
Create two SAS data sets, natural and synthetic.
The natural data set will contain information about elements that are solids, liquids, or gases at room temperature. The natural data set will contain three variables, Name , AtomicNum , and State , and 92 observations.
The synthetic data set will contain two variables, Name and AtomicNum , and 21 observations.