Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 2 (75 points) We use a dataset called lead_mortality.xlsx; i.e. it is in excel format. This dataset was used for a study of the

image text in transcribed

Part 2 (75 points) We use a dataset called lead_mortality.xlsx; i.e. it is in excel format. This dataset was used for a study of the effect of water contamination by lead pipes on infant mortality; see Clay et al (2014). A description of the data is available in Lead_Mortality_Description.pdf on Moodle. Preliminaries: To complete this project, start a new R-studio project folder (call it PS1 for example), in your EC2509 directory. If you are not sure what your R-studio work directory is, type getwd() in your R-studio script (or check by clicking on files in the bottom right window). Start your R-studio script in the usual way by stating what it is for, who the author is (hopefully you are) and the date. You first need to copy the data file into this R-studio project. When this is done, you can start working on your R-studio script. To get R to read this excel format data, you will need to upload the readxl library and use the command read_excel. You should write something like: newname xlsx ) where newname is a name you chose to refer to the data in R-studio, I would suggest lead and filename is the name of the excel file you are trying to convert (here lead_mortality). This command will only work if the excel file is in your R-studio project directory! Remember to save your script -use a name that is useful to identify the file. Before, we get started with the rest of the code, it might be useful to install some other packages that we will need: parameters and AER. Question 1 (10 points) At the start of a project, you should always first have a good look at the data. - What is the mean value of infant mortality, and PH? - What is the proportion of cities using lead pipes? - What is the mean value of infant mortality in cities with lead pipes, and in cities without lead pipes? HINT: you need to use Boolean instructions such as (lead ==0 )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Fundamentals Concepts, Drivers & Techniques

Authors: Thomas Erl, Wajid Khattak, Paul Buhler

1st Edition

0134291204, 9780134291208

More Books

Students also viewed these Databases questions

Question

=+j Explain the essential nature of repatriation.

Answered: 1 week ago