Assignment 4---R-PRO

Hospital Data Analysis Using R

This assignment involved analyzing fictional hospital data to practice data cleaning, visualization, and interpretation in R. The dataset contained patient visit frequencies, blood pressure readings, and physician assessments.

Data Preparation

First, I created the dataset and handled missing values


Visualizations

Boxplots

I created three boxplots to compare blood pressure across different assessments


Histograms

I also created histograms to show the overall distributions


Data Analysis Results

The boxplots show that patients with "bad" first assessments had higher blood pressure than those with "good" assessments. This pattern held true for the second assessment and final decision categories as well - patients labeled "high risk" consistently showed elevated blood pressure readings. The data suggests doctors' judgments matched the actual vital signs.

The histograms reveal interesting patterns in the data distribution. Visit frequency was fairly spread out between 0.2 and 0.6, with one patient at 0.9 who visited much more often. Blood pressure showed two clusters - one group around 60-80 and another around 170-180, indicating we had both normal and high blood pressure patients in our sample.

Removing the missing value reduced our dataset from 10 to 9 patients. While this was necessary for the analysis, it represents a 10% loss of data. The results show reasonable alignment between physician assessments and measured blood pressure, though this simulated data has limitations for drawing real clinical conclusions.

Comments

Popular posts from this blog

R Programming Journal - Omar Hamad

Assignment 6

Generic Functions in R