Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Engineering Mathematics

Authors: Erwin Kreyszig

10th edition

470458364, 470458365, 978-0470458365

More Books

Students also viewed these Mathematics questions