Write SAS code to perform the following analysis and to answer the following questions. You may need to add additional variables to your dataset.Assignment Writing

What to hand in: Entire SAS program and all relevant output and plots generated. Be sure to answer all questions.

 A SAS dataset called tomhscv on the class website contains risk factor and cardiovascular outcome data on all 902 participants in the TOMHS study. The following variables are on the dataset.

Variable Name


group                  treatment group assigned (1-5 active drug, 6=placebo)age of participant at entry (baseline)

sex                      gender, 1=men, 2=women

eversmk             question of whether the participant ever smoke cigarettes (1=yes, 2=no)

nowsmk              question of whether the participant now smokes cigarettes (1=yes, 2=no). This question is asked only if the the variable eversmk = 1. These questions were asked at baseline.

sbpbl                   systolic BP at baseline

sbp12                   systolic BP at 12-months

cholbl                  blood serum cholesterol at baseline

chol12                  blood serum cholesterol at 12-months

hdlbl                    blood HDL cholesterol at baseline

hdl12                   blood HDL cholesterol at 12-months

glucosbl              blood glucose at baseline

glucos12              blood glucose at 12-months

cvd                      CVD event status during the study (1=yes,2=no) Do the following:


  1. In a data-step read in the dataset tomhscv creating a work dataset called tomhs and adding the following

    • Define a variable called smoke = 1 if the participant is a current smoker at baseline and 0 if not a current smoker at baseline, i.e. an ex-smoker or never-smoker (use variables eversmk and nowsmk).

    • Define a variable called dm = 1 if the participant’s glucose at baseline is above 126 mg/dl and 0 if 126 mg/dl or below at

    • Define a variable called active = 1 if on active BP medication and 0 for

    • Define a variable called rxold = 1 if group is equal to 1 or 3, and = 2 if group is equal to 2,4, or The placebo group (group = 6) should be missing.

When creating new variables be sure to account for missing data. For example, the variable smoke should only be defined for those that completed the item eversmk.

Write SAS code to perform the following analysis and to answer the following questions. You may need to add additional variables to your dataset.

  1. How many and what percentage of participants were current smokers at baseline? How many participants had missing data for smoking?

  2. How many and what percentage of participants experienced a CVD event during the study?

  3. Did being on active treatment lower the risk of CVD during the trial? Give the odds ratio of CVD for active treatment versus placebo. (Hint: Use either proc freq or prog logist).

  4. Using proc logist which of the following baseline variables are significantly related to CVD?

1) age, 2) gender (women versus men), 3) systolic BP, 4) serum cholesterol, 5) smoking, and

6) diabetes (variable dm). Include all these variables in one model. What is the adjusted odds ratio of CVD for smokers versus non-smokers?

  1. Did the older or newer drugs reduce systolic BP more at 12-months compared to baseline? Was the difference in SBP change between the two groups significant? (Hint: Use proc ttest or proc glm).


Instructions Files

Assignment Writing Experts

Kamal Nanda
Assignment Writing

45 Answers

View More Experts

The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.

Get Free Quote!

263 Experts Online