Use the iapersonl data set and a where statement to produce


1. Creating a List Report Use PROC REPORT and the ia.employees data set to produce a list report with the following
characteristics:

  •  Output should be sent to the Output window.
  •  The report should display only the variables Division, City, and Salary.
  •  Each variable displayed should have a descriptive report column heading.
  •  Salary should be displayed with dollar signs, commas, and no decimals.
  •  The columns of the report should be wide enough so that individual data values are not truncated.
  •  The observations on the report should be ordered by the values of Division and City.
  •  The report should be titled Employee Salary Data.

Partial PROC REPORT Output

2. Creating a Summary Report with Grand Total
Use PROC REPORT and the ia.employees data set to produce a summary report with the following characteristics:

  •  The report should display only the variables Division, City, and Salary.
  • Each variable displayed should have a descriptive report column heading.
  •  Salary should be displayed with dollar signs, commas, and no decimals.
  •  The columns of the report should be wide enough so that individual data values are not truncated.
  •  The observations on the report should be summarized by the values of City for each Division.
  •  A grand total should appear at the bottom with a single line above the total and a double line below the total.
  •  The report should be titled Employee Salary Data by Division / City.

Partial PROC REPORT Output (Top of Report)
Partial PROC REPORT Output (Bottom of Report)

3. Producing Vertical Bar Charts and Pie Charts

Use the ia.personl data set and a WHERE statement to produce the charts requested below for the ticket agents. (JobCode values are TA1, TA2, and TA3.)

where JobCode in ('TA1', 'TA2', 'TA3');
a. Produce a vertical bar chart that displays the number of male and female ticket agents. (Gender values are M and F.)
b. Use the ODS to save the chart to an HTML document. Add an appropriate title.
c. Create a pie chart to compare salaries of each ticket agent job level. Each pie slice should represent the average salary for one of the three Jobcode values. Save the pie chart as an HTML document file using the ODS. Use the ODS style banker, and add an appropriate title.
d. Enhance the pie chart by exploding the slice that represents the TA3 value of JobCode. Change the font color for the title to red.
4. Producing a Horizontal Bar Chart
Use the ia.chicago data set to produce a horizontal bar chart that displays the total number of passengers boarded (Boarded) each day of the week. Create a new variable, Day, which contains the day of the week, where 1 represents Sunday, 2 represents Monday, and so on.

? Specify the GIF file format for the chart.
? Place an appropriate title on the chart.
? Use the label Day of the Week for the variable Day and the label Passengers for the variable Boarded.
If the chart did not generate seven bars, add the DISCRETE option to the HBAR statement and generate the chart again.

5. 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:

  •  Use the ODS to create and save the plot as an HTML document.
  •  Use the ODS style named Normal.
  •  Plot the delays on the vertical axis and dates along the horizontal axis.
  • Adjust the scale on the vertical axis to start at -15 and end at 30 with a tick mark every 15 minutes.
  •  Display the title "Flights to Copenhagen" in red.
  •  Display the points as red squares.
  •  Use the NEEDLE interpolation technique to connect the points to the horizontal axis.

6. Controlling record OUTPUT
Write a single data step, based on the employees data set, that performs the following operations:
a. Create a dataset called FltCrew that includes all records that have ‘FLTAT' or ‘PILOT' in the JobCode. Drop the EmpID and Salary variables from this dataset.
b. Create a dataset called GrndCrew that includes all records that have ‘MECH' or ‘GRCRE' in the the JobCode. Drop the EmpID and Salary variables from this dataset.

Write a Proc Print step that prints the first 10 records of the FltCrew datasets, and another than prints Records 5 through 15 of the GrndCrew dataset.
7. Creating an Accumulating Total Variable

The data set data2.states contains the state name (State), the date the state entered the United States (EnterDate), and the size of the state in square miles (Size) for all 50 U.S. states. The data set is sorted by EnterDate.

Create the SAS data set work.usarea that contains the new variable TotArea, which is a running total of the size of the United States as each state was added, and the new variable NumStates, which shows how many states were in the United States at that point.

8. Accumulating Totals for a Group of Data

The data set data2.flymiles has one observation for each trip a frequent flyer made with an airline. It shows the frequent flyer number (ID) and the number of miles earned for that trip (Miles). Create a data set named work.freqmiles that has one observation for each frequent flyer as well as a new variable named TotMiles, which shows the total number of frequent flyer miles the person earned.

9. Using iterative DO Loops
Use DO Loops to create a data set that calculates, for each of the next ten years (2011 through 2020):

a. The day of the week on which January 1st falls
b. The date of the first Monday in January.

Create a listing report that looks like the one below:

Weekday Date of
Calendar of January First Monday
Year First in January
2011 Saturday 01/03/11
2012 Sunday 01/02/12
2013 Tuesday 01/07/13
2014 Wednesday 01/06/14
2015 Thursday 01/05/15
2016 Friday 01/04/16
2017 Sunday 01/02/17
2018 Monday 01/01/18
2019 Tuesday 01/07/19
2020 Wednesday 01/06/20

HINTS: Use an iterative DO loop to increase the calendar year and a DO UNTIL loop to find the first Monday in January. Use a SAS function to extract the day of the week from a date, and use a User Defined format to display weekday as a word (e.g. "Tuesday").

Request for Solution File

Ask an Expert for Answer!!
Basic Statistics: Use the iapersonl data set and a where statement to produce
Reference No:- TGS01404025

Expected delivery within 24 Hours