Pointer control to read data in fixed columns

Assignment Help Basic Statistics
Reference no: EM131054154

Knowledge Questions

1. When using pointer control to read data in fixed columns, the _____ symbol moves the pointer to a specific column? This method is considered _____________ pointer control.

2. When using pointer control to read data in fixed columns, the _____ symbol moves the pointer over a specific number of columns? This method is considered _____________ pointer control.

3. When used during a data step, the _______ statement selects specific variables to include in the output SAS dataset, while the _____ option in the SET statement selects specific variables to be read in from the input SAS dataset.

4. Using Label and Format statements during a data step ___________ assigns these attributes to variables, while using these statements during PROC PRINT __________ assigns these attributes to variables.

5. There are three statements that can be used to eliminate specific observations during a data step. These are the __________ statement, the __________ statement and the __________ statement.

Programming Assignment
1. Concatenating SAS Data Sets

The goal is to create a second-quarter data set for International Airlines' Vienna hub. Write a data step that combines target information for April, May, and June into one data set. This data is currently stored in separate data sets by month as follows:
· ia.aprtarget
· ia.maytarget
· ia.juntarget
a. As a first step, browse the descriptor portion of each data set to determine the number of observations, as well as the number of variables and their attributes. How many observations does each data set contain?
· ia.aprtarget _____
· ia.maytarget _____
· ia.juntarget _____
What are the names of the variables in each data set?
ia.aprtarget _____________________________________________________
ia.maytarget
___________________________________________________
ia.juntarget
________________________________________________

b. Now write a data step to concatenate the three data sets and create a new data set called work.q2vienna. Use the RENAME= option of the Set statement to rename any variables necessary to combine the datasets.

c. Browse the SAS log. There should be no warning or error messages.
· How many observations are written to the new data set?
· How many variables does the new data set contain?
d. Submit a PROC PRINT step to verify the data.
e. Now modify the DATA step to create two new variables: TotalTar and TotalRev.
· TotalTar is the total targeted number of economy and first class passengers.
· TotalRev is the total revenue expected from economy and first class passengers.
Keep only the variables FlightID, Destination, Date, TotalTar, and TotalRev.
Submit a PROC PRINT step to verify the data.

2. Merging SAS Data Sets
The weather in Birmingham, Alabama on December 15, 1999, might have caused some customers to alter their shipping plans. Investigate how much cargo revenue was lost on all flights out of Birmingham by comparing the targeted revenue with the actual revenue.

a) Sort the data set ia.target121999 into a temporary data set called work.sort_b. Sort by the variable FlightID. Use the WHERE statement to create a subset for Birmingham on December 15, 1999. where Date='15dec1999'd and Origin='BHM';

b) Sort the data set ia.sales121999 into a temporary data set called sort_s. Sort by the variable FlightID. Use the WHERE statement to create a subset for Birmingham on December 15,1999. where Date='15dec1999'd and Origin='BHM';

c) Create a new temporary data set called compare by merging the sort_b and sort_s data sets by the variable FlightID. Subtract CargoRev from CargoTarRev to create a new variable called LostCargoRev.

d) Print the merged data set compare (print only the variables CargoTarRev, CargoRev, and LostCargoRev) and label the LostCargoRev variable. Format the LostCargoRev variable with a dollar sign and two decimal digits.

3. Creating Frequency Reports
a. Use PROC FREQ to create a report using the data1.sanfran data set that displays the frequency count for each Destination, and a separate frequency count for each DepartDay. Add an appropriate title to each frequency table. Your output should look like this:
SAS Output

b. You can specify many options in the TABLES statement to control the calculations and appearance of
a frequency table. The NOCUM option suppresses the printing of the cumulative frequencies and cumulative percentages. Modify the program from Exercise 1.a above to repeat the frequency tables,  but without the cumulative frequencies. Part of your output will look like this:

Partial SAS Output
c. Use PROC FREQ to create a two-way frequency table using the data1.sanfran data set that displays the frequency count for each Destination by DepartDay combination.

SAS Output
4. Validating Data with PROC FREQ
a. PROC FREQ is useful in checking the validity and completeness of data (i.e., invalid values stand out). Use PROC FREQ to check the validity of the variables Gender and JobCode in the data1.mechanics data set.
1) What do you notice about the values of the variable Gender?
2) What do you notice about the values of the variable JobCode?
b. Modify the previous report to display the frequency count for each Gender by JobCode. What are the JobCode values for the invalid values of Gender? (The output is not shown because it provides the answer.)

5. Creating Basic Summary Statistics
a. Generate a PROC MEANS report using the data1.sanfran data set as input to display statistics for the variables CargoRev and TotPassCap only. Remove any titles currently in effect.
b. Modify the previous report to display the data for each Destination (note: you do NOT need to sort the sanfran dataset to do this). Include the following statistics (number of observations, mean, median, mode, range and standard deviation. Limit all output to two decimal places.

Partial SAS Output (not all statistics are shown)

c. Modify the previous report to display the data for each Destination (note: you do NOT need to sort the sanfran dataset to do this). Limit the statistics to number of observations, mean and standard deviation. Limit all output to two decimal places.

6. Creating a One-Dimensional Frequency Table

Use PROC TABULATE and the data1.employees data set to produce a summary report that displays a frequency count for the variable Division with an appropriate title.

7. Creating a Two-Dimensional Frequency Table
Modify the previous report to do the following:

  •  Use a WHERE statement to display only divisions that have the word OPERATIONS in the name
  •  display the variable City in the row dimension
  •  add row and column totals
  • add an appropriate title

8. Creating a Summary Table on an Analysis Variable - Modify the previous report to do the following:

  •  display the mean of the variable Salary in the column dimension
  • display the overall mean of the variable Salary in the column dimension (Use the ALL option)
  •  display the data with dollar signs, commas, and two digits after the decimal point
  • add an appropriate title

Reference no: EM131054154

Questions Cloud

Importance of accounting in identifying operational needs : Accounting practices and principles are at the heart of a manager's role. To understand the needs of operating a department, it is necessary to understand the importance of accounting in identifying operational needs.
If tax rate is 34 percent what is the irr for this project : Your firm is contemplating the purchase of a new $575,000 computer-based order entry system. The system will be depreciated straight-line to zero over its five-year life. It will be worth $59,000 at the end of that time. You will save $265,000 before..
Investing and financing activities : Purely in your words, define and discuss the differences between operating, investing and financing activities. This should be done in APA format and essay. db thread 200 words.
Define value at risk : 1. Define Value at Risk 2. Summarize the strengths of VaR as a risk management tool. 3. Summarize the weaknesses of VaR.
Pointer control to read data in fixed columns : 1. When using pointer control to read data in fixed columns, the _____ symbol moves the pointer to a specific column? This method is considered _____________ pointer control.
Purchase price for existing stockholders : What will be the new purchase price for the existing stockholders? (Do not round intermediate calculations. Round your answer to 2 decimal places.)
History of process costing in the united states : Research the history of process costing in the United States. When did it begin to be used in manufacturing companies? What type of company would use a process costing system?
Determining the probability distribution : You are considering purchasing the equity stock of Electra Limited. The currentprice per share is Rs.20. You expect the dividend a year hence to be Re.2.00. Youexpect the price per share of Electra stock a year hence to have the following probabil..
What stage of its product life cycle is google glass : Using the diffusion of innovation theory, assess how quickly Google Glass will diffuse based on its relative advantage, compatibility, observability, complexity, and trialability.

Reviews

Write a Review

Basic Statistics Questions & Answers

  Statistics-probability assignment

MATH1550H: Assignment:  Question:  A word is selected at random from the following poem of Persian poet and mathematician Omar Khayyam (1048-1131), translated by English poet Edward Fitzgerald (1808-1883). Find the expected value of the length of th..

  What is the least number

MATH1550H: Assignment:  Question:     what is the least number of applicants that should be interviewed so as to have at least 50% chance of finding one such secretary?

  Determine the value of k

MATH1550H: Assignment:  Question:     Experience shows that X, the number of customers entering a post office during any period of time t, is a random variable the probability mass function of which is of the form

  What is the probability

MATH1550H: Assignment:Questions: (Genetics) What is the probability that at most two of the offspring are aa?

  Binomial distributions

MATH1550H: Assignment:  Questions:  Let’s assume the department of Mathematics of Trent University has 11 faculty members. For i = 0; 1; 2; 3; find pi, the probability that i of them were born on Canada Day using the binomial distributions.

  Caselet on mcdonald’s vs. burger king - waiting time

Caselet on McDonald’s vs. Burger King - Waiting time

  Generate descriptive statistics

Generate descriptive statistics. Create a stem-and-leaf plot of the data and box plot of the data.

  Sampling variability and standard error

Problems on Sampling Variability and Standard Error and Confidence Intervals

  Estimate the population mean

Estimate the population mean

  Conduct a marketing experiment

Conduct a marketing experiment in which students are to taste one of two different brands of soft drink

  Find out the probability

Find out the probability

  Linear programming models

LINEAR PROGRAMMING MODELS

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd