Correlation, Linear Regression and Chi-Square Test
Observations
Correlation
Correlation Summary
Linear Regression Model Summary
Chi-Square Test of Independence
Following relationship are between outcome(Disease, No Disease) with other categorical variables
Dataset Details
Categorical Variable |
Description |
Numeric Variable |
Description |
sex |
1= male, 0= female |
age |
age in years |
cp |
chest pain type |
trestbps |
resting blood pressure (mmHg) |
fbs |
fasting blood sugar > 120 mg/dl |
chol |
serum cholesterol in mg/dl |
restecg |
resting electrocardiographic results |
thalach |
maximum heart rate |
exang |
exercise induced angina |
oldpeak |
ST depression induced by exercise relative to rest |
slope |
slope of peak exercise ST |
|
|
ca |
no. of major vessels colored |
|
|
thal |
thallium stress test |
|
|
num |
diagnosis of heart disease |
|
|
cp- chest pain type
- Value 1: typical angina
- Value 2: atypical angina
- Value 3: non-anginal pain
- Value 4: asymptomatic
fbs- fasting blood sugar
restecg- resting electrocardiographic results
- Value 0: normal
- Value 1: having ST-T wave abnormality (T wave inversions and/or ST elevation or depression of > 0.05 mV)
- Value 2: showing probable or definite left ventricular hypertrophy by Estes' criteria
exang- exercise induced angina
slope- the slope of the peak exercise ST segment
- Value 1: upsloping; Value 2: flat; Value 3: downsloping
number of major vessels (0-3) colored by fluoroscopy
thal- thallium stress test
- 3 = normal; 6 = fixed defect; 7 = reversable defect
num (outcome)- diagnosis of heart disease (angiographic disease status)
- Value 0: < 50% diameter narrowing
- Value 1: > 50% diameter narrowing (in any major vessel: attributes 59 through 68 are vessels)
This R Shiny web app allows the user to classify heart disease risk factor and data analysis using plots, statistical method and machine learning algorithm.
The app has sidebar for uploading heart disease dataset. You can either use the app with sample data or you can upload the data with certain column names and without missing value.
With the app you can analyse heart disease risk factors using different types of plots, statistical method like correlation, regression, chi-square test of independence and you can also use few types
of predictive modeling to classify the risk factors of heart disease.
I would like to continue enhancing this app with many additional features and graphics.
Stay tuned for updates.
Md Faisal Akbar
Coder | Researcher | useR
Github.io |
Shiny Server |
Facebook |
Twitter |
Linkedin
Dataset Information
A sample from the raw file found here, with some of minor edits, for instance I removed missing values and inserted column names.
Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.
Source Information
-
Creators:
1. Hungarian Institute of Cardiology. Budapest: Andras Janosi, M.D.
2. University Hospital, Zurich, Switzerland: William Steinbrunn, M.D.
3. University Hospital, Basel, Switzerland: Matthias Pfisterer, M.D.
4. V.A. Medical Center, Long Beach and Cleveland Clinic Foundation: Robert Detrano, M.D., Ph.D.
-
Donor: David W. Aha (aha @ ics.uci.edu)
Attributes
-
Number of attributes: 14 (overall).
-
9 attributes are categorical variable. The remainder are numeric-valued.
-
age: in years
-
sex (1 = male; 0 = female)
-
cp- chest pain type: 1= typical angina; 2= atypical angina; 3= non-anginal pain; 4= asymptomatic
-
trestbps: resting blood pressure (in mm Hg on admission to the hospital)
-
chol- serum cholestoral in mg/dl
-
fbs- fasting blood sugar > 120 mg/dl, 1 = true; 0 = false
-
restecg- resting electrocardiographic results, 0= normal, 1= having ST-T wave abnormality (T wave inversions and/or ST elevation or depression of > 0.05 mV), 2= showing probable or definite left ventricular hypertrophy by Estes criteria
-
thalach- maximum heart rate achieved
-
exang- exercise induced angina, 1 = yes; 0 = no)
-
oldpeak- ST depression induced by exercise relative to rest
-
slope- the slope of the peak exercise ST segment, 1= upsloping; 2= flat; 3= downsloping
-
ca- number of major vessels (0-3) colored by fluoroscopy
-
thal- 3 = normal; 6 = fixed defect; 7 = reversable defect (thalium test)
-
num (outcome)- diagnosis of heart disease (angiographic disease status), Value 0: < 50% diameter narrowing; Value 1: > 50% diameter narrowing (in any major vessel: attributes 59 through 68 are vessels)