Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For each of the following case, describe the best possible data structure (e.g., array, data frame, list, table etc.) for representing the data. Also, write

For each of the following case, describe the best possible data structure (e.g., array, data frame, list, table etc.) for representing the data. Also, write appropriate R codes to answer the questions that follow, treating the data as if it is given.

(a) Data:Astudyofhealtheffectsofairqualityin10majorcitiesoftheworldinvolves daily measurements on the four variables: average temperature (temp), total pre- cipitation (precip), maximum PM10 concentration (PM10) and number of deaths among elderly population (death). Measurements are available for five years.

  1. (i)What is the average number of deaths for each of the cities on days where the PM10 concentration is greater than 20 ?
  2. (ii)What is the average PM10 concentration for each of the cities on days with no precipitation and average temperature above 80 degrees F ?

(b) Data: The data consist of records of patients visit to a clinic. The measurements for each patient are: date of visit (visit), age of patient in years (age), gender with values M or F (gender), weight in lb (weight), systolic blood pressure (BP.sys), diastolic blood pressure (BP.dia), blood glucose level in mg/dl (glucose). For blood pressure levels, the unit is standard and the value is numeric with range between 0 and 600.

  1. (i)How many times did each patient visit the clinic ?
  2. (ii)What is the average systolic blood pressure level for each of the patients with maximum weight (during the study period) greater than 180 lb ?
  3. (iii)What is the average blood glucose level for each of the patients with age at least 40 years at the first visit ?
  4. 1

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

An Introduction to the Mathematics of Financial Derivatives

Authors: Ali Hirsa, Salih N. Neftci

3rd edition

012384682X, 978-0123846822

More Books

Students also viewed these Mathematics questions