Take Home Assignment #5
EPI 626/626Q
The take-home assignment will account for 10 points total.
This assignment is due on Friday, November 8, 2019 at 11:59pm.Please answer the questions below, copy and paste the SAS code, log, and/or output depending on the individual question, and submit it using Canvas.
The datasets for this assignment are:
|
Dataset* |
Description |
|
epi626_dwts |
US “Dancing with the Stars” celebrity contestants 2004-2017, season, year, professional dance partner, finishing place, and claim to fame |
|
epi626_emmywin |
Emmy award winners for any acting category 1968-2017, year |
|
epi626_olympicgold |
US Olympic Gold Medalists 1968-2016, year |
|
epi626_oscarwin |
Academy Award winners for any acting category 1961-2018, year |
|
epi626_sbmvp |
NFL Super Bowl MVPs 1967-2018, year |
*In each dataset, observations for individuals appearing more than once were removed.
Objectives: Please identify high performing (finishing in 1st, 2nd, or 3rd place) “Dancing with the Stars” (DWTS) contestants who also received at least one of the following awards: Oscar, Emmy, Olympic gold medal, Super Bowl MVP.Create a character variable named Award with 4 levels: Oscar, Emmy, Olympic gold, and Super Bowl MVP.Create a numeric variable named Award_year, represents the year that the award was won, and another numeric variable named Time_to_DWTS, which represents the number of years between the Award win and appearance on DWTS.Please subset selected observations into a new SAS dataset named DWTS_actor_athlete, and export this new dataset to an excel or CSV file.Make sure only the following variables are included in the exported dataset:All original variables from DWTS dataset; Award, Award_year, Time_to_DWTS.
Recommended steps are outlined below but alternative methods are accepted as long as the desired goal is achieved.
- Sort (1 point) and merge (3 points)
- Hint: Check variable names and rename variables before merging so that non-BY variables from different datasets (e.g. year) have different names
- Create new variables (3 points)
- Hint: use (IN=) to tag datasets
- Hint: Use Length statement to avoid truncation.
- Use IF or WHERE to subset the select observations (1 point)
- Use PROC EXPORT or EXPORT Wizard to export. (2 points)


0 comments