Question: The data set lemur.txt ( in the STA 3 0 2 4 folder ) contains the ID , Sex, Name, and DOB The data file

The data set lemur.txt (in the STA 3024 folder) contains the ID, Sex, Name, and DOB The data file donation.dat is in the STA3024 folder. The first 10 observations are:
120265...25
12026715151515
12026920202020
12027020105.
12027120202020
12027210101010
12027515151515
12066025252525
12066210.55
120663..5.
The following variables should be read in using list style input:
\table[[Name,Type,Length],[IDNum,Character,6],[Q1,Numeric,8],[Q2,Numeric,8],[Q3,Numeric,8],[Q4,Numeric,8]]
Q1,Q2,Q3, and Q 4 are the quarterly donations from each person.
Create a SAS data set containing the ID, Q1, Q2, Q3, Q4 and two new variables:
The number of quarters in which a person has a missing donation.
The total of the donations for each person.
Use SAS functions to calculate the new variables. The SAS data sets sales and nonsales are stored in the course folder.
a. Use the statement LIBNAME lib
'/courses/d649d56dba27fe300/STA3024';
to designate this folder as a library named lib. Make copies of lib.sales and
lib.nonsales, called work.sales and work.nonsales.
b. Use a DATA step to concatenate the SAS data sets work.sales and work.nonsales to
create a new data set called work.allemployees. Use a RENAME= data set option to
change the names of the different variables in work.nonsales.
work.allemployees should have 400 observations and 9 variables. The SAS data sets employee payroll and employee_addresses are stored in the library
defined in 3(a).
a. Use a PROC SORT step to sort lib.employee payroll in ascending order by
Employee_ID to create a new data set, work.payroll, that contains the sorted data.
b. Use a PROC SORT step to sort lib.employee_addresses in ascending order by
Employee_ID to create a new data set called work.addresses.
c. Use a DATA step to merge the two sorted data sets by Employee_ID to create a new
data set called work.payadd. This new data set should have 424 observations and 16
variables.
(date of birth) of 35 ring-tailed lemurs.
a. Using the list style of input read in the above data such that the dates are stored as
numbers (SAS dates). Print the resulting data set without formatting it.
b. Print the data set so that DOB is formatted as February 7,2024.
c. Create a new data step based on the one in (a) that calculates the age in years of each
lemur. Print the entire data set with the formats from (b).
d. Create a new data set by using a SET statement with the data set created in (a) and
use a WHERE statement to select only lemurs born in 2016.
e. Print the name of the oldest female lemur.
The data set lemur.txt ( in the STA 3 0 2 4

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 Programming Questions!