Correlation, Linear Regression and Chi-Square Test
Linear Regression Model Summary
Chi-Square Test of Independence
Following relationship are between outcome(Disease, No Disease) with other categorical variables
||1= male, 0= female
||age in years
||chest pain type
||resting blood pressure (mmHg)
||fasting blood sugar > 120 mg/dl
||serum cholesterol in mg/dl
||resting electrocardiographic results
||maximum heart rate
||exercise induced angina
||ST depression induced by exercise relative to rest
||slope of peak exercise ST
||no. of major vessels colored
||thallium stress test
||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
Shiny Server |
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.
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)
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)