logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Raymond BarbeauGeneral article writing
(5/5)

880 Answers

Hire Me
expert
R. BakerSociology
(5/5)

785 Answers

Hire Me
expert
Basudev RoyMathematics
(/5)

569 Answers

Hire Me
expert
Ivy GeePsychology
(5/5)

621 Answers

Hire Me
R Programming
(5/5)

P values are calculated based on the assumption that the null is true for the population

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Assignment 1

Contents Introduction

This assignment is to be completed using Rmarkdown. You are to submit two documents

1. The .rmd file containing your code and write up

2. The knitted .html file from the .rmd file in (1) There are 5 questions in the report. You can use this .rmd file as your starting point. You should submit this assignment by no later than February 4th at 11:59PM eastern time zone.

Questions 1 (15 points) You have just had an initial meeting with the head of the Emergency Department at a downtown Toronto hospital. The clinician has provided you with a sample of data from patient visiting the Emergency department over a 5 day period. They are interested in being able to predict how long a patient will remain in the ED (visit_end_time - visit_start_time) You’ll need to download this CSV file and put it somewhere on your computer  raw_ed_data.csv` You are going to have a follow up meeting with the clinician in a couple of weeks. The Data The sample data contains every emergency department visit over a 5 day period with the following variables: encounter_id: a unique ID given to a patient encounter (an encounter is a patient entering and then leaving the Emergency Department) patient_id: a unique ID for a patient arrival_time: The date and time of the patient arrival to the ED departure_time: The date and time that a patient leaves the ED admit_time: The date and time that a patient is admitted to the hospital admitted: an indicator for whether or not a patient is admitted to the hospital. los_calc: A calculated variable measuring the time of a patient arrival to departure in hours presenting_complaint: The reason for the Emergency Department Visit All data is manually input into the system by clinician caring for the patient. The LOS and admitted variables are automatically calculated by the system. You have been given some time to look at the data before your next visit with the clinician.

(a) assignment/ 2/5 This messy data is typical of what you might be given from a hospital. Find at least 7 data issues that you will ask the clinician to clarify for you. Simply state the concerns you have. A data issue can be something that seems wrong with the data, or something you would like to have clarified by the clinician.

(b) 5 points Write an R function, named impute_dates() that will impute values for the missing date variables from the ed data. The function should use tidy evaluation (see here for more info). The function should take the following arguments data - a data.frame time_var - a datetime variable name from the data (e.g. arrival_time) type - takes the character values (“random”, “random_poisson”) You will test this function in part

(c) on the variables arrival_time, departure_time, and admit_time from the ed data. The function will impute based on the following rules: if type == "random", the function will pick a random datetime at uniform between “2021-11-01 00:00:00” and “2021-11-05 00:00:00”. The random draw will be different for each missing value in the data. if type == "random_poisson", the function will take a random draw from a poisson distribution with lamda = 8 and add this many hours to the arrival_time. The random draw will be different for each missing value in the data. That is, if there are 30 missing data points, you will take 30 random draws from rpois.

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme