Posts

Showing posts with the label identified

3.3.5 The Framingham Heart Study - Video 3 A Logistical Regression Model

Now that we have identified a set of risk factors, let's use this data to predict the 10 year risk of CHD. First, we'll randomly split our patients into a training set and a testing set. Then, we'll use logistic regression to predict whether or not a patient experienced CHD within 10 years of the first examination. Keep in mind that all of the risk factors were collected at the first examination of the patients. After building our model, we'll evaluate the predictive power of the model on the test set. Let's go to R and create our logistic regression model. In our R console, we'll call our data set framingham and use the read.csv function to read in the data file "framingham.csv". Remember to navigate to the directory containing the file "framingham.csv" before reading in the data. Let's take a look at our data by using the str function. We have data for 4,240 patients and 16 variables. We have the demographic risk factors m...