Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have a question about SAS programming. I have the HW instruction and could you check if my codes make sense? Especially, I am not
I have a question about SAS programming.
I have the HW instruction and could you check if my codes make sense? Especially, I am not sure if I need where _Type_ =1; on b.
Thanks,
Instruction
6. Creating an Output Summary Table a. Write a PROC MEANS step that will calculate summary statistics for the variable hotel in pgl.eu_occ using country as the class variable. Save the output as a new temporary table named med_hotel which includes the median values for the hotel variable as a variable named MedianHotel. Use the NOPRINT option. Show your code and the corresponding log notes. b. Write a PROC SORT step to sort med_hotel by Median Hotel in descending order. If you didn't do the PROC MEANS step in a way that automatically removes the row that summarizes the entire table (the row with a blank Country), then filter out that row in this PROC SORT step. Show your code and the corresponding log notes. c. Write a DATA step to update med_hotel by eliminating the columns _TYPE_and FREQ . In this step, also assign MedianHotel the permanent label "Median of Nights Spent at Hotels". Show your code and the corresponding log notes. d. Finally, print the first 14 observations from med_hotel and display the labels for the variables. Show your code and outputStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started