Question: Task 3: 3a: Write appropriate SAS procedure statements for sorting the data set Flying_Activities by the variable Member_Id. Name the sorted data set as Sorted_Activities

Task 3: 3a: Write appropriate SAS procedure statements for sorting the data set Flying_Activities by the variable Member_Id. Name the sorted data set as Sorted_Activities and place it in the Work library of SAS Studio. 3b: Write a DATA step to reshape Sorted_Activities by collapsing the observations with the same Member_Id value into a single observation. Name this new SAS data set as Collapsed_Activities and place it in the Work library of SAS. Create the following variables and keep only these variables, but not necessary in the listed order, for each observation in Collapsed_Activities: Task 3: 3a: Write appropriate SAS procedureTask 3: 3a: Write appropriate SAS procedure

Variable Name Member_ld Air_CityU_2018 Air_CityU_2019 Air_CityU_2020 Air_NonCityU_2018 Description Member's identity. Number of times flew on CityU Airline (i.e. Airline value = 'CityU') in 2018. Number of times flew on CityU Airline in 2019. Number of times flew on CityU Airline in 2020. Number of times flew on non-CityU Airlines (i.e. Airline value ^= 'CityU') in 2018. Number of times flew on non-CityU Airlines in 2019. Number of times flew on non-CityU Airlines in 2020. Total bonus points earned from flying in 2018. Total bonus points earned from flying in 2019. Total bonus points earned from flying in 2020. Air_NonCityU_2019 Air_NonCityU_2020 FlyBonus_Earned_2018 FlyBonus_Earned_2019 FlyBonus_Earned_2020 member_id 12345678_10 12345678_100 12345678_10000 12345678_100000 12345678_10001 12345678_10002 12345678_10003 12345678_10004 12345678_10005 12345678_10007 Air_CityU_2018 Air_City_2019 Air_CityU_2020 Air_NonCityU_2018 Air_NonCityU_2019 Air_NonCityU_2020 FlyBonus_Earned_2018 FlyBonus_Earned_2019 FlyBonus_Earned_2020 8 6 6 0 2 4 8598 20550 15704 4 4 6 4 4 2 2 9416 7160 9548 6 10 4 2 0 2 2 16480 14616 10184 2 2 6 4 4 4 2 16026 19352 35010 4 4 2 2 2 0 2 2 2 6088 3852 4458 2 10 2 2 2 0 6808 21176 9354 8 4 8 8 4 4 4 2 2 12994 8812 15854 6 8 4 0 0 2 6512 8878 22 24 18 10 12 6 65748 43332 37598 4 4 4 6 6 4 4 16288 8794 20678 17394 Variable Name Member_ld Air_CityU_2018 Air_CityU_2019 Air_CityU_2020 Air_NonCityU_2018 Description Member's identity. Number of times flew on CityU Airline (i.e. Airline value = 'CityU') in 2018. Number of times flew on CityU Airline in 2019. Number of times flew on CityU Airline in 2020. Number of times flew on non-CityU Airlines (i.e. Airline value ^= 'CityU') in 2018. Number of times flew on non-CityU Airlines in 2019. Number of times flew on non-CityU Airlines in 2020. Total bonus points earned from flying in 2018. Total bonus points earned from flying in 2019. Total bonus points earned from flying in 2020. Air_NonCityU_2019 Air_NonCityU_2020 FlyBonus_Earned_2018 FlyBonus_Earned_2019 FlyBonus_Earned_2020 member_id 12345678_10 12345678_100 12345678_10000 12345678_100000 12345678_10001 12345678_10002 12345678_10003 12345678_10004 12345678_10005 12345678_10007 Air_CityU_2018 Air_City_2019 Air_CityU_2020 Air_NonCityU_2018 Air_NonCityU_2019 Air_NonCityU_2020 FlyBonus_Earned_2018 FlyBonus_Earned_2019 FlyBonus_Earned_2020 8 6 6 0 2 4 8598 20550 15704 4 4 6 4 4 2 2 9416 7160 9548 6 10 4 2 0 2 2 16480 14616 10184 2 2 6 4 4 4 2 16026 19352 35010 4 4 2 2 2 0 2 2 2 6088 3852 4458 2 10 2 2 2 0 6808 21176 9354 8 4 8 8 4 4 4 2 2 12994 8812 15854 6 8 4 0 0 2 6512 8878 22 24 18 10 12 6 65748 43332 37598 4 4 4 6 6 4 4 16288 8794 20678 17394

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 General Management Questions!