Question: Question 1 a) Copy and paste the program below into SAS editor. Debug it to create work.newemps dataset and format Salary with S sign and

 Question 1 a) Copy and paste the program below into SAS

editor. Debug it to create work.newemps dataset and format Salary with S

Question 1 a) Copy and paste the program below into SAS editor. Debug it to create work.newemps dataset and format Salary with S sign and 2 decimals for cents. b) Print the data set work.newemps c) Print descriptor part of the dataset using proc contents. What are the types, length and format of the variables in this dataset? data work.newemps; input First_Name Last_Name $ Job Title $ Salary $; datalines; Steven Worton Auditor 40450 Merle Hieds Trainee 24025 John Smith Manager 35666 ; run; Question 2 a) Create a new SAS dataset Assign1.Survey 2007 from the data given below by completing sections. The variables in the dataset are: responder's Age, Gender and answers to 5 questions to be denoted as Q1, ..., Q5 with values from 1 (strongly agree) to 5 (Strongly disagree). Label and format the variables in a meaningful way. Fix the syntax where needed. Do not edit the dataset. Explain your code and make sure it works before submitting. data input ; 23 M 5243 30 F 11123 42 M 23555 48 F 55531 2 55 F4 232 62 F 3333 68 M 4412 run; 55 F4 232 62 F 3333 68 M 4412 run; b) Create a subset of the above dataset that contains only females older than 40 years old who answered 5 (strongly disagree) to questions 1 and 3. Print your output. Question 3 TRUE or FALSE? (explain your choice) a. The two types of steps that can make up a SAS program are DATA and PROC. T b. A statement always ends in a colon. F c. Data sets located in the Sasuser data library are considered temporary. F d. A variable name and the name of a data set can be up to 32 characters long. T e. By default, a variable name can contain special characters such as a dash (-). T f. A numeric variable is stored as 32 bytes by default. F g. A SAS date value represents the number of days between January 1, 1960 and a specific date. T h. A missing numeric value is represented with a zero. F i. A missing character value is represented with a blank. T j. A statement that starts with an asterisk is a SAS comment. T Question 4. Using Customer.orders data set find out the frequency distribution of the number of products ordered? Provide both tabular and bar chart to show this distribution. Comment on it. title Frequency Distribution of Products ordered; proc freq data-data445.customer_orders; tables Product ID; run; title 'Products Bar Chart'; proc sgplot data=data445.customer_orders; vbar Product_id; run; 3 Question 1 a) Copy and paste the program below into SAS editor. Debug it to create work.newemps dataset and format Salary with S sign and 2 decimals for cents. b) Print the data set work.newemps c) Print descriptor part of the dataset using proc contents. What are the types, length and format of the variables in this dataset? data work.newemps; input First_Name Last_Name $ Job Title $ Salary $; datalines; Steven Worton Auditor 40450 Merle Hieds Trainee 24025 John Smith Manager 35666 ; run; Question 2 a) Create a new SAS dataset Assign1.Survey 2007 from the data given below by completing sections. The variables in the dataset are: responder's Age, Gender and answers to 5 questions to be denoted as Q1, ..., Q5 with values from 1 (strongly agree) to 5 (Strongly disagree). Label and format the variables in a meaningful way. Fix the syntax where needed. Do not edit the dataset. Explain your code and make sure it works before submitting. data input ; 23 M 5243 30 F 11123 42 M 23555 48 F 55531 2 55 F4 232 62 F 3333 68 M 4412 run; 55 F4 232 62 F 3333 68 M 4412 run; b) Create a subset of the above dataset that contains only females older than 40 years old who answered 5 (strongly disagree) to questions 1 and 3. Print your output. Question 3 TRUE or FALSE? (explain your choice) a. The two types of steps that can make up a SAS program are DATA and PROC. T b. A statement always ends in a colon. F c. Data sets located in the Sasuser data library are considered temporary. F d. A variable name and the name of a data set can be up to 32 characters long. T e. By default, a variable name can contain special characters such as a dash (-). T f. A numeric variable is stored as 32 bytes by default. F g. A SAS date value represents the number of days between January 1, 1960 and a specific date. T h. A missing numeric value is represented with a zero. F i. A missing character value is represented with a blank. T j. A statement that starts with an asterisk is a SAS comment. T Question 4. Using Customer.orders data set find out the frequency distribution of the number of products ordered? Provide both tabular and bar chart to show this distribution. Comment on it. title Frequency Distribution of Products ordered; proc freq data-data445.customer_orders; tables Product ID; run; title 'Products Bar Chart'; proc sgplot data=data445.customer_orders; vbar Product_id; run; 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!