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

  Compute probability of enron engaged in earning manipulation

Use Beneish's earnings manipulation model to compute the probability that Enron engaged in earnings manipulation for 1998, 1999, and 2000.

  Construct a frequency table for the number of novels read

A teacher asked each of her students how many novels they had read in the previous six months. The results are shown below. Construct a frequency table for the number of novels read

  Probability that high cholesterol influence walking speed

Would he be justified in concluding that walking slowly may cause high cholesterol or that high cholesterol may influence walking speed? Explain why or why not.

  For the purpose of redesigning their manufacturing process

a 23nbspfactorial is used by an a process engineer to study the effects of cutting speed a tool geometry b and cutting

  Probability that student uses fewer than six hundred minutes

The number of cell phone minutes used by high school seniors follows a normal distribution with a mean of 500 and a standard deviation of 50. What is the probability that a student uses fewer than 600 minutes?

  Rejection region for a hypothesis test

The owner of a local night club has recently surveyed a random sample of n=250 customers of the club. She would now like to determine whether or not the mean age of her customers is over 30.

  The probability of getting a defective widget is 10 you

the probability of getting a defective widget is .10. you select five widgets for the national widget championship.a.

  Algebra-solving a word problem

Problem: Two rainstorms occurred in one week in a certain area. In the first storm 30 ml of rain fell per hour, and in the second storm 20 ml of rain fell per hour.

  How much interest would they earn over the life of the

a corporation creates a sinking fund in order to have 980000 to replace some machinery in 9 years. how much should be

  Develop an approximate 99-percent confidence interval

at a recent concert the attendance was recorded to be 36327. a random sample of 2254 of those in attendance found that

  Determine the minimum-cost mixture

Determine the minimum-cost mixture that satisfies the daily demand for Sugar Sweet. Can the bounded variable simplex method used to solve this problem?

  1assume your federal income tax rate fitr is 28 and state

1assume your federal income tax rate fitr is 28 and state income tax rate sjtr. is 8. calculate your after-tax cash

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