Homework 5_2014.docx - HOMEWORK 5 Due Tuesday Variable Name Age City Description Age of subject in years City of hospital discharge Values Continuous 1

Homework 5_2014.docx - HOMEWORK 5 Due Tuesday Variable Name...

This preview shows page 1 - 3 out of 8 pages.

HOMEWORK 5 Due Tuesday, April 29, 2014 Variable Name Description Values Age Age of subject, in years Continuous City City of hospital discharge 1 = Chicago 2 = NYC Fuptime Follow up time in years Continuous Mitype Type of myocardial infarction 0 = unknown 1 = anterolateral wall 2 = other anterior wall 3 = inferolateral wall 4 = inferoposterior wall 5 = other inferior wall 6 = other lateral wall 7 = true posterior wall 8 = subendocardial 9 = other specified sites 10 = unspecified sites Race Race 1 = White 2 = Black 3 = Other 4 = Asian 5 = Hispanic 6 = NA Native 0 = Unknown readmcount Number of readmissions Ordinal Sex Sex 1 = Male 2 = Female Days_CC Days in coronary intensive care unit ordinal Days_IC Days in medical intensive care unit ordinal yearadm1 Year of admission 1985-2003 Part I We will be using the Medicare Discharge Data from two cities , Chicago and New York (available at course web page Lab 2014/ Lab 5. The data looks at persons aged 65 or more, who were discharged alive after having a myocardial infarction. The variable readmcount is the number of subsequent re-admissions of that person. We are particularly interested in looking at the comparison between subendocardial infarction (mitype=8) and other anterior wall infarction (mitype=2) .
Image of page 1
1. Set up the dataset in the following way and show your SAS code as the answer of this question. a. Add data from both cities together Create a new variable for race that is in 3 categories (White=0, Black=1, Asian, Hispanic, NA Native, and other =2, Unknown = missing). b. Create offset = log(fuptime) c. Restrict the dataset to those with mitype = 2 or 8 d. Restrict the dataset to those observations with non-missing data on readmcount, mitype, race, sex, age (you will be doing a complete case analysis, therefore restrict your data to non-missing values of all the covariates that you will be using in your analyses). e. Create a new variable for age so that the reference value is age 65 (the age when one can enter the dataset at the start of Medicare Discharge data). /* Q1 */ data chicago; set "P:\Spring 2014\EPI204\chicagofinal" ; city = 0 ; run ; data nyc; set "P:\Spring 2014\EPI204\nycfinal" ; city = 1 ; run ; data hw5; set chicago nyc; if race = 1 then racevar = 0 ; else if race = 2 then racevar = 1 ; else if 3 <= race <= 6 then racevar = 2 ; else racevar = . ; if (mitype = 2 or mitype = 8 ); if (age ne . and mitype ne . and racevar ne . and readmcount ne . and sex ne . ); offset = log(fuptime); age65 = age - 65 ; male = 2 - sex; if mitype = 2 then mi = 0 ; else if mitype = 8 then
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 8 pages?

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes