Question
d. Using the combined data set from part c), calculate the median baseline cholesterol measurement across all subjects, and use this information to make a
d. Using the combined data set from part c), calculate the median baseline cholesterol measurement across all subjects, and use this information to make a variable that groups subjects as less than or equal to the median, or more than the median without typing the calculated median value by hand into your code.
So using SAS here is a code I have tried:
proc means data= Combo_nodup noprint median; var B_Cholesterol; output out= median_chol median= baseline_median; run; *create new variable*; Data Combo_cholesterol; set Combo_nodup; If B_cholesterol <= baseline_median then CholGroup= 'less than or equal to median'; else CholGroup= 'more than median'; run; proc print data= Combo_cholesterol; run;
So this produces a table, however, the variable baseline_median gives a '.' for every observation I feel like I may not have combined in my Set statement?
Step 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