We Have Numbers Of Free Samples
For Each Subject To Make A Difference In Your Grade
Diabetes 130-US Hospitals for Years 1999-2008 – SAS Report
Total Views 707
Introduction
Data Set Information:
The dataset represents 10 years (1999-2008) of clinical care at 130 US hospitals and integrated delivery networks. It includes over 50 features representing patient and hospital outcomes. Information was extracted from the database for encounters that satisfied the following criteria.
- It is an inpatient encounter (a hospital admission).
- It is a diabetic encounter, that is, one during which any kind of diabetes was entered to the system as a diagnosis.
- The length of stay was at least 1 day and at most 14 days.
- Laboratory tests were performed during the encounter.
- Medications were administered during the encounter.
The data contains such attributes as patient number, race, gender, age, admission type, time in hospital, number of medication, diagnosis, insulin & readmitted.
Abstract:
Diabetes is a chronic health disease that has been effecting millions of people around the world across gender and age groups.
The objective of this research is to analyse the diabetes data of 130-US hospitals to predict the features that are associated with a diabetic patient being readmitted. The results from this research will have a practical significance of helping the hospitals to be able to create a patient discharge and following up protocol through which they can provide greater attention and care for patients that can be predicated to have greater probability of readmission based on various attributes, thereby helping to reduce the cost burden on patients and improving healthcare services.
The data will be obtained from the Center of Machine Learning and intelligent Systems through the website of University of California(Irvine). This publicly available data set (UCI, 2019) has more than 100,000 instances and contains patient data and clinical records collected across 55 variables patient’s age, gender, number of days admitted, insulin, laboratory tests and procedures administered, etc. The data is a multivariate panel dataset which consists of decade long data collected from 1999 to 2008. SAS will be used in this paper to identify patients with a higher likelihood of readmission. The research problem I have framed is probability prediction for how many patients will be re-admitted to hospital or not.
Solution or Analysing the Data Set:
For solving the above mentioned problem first, I have downloaded the data set. After downloading the data set, I have checked what kinds of attributes are present in the dataset. Based on these attributes I have formulate the problem in the data set to find the exact solution.
The next step will be pre-processing phase. I will check if there are any missing values and inappropriate values. I have created new variables or repurpose existing variables. In this data set the missing values has been in ‘?’.
At the primary analysis I found that variables such as weight, payer_code, medical_speciality, number emergency & many more data. The missing values & variables has been dropped by 50%.
After cleaning the data, I have applied the statistical concepts on the data to get the proper statistical values. These values will contain the descriptive values about the dataset which will tell about the nature of the data. Due to these values I will try to understand the patient conditions and make my decisions based on these data.
Data Cleaning & Preparation:
I have first used manually cleaning through excel but there are no duplicate rows found whereas when cleaning in SAS I got numerous missing values like ‘?’ , “0”, etc. & so on . So for this I have dropped these tables and then by selecting only the values which is needed for our Analysis. So, we Kept the Column Variables like “patient number, race, gender, age, time in hospital number medications, number diagnoses, insulin, readmitted” etc. and the rest fields are dropped because the other fields contain ‘?’ , “0”, etc. & so on.
Data Importing:
For this I have imported the data by using the import option from SAS. We have run the data cleaning method in SAS as well as in Excel but no duplicate data is not available in the data set we have ran the program by using this program to find if there is any duplicate data in the data set.
The code follows here:
proc sort data=work.import out=ts noduprecs dupout=tik;
by _all_;
run;
For this I have imported the data set & made output field in “TS” field & duplicate values in DUPOUT field “TIK” library. First we have taken our data from the library then we made an output folder in “ts” and duplicate values in “tik” but no results were found so from this statement we can see that this is a clean data set.
After importing cleaning are made then I made SAS library named “Diabetes” because it would be very easy for us to after logging out the data would not be cleaned it would be remained forever. The data I have set in work data base it has created IMPORT table. Then I have used Filter in number of medications field where medicine given here is >=8. Then, we have kept the table of patient number, race, gender, age, time in hospital, number medications, number diagnoses, insulin & readmitted. Since these fields are very much important for making good story with this data. The other fields are dropped out because those fields contain missing values. For this I have used this following code to do this.
/*Program starts here */
data diabetes;
set work.import;
where num_medications >=8;
keep patient_nbr race gender age time_in_hospital num_medications number_diagnoses insulin readmitted;
run;
The Table output of the Table Properties are given in the figure here:

Data Visualizing:
I have used frequency for analyzing the results of age, time in hospital & race. For analyzing this I have used this code to analyze my data. The age wise frequency is given which is very easy to understand the full dataset plus we can see race wise frequency & distribution as well as tables plus the graph charts for this graphs I have used Frequency Plot in q horizontal scale.
The code is given below:
/*code Starts here */
ods graphics on;
proc freq data=work.diabetes order=freq nlevels;
tables age time_in_hospital race /nocum plots=freqplot(orient=horizontal scale=percent);
run;
/*Code ends here */
The output Figure given below:



So, in this Visualization we can see report in percentage. Why I have used percentage method? Since, the data is very big the numbers are high enough so percentage is the best option to analyze the data.
The next Visualization is we have done Time Spent in the hospital.
Since, it is very hard to analyze the data by seeing the numbers from 90517 rows & nine columns it is very difficult to analyze the time spent in the hospital for analyzing this I have used this code & made the visualization in histogram. The code follows here:
Figure 1.0 Code:
/*–Histogram–*/
title ‘Time Spent in Hospital’;
proc sgplot data=work.diabetes(where=(gender ne ”));
histogram time_in_hospital;
density time_in_hospital / lineattrs=(pattern=solid);
density time_in_hospital / type=kernel lineattrs=(pattern=solid);
keylegend / location=inside position=topright across=1;
yaxis offsetmin=0 grid;
run;
The Figure Follows Here:

So, what I have used in the code I have used “Title” for to write image heading & PROC SGPLOT is used for histogram we are analyzing the average time in hospital in density we have used line for showing the average time. From this the visualization is very clear how many patients have spent how much their time in hospital. The same analysis is done but without using male female field as you can see in Figure 1.1. In Figure 1.1 uses simple program to do this where no average is used. The program code as follows here:
Figure 1.1 code:
proc sgplot data=work.diabetes;
histogram time_in_hospital;
density time_in_hospital;
run;
So, in this we can see only SGPLOT is used plus histogram is used for this.
Next We, have visualized data for Time spent in hospital by Race Field. First we use TITLE Field to write title on top of the Horizontal bar. So for this We have used SGPLOT to do this where we have used horizontal bars to do this on the YAXIS I have used RACE on the XAXIS I have used number of days spent in hospital. I have used MEAN field to show in details.
/*–HBar Plot–*/
title ‘Race by Time spent in Hospital’;
proc sgplot data=work.diabetes;
hbar race / response= time_in_hospital stat=mean limits=both;
yaxis display=(nolabel) grid;
xaxis display=(nolabel);
run;

In the next Visualization is the most important visualization in terms of above all visualization because the number of persons affected in Diabetes disease from this we can make decision how much persons are affected within 10 years. So, for this huge dataset it is hard to analyze so for this reason I have used MEAN because this is the only technique to get the exact outcome of the large data set. For this I have used this code:
/*–HBar Plot–*/
title ‘Diabetes’;
proc sgplot data=work.diabetes ;
hbar gender / response= num_medications stat=mean limits=both;
yaxis display=(nolabel) grid;
xaxis display=(nolabel);
run;
Again, I have used SGPLOT to visualize the data and as said earlier I have used MEAN to get the proper results. On X Axis I Have used number medications and on the Y Axis I have used gender to plot the data. The results are given here in Diagram.

So, in this diagram we can see almost the same values in Male & Female Fields. The other Fields comes is unconfirmed field I have kept it as it is to show the values.
The next visualization is very much important because in this visualization I have showed number of patients given insulin or not I have divided this as race as well as Age group. The code follows here for analyzing the data:
title ‘Patients given insulin’;
proc gchart data=work.diabetes;
vbar age / sumvar= time_in_hospital group= insulin
subgroup= race autoref clipref
type=mean nozero space=0
gaxis=axis1 maxis=axis2
legend=legend1;
So, For this from the code I have used the TITLE field to give the title name of the graph. In this Visualization I have used GCHART to visualize the data. For this I have taken the variable as age in X Axis & sum Variable the time spent in the hospital plus in X Axis I have used insulin because to show the number of patients given insulin or not. I have subgrouped Race it is in colour. As in the visualization. Last but not least at the end of the code I have not used RUN statement because it will double visuliaze the data.

In the next visualization is almost same as the previous visualization but some fields differ from the above. So, in this visualization I have showed The patients who have been re-admitted in the hospital by gender type plus the time spent in the hospital. So the code is almost same as the previous ones but the variables have changed as you can see I have changed only gender & time in hospital as well as readmitted & I have used GCHART to do the visualization the code follows here:
title ‘Patients by gender’;
proc gchart data=work.diabetes;
vbar gender / sumvar= time_in_hospital group= readmitted
subgroup= race autoref clipref
type=mean nozero space=0
gaxis=axis1 maxis=axis2
legend=legend1;
So, the output follows here in this figure:

BookMyEssay boasts of an academically inclined and talented team of the best Australian professionals who have hands-down expertise and experience in writing academic projects. In an attempt to help students in their homework, these coursework writers exercise the rules of affordability, originality, accessibility, and higher standards of professionalism which makes them stand taller than their counterparts. Gaining immense word of mouth recommendation and positive all writing services reviews, BookMyEssay has managed to pull the right strings and secure an unchallenged position in the market.
Download
505
Size
140.91 KB
File Type
[contact-form-7 404 "Not Found"]