Module # 4 Programming structure in R
Module # 4 Programming structure in R
Your assignment:
The following data was collected by the local hospital. This data set contains 5 variables based on observation of 8 patients. In addition to the measurements of the patients checking in to the hospital that night, this data provides the patients' histories regarding the frequency of their visits to the hospital in the last 12 months.This data displays the measurement of blood pressure, first assessment by general doctor (bad=1, good =0) titled "first," the second assessment by external doctor (called "second"), and the last row provides the head of the emergency unit's decision regarding immediate care for the patient based on the values 0 or 1 (low = 0, high =1).
The names of your variables are as follows: "Freq","bloodp","first”, " second”, ”finaldecision”
The rows
1. "0.6","103","bad","low","low”
2. "0.3","87","bad","low","high”
3. "0.4","32","bad","high","low”
4. "0.4","42","bad","high","high"
5. "0.2","59","good","low","low”
6. "0.6","109","good","low","high”
7. "0.3","78","good","high","low”
8. "0.4","205","good","high","high”
9. "0.9","135",”NA","high","high"
10. "0.2","176",”bad","high","high”
Here is Clarification hint:
Frequency <- c(0.6,0.3,0.4,......
BP <- c(103,87,32,42,.....
First <- c(1,1,1,.....
Second <- c(0,0,1,1,...
FinalDecision <- c(0,1,0,1,...
Your first assignment: Create a side-by-side boxplot (boxplot(x, ...)) and and histogram ((hist(x, ...)).
Discuss the outcome of your results regarding patients BPs & MD’s Ratings.
Post your result in your blog and code on GitHub.
Frequency <- c(0.6,0.3,0.4,......
BP <- c(103,87,32,42,.....
First <- c(1,1,1,.....
Second <- c(0,0,1,1,...
FinalDecision <- c(0,1,0,1,...
Your first assignment: Create a side-by-side boxplot (boxplot(x, ...)) and and histogram ((hist(x, ...)).
Discuss the outcome of your results regarding patients BPs & MD’s Ratings.
Post your result in your blog and code on GitHub.
I sorted the data and created a data frame titled "Hospital_Data"
I then created a boxplot regarding the three assessments. We are able to see how the assessments play out depending on the blood pressure. If the patient has a generally lower BP in the first assessment, the doctor would say it is bad. In the second assessment, if the patient's BP doesn't remain within the 75 to 100 range, they are likely to be listed as bad. In the final assessment, if the patient BP is high, then it is a greater risk and they need to be seen.
I then created histograms of BP, First Doctor's Assessment, Second Doctor's Assessment, and the ER unit assessment. With this we are able to see the frequency of certain BPs, the frequency of Good and Bad ratings as well as High and Low ratings. I believe these histograms provide a clear visualization of the various patient's BP as well as the similarity in number of good and bad ratings between these three assessments.
These visualizations show how important it is to be careful with your blood pressure. Depending on the doctor or specialization that you see, some may declare that your BP is fine while other would not. It shows how important it is to receive a second or third opinion regarding medical conditions.
or
https://github.com/AlenjaksAbraham/LIS4370.git
To see the code look under Module 4 R Markdown.Rmd or Module 4 Programming Structure.R
Comments
Post a Comment