write my assignment 20629

Assignment 2: Recoding Data The unpleasant truth about data …Even with only a subset of the subjects and variables from the original study, and even with the data cleaned up pretty well prior to uploading the data set, you can see that there are some problems. If you only have 100 records, it might be feasible to go through these by hand and edit errors. However, if your data number in the thousands, it is not possible. The ProblemHere is our problem – we want to create subsets of our data so that we can look at medication and education for patients who are overweight (more than 200 lbs) and are hypotensive (systolic blood pressure <91mmHg). The SolutionIn this assignment you will learn two useful functions SAS has for recoding data, a few statements and two more procedures. The complete program is below, followed be a step by step explanation. Enter it exactly as below except that you will need to change the first statement from “–enter-class-directory-here’ to match the LIBNAME in the email you received from your professor. LIBNAME coh611 “/courses/dd4f9595ba27fe300” ACCESS=READONLY;PROC FREQ DATA = coh611.survey2 ;DATA cleandata ;​SET coh611.survey2;​If systolic_blood_pressure lt 91 then hypotensive = 1;Else hypotensive = 0;If weight gt 200 then overweight = 1;Else overweight = 0;PROC SORT DATA = cleandata ;​BY hypotensive;PROC UNIVARIATE DATA = cleandata;​VAR age;​BY hypotensive;Proc freq data = cleandata;Where overweight = 1;Tables race;Proc freq data = cleandata;Where overweight = 0;Tables medication;RUN ;PROC SGPLOT DATA = cleandata;HISTOGRAM systolic_blood_pressure;By hypotensive;RUN; Part A: Submit your program log and output (2 points)Part B: Answer the following four questions: (8 points)1. What was the mean age of the participants who were NOT hypotensive?2. What was the median age of the participants who were hypotensive?3. What percentage of the overweight population is white?4. How many of the people who are not overweight take Plavix?

"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"

Comments are closed.

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp