hello team, Cleaning Data data cleanme; input group$ kilograms; cards; A 53.4 B 76.3 A 45.3 A 98.4 a 67.3 A 98.3 A 68.3 B 28.4 B 67.3 B 37.4 A 68.3 A 79.2 A 56.4 run;
1. Create a new dataset called cleanfinal from cleandata.
2. Set values for the Kilograms variable to between 20 and 40, inclusively.
3. If values in Kilograms are missing, or not in the 20 to 40 range, replace with the median Kilograms value found . (hint: you will do some conditional logic for Group 'A' and 'B', and you will set median kilograms for A and B)
Check out the The STDIZE Procedure
This looks like homework. What have you tried?
Here's an older topic, created by yourself dealing with the same problem: https://communities.sas.com/t5/SAS-Programming/proc-mean-with-a-where-clause-with-median/m-p/760304
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.