Homework 6

Due: 2024-03-19, 11:59pm

Submission instructions

For this homework you should submit a ZIP archive containing:

  • A single document with the answers to all the following items in HTML format only. Make sure you include plain English blocks in between the code, and its output to interpret what R is giving you.
  • Code file used to generate the answers (RMD format). There should be comments in the code blocks.

  • Jupyter notebook (IPYNB) is okay.
  • Please remember to mix your comments with code and output.
  • Do not forget acknowledgements.

In this homework we will work on data transformations using Tidyverse.

1. League table (50%)

Use the EPL data for this item. Using Tidyverse functions, create the league table which contains for each team, the number of games played, the number of goals for, goals against, goal difference, and total points. Sort the table with the top point scorer on top.

This is a more elaborate version of what was done in class. Use similar steps to create this table.

2. Emergency data (50%)

Use Tidyverse functions as much as possible to do the following.

  • Tabulate for each sex, the total number of individuals, the mean CRP, and the average 30-day mortality rate.
  • Tabulate for each sex and triage status, the total number of individuals, the mean CRP, and the average 30-day mortality rate.
  • Calculate the 30-day mortality risk ratio between males and females stratified by triage status.

3. Final project (0%)

Outline your final project. State the following.

  • Goals: Outline what you want to investigate and questions you want answered.
  • Data: Describe what the dataset is, and state if you have it in hand. Mention size of the data, and evaluate if the data allows you to answer the question.
  • Analysis: Outline the analysis steps you expect to take.

4. Acknowledgements

Cite resources or individuals helping you.