Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Statistics and Probability Expert

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").

Statistics and Probability, Statistics

  • Category:- Statistics and Probability
  • Reference No.:- M91782587

Have any Question?


Related Questions in Statistics and Probability

The number of cell phones per 100 residents in countries in

The number of cell phones per 100 residents in countries in Europe is given in table 9.3.9 for the year 2010. The number of cell phones per 100 residents in countries of the Americas is given in table 9.3.10 also for the ...

Problem 1 you toss a coin ten times and observe the

Problem 1. You toss a coin ten times and observe the sequence of heads and tails that results. a. How many possible outcomes are there? b. What's the probability that you will get at least one "heads"? Problem. An urn co ...

Bob is interested in studying whether the average household

Bob is interested in studying whether the average household income in city A is lower than the national benchmark, μ 0  = $51,500. He collects income information from a random sample of 100 households, conducts a one-sam ...

Jane and john doe are twins jane saves 10000 per year from

Jane and John Doe are twins. Jane saves $10,000 per year from age 25 to 34 and nothing from age 35 onward (10 years of saving in total). John saves nothing from age 25 to 34 and $10,000 from age 35 to 64 (30 years of sav ...

A fair die is rolled 36 times what is the standard

A fair die is rolled 36 times. What is the standard deviation of the even number (2, 4, or 6) outcomes?

Assume the random variable x is normally distributed with a

Assume the random variable x is normally distributed with a mean u=80 and a standard deviation o=4. Find the indicated probability. P(69 P(69 Round to four decimals places as needed.

We have a normal distribution with a mean of 71 and a

We have a normal distribution with a mean of 71 and a standard deviation of 11 What is the Z value of the value 62? Round to three decimal digits. show workings please

A mental health treatment center wanted to compare group

A mental health treatment center wanted to compare group therapy vs. individual therapy. They are interested in the relationship between treatment type (group, individual) and treatment completion (yes/no). What type of ...

During the period from 2011 through 2015 the annual returns

During the period from 2011 through 2015 the annual returns on small U.S. stocks were -3.34 percent, 19.21 percent, 46.95 percent, 2.91 percent, and -4.10 percent, respectively. What would a $1 investment, made at the be ...

If the return on stock a in year 1 was 11 in year 2 was

If the return on stock A in year 1 was 11 %, in year 2 was -10 %, in year 3 was -4 % and in year 4 was 2 %, what was the standard deviation of returns for stock A over this four year period? (Round your answer to 1 decim ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As