Question: You will be able to access an excel data set from your Canvas site called R HW2 Data. Remember this data is NOT in CSV

You will be able to access an excel data set from your Canvas site called "R HW2 Data". Remember this data is NOT in CSV form yet, so you will need to save the data file as a CSV (comma delimited) file before you can call it in R. The data consists of Diastolic blood pressure (DBP henceforth) and Heart Rate (HR henceforth) for over 400 patients. The data also shows which of the two treatment groups (either A or B) each patient was on.

(a) Find the 45th and 80th percentile for the variable DBP for the entire patient data. What do the numbers you obtained signify?

(b) Find the 45th and 80th percentile for the variable DBP BROKEN down by the two treatment groups. What do the numbers you obtained signify?

(c) Use the package plyr to obtain the mean and the standard deviation of the variable DBP broken down by the two treatment groups. Make sure to label the mean as "mean", the standard deviation as "sd" and the sample size (frequency) as "n". What is the sample size for patients in group A? Group B?

(d) Make a pink colored Boxplot of the variable HR for the entire patient data. You can use summary(HR) to first find the minimum and maximum value for HR so that you can specify the appropriate limits for your Boxplot. Give an appropriate title and label your Y-axis. What does the Boxplot tell you? (NOTE that any point that falls outside of the whiskers are considered outliers, in other words, R does not necessarily extend the whiskers to the absolute max/min, just the max/min that were NOT outliers).

(e) Make red colored Boxplots of the variable HR BROKEN down by the two treatment Groups. Give an appropriate title and label your Y-axis. What do the Boxplots tell you? How do they compare to each other?

Data:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!