Question: 1. how do you create a SAS dataset called wtsbp reading the following variables from tomhs.data (You have already had some experience reading in variables

1. how do you create a SAS dataset calledwtsbpreading the following variables fromtomhs.data(You have already had some experience reading in variables from this dataset from Assignment2 and 3).

ptid, age, sex, marital, wtbl, wt6, sbpbl, sbp6

Using PROC FORMAT create suitable formats forsexandmarital.

2.how do you Compute two new variables in the DATA step: change in weight and change in systolic blood pressure.Call the variableswtdifandsbpdif.The formula forwtdifis:

wtdif = wt6 - wtbl;Definesbpdifin a similar manner.

Note: by computing the differences in this way negative valueswillindicate adecreasefrom baselineand positive values will indicate anincreasefrom baseline.

3. Use a procedure that displays the counts and means of the 3 weight and 3 systolic BP variables.Include the output from the procedure.What was the average weight change? How many missing values are there for wtdif and sbpdif?

4. Use a procedure that displays the means, standard deviations and 95% confidence intervalsof the 3 weight and 3 systolic BP variablesseparatelyfor men and women.Include the output from the procedure.Which sex had the greatest average decrease in weight?

5. Run proc univariate for the variablewtdif.What are the 25th, 50th, and 75thpercentiles of weight change?Which patient ID had the greatest loss in weight?(Hint: Use the ID statement in proc univariate).

6. how do you create an ODS RTF file of the cross-tabulationof patients by marital status and gender.Be sure to have a title in the ODS output.Try to make the table "pretty".Include the table here.What is the percentage of men that are currently married?Among participants who are married, what percentage are women?Seethe TOMHS data collection formsfor the categories of marital status.(Note: You need to take care in reading off the correct percentage).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!