Thursday, October 30, 2014

Modeling & Predicting Coronary Heart Disease with Logistic Regression

Coronary (ischemic) heart disease results from plaque built up in arteries that supply blood and oxygen to the heart.  The narrowing of these arteries can culminate into a heart attack, and is one of the leading causes of death in men and women.  As a motivator to stay healthy, I believe people could benefit from a quantifiable way of measuring their relative risk of heart disease.  This is similar to the Framingham risk score, but was modeled from different datasets.  First, I set out to explore the data to gain insight into the important features to be used in the model.  Then I used cross-validation of different supervised machine-learning algorithms to build an optimized model.



Heart Disease Between Genders: Age and Cholesterol

Using IHIS data from 2000-­2013, men aged 40+ were found to be at a significantly (t­-test, p<0.05) increased risk for heart disease compared to women of the same age (see Figures 1 and 2).

Figure 1


Assuming cholesterol level has a positive relation to risk of heart disease, the increased risk of older men compared to older women does not appear to be the result of increased cholesterol levels in older men (see Figures 3 and 4). Women instead appear to have a statistically higher (p<0.05) cholesterol level between 40-­42 years of age as well as above 58 years of age compared to their male counterparts. Unless cholesterol has a negative relation with heart disease, it appears that the risk from being an older man is largely independent of cholesterol.

Figure 3



Heart disease risk model

Using the previous insight of the significant combined effect of age and gender to model the UCI datasets, I built a logistic regression model that predicted an individual’s risk for heart disease (P(heartDisease)) using three highly significant (p<0.001) features:

1. age*gender
2. cholesterol level [cholesterol]
3. maximum heart rate achieved during exercise [max exercise HR]


Of the models tested, the logistic model (see above) had the highest prediction accuracy (74%) with a precision and recall of 70% and 68%, respectively. More generally, this model predicts that being an older male, having high cholesterol, and achieving a low maximum heart rate during exercise increases the likelihood of heart disease.  As quantitative examples of this heart disease risk modeling, if a 42 year old man who achieves 142 max beats per minute (bpm) during exercise reduces his cholesterol level from 250 mg/dL to 240 mg/dL (keeping all other features constant), he will have reduced his risk for heart disease by 1.3%. Compared to a man, a woman with these exact same stats will have a 22.4% reduced risk of heart disease. And finally, if this woman increases her max heart rate during exercise from 142 bpm to 152 bpm (keeping all other features constant), she will have reduced her risk for heart disease by 3.6%.  The following web application illustrates and quantifies this model (screenshot below).


Heart Disease and Menopause

I used 1994 and 1998 IHIS data to determine the relationship of a woman’s risk for heart disease with her menopausal status. As shown in Figure 5 and 6, I determined that 40­-42 year old women with menopausal symptoms have a significantly (t­-test, p<0.05) higher likelihood of heart disease compared to 40-­42 year old women who have never experienced menopausal symptoms. Thus it appears that a younger woman’s likelihood of heart disease may be increased if she has menopause. Future work can predict a woman’s likelihood of having menopause (if status is unknown) from other key information such as smoking, diabetes status, age, and other factors. This can then be incorporated in the heart disease model to determine whether it can more accurately predict a woman’s risk of heart disease.


Summary

Heart disease between genders: age and cholesterol
Men aged 40 and up are at an increased risk for heart disease compared to women of the same age. This statistically significant effect does not appear to be the result of increased cholesterol levels.

Heart disease risk model: effects of gender, age, cholesterol, and max heart rate during exercise
I built a model that predicted an individual’s risk for heart disease based on his/her gender and age, cholesterol level, and maximum heart rate attained during exercise. Specifically the model predicted that being older, male, having high cholesterol, and reaching a low maximum heart rate during exercise increased the likelihood of heart disease.

Heart Disease and Menopause
40­-42 year old women with menopausal symptoms have a significantly higher likelihood of heart disease compared to 40­-42 year old women who have never experienced menopausal symptoms. Future work can predict a woman’s likelihood of having menopause (if not available) from other key information to see if it can better predict a woman’s risk of heart disease.

Data sources

IHIS
UCI Heart Disease Data 1, Data 2

Tuesday, September 30, 2014

How the Affect Heuristic Can Influence Consumer Behavior Toward Packaged Products


When perusing products in an aisle of a store, we quickly form positive or negative impressions of the value of some products even without all the necessary information (e.g. price, number of items in the package, etc.). This is because our brains have evolved mental approximations such as the affect heuristic (Slovic, Finucane, Peters, & MacGregor, 2007), allowing us to evaluate environmental stimuli rapidly. More specifically, the affect heuristic is an immediate evaluation of the positive or negative valence of stimuli on attributes that are easier to determine. However, this also means that attributes that are more difficult to discern are ignored during this evaluation process. Because the affect heuristic happens so automatically and can save us time on shopping trips, it can have a large unconscious impact on what we choose to purchase.

Studies with people and monkeys show that quality is an attribute that is easier to discern than quantity. In people (Hsee, 1998), participants in a study rated a 24-piece dinnerware set to be of higher value as compared with the same 24-piece set with an additional sixteen pieces of which nine were broken (thus, seven additional pieces intact). Although the latter option quantitatively offered more intact pieces, its evaluation was reduced by the additional items in poor qualitative condition. On the other hand, when the same items were juxtaposed as a choice so that they could be directly compared, the same participants now chose the 40-piece dinnerware set that included broken pieces over the 24-piece set that they originally rated as higher in value.

Initially, participants preferred Set L over Set H.  When juxtaposed as a choice, the participants now chose Set H over Set L


In a similar vein, rhesus monkeys (Kralik, Xu, Knight, Khan, & Levine, 2012) preferred a highly-valued food item alone compared to the same highly-valued food item paired with an additional food item of positive but lower value. Thus, the monkeys were evaluating the choice options based on overall quality while neglecting overall quantity. Given repeated trials, however, the monkeys were no longer biased toward the highly-valued food item in isolation. Therefore, the monkeys’ choices were influenced by experience with the choice options, such that experience allowed the monkeys to consider more attributes, i.e. the quantity and overall value of the obtained food items instead of the average quality of the items alone. These results suggest that the affect heuristic, which may have been conserved through evolution, favored quality over quantity but can yet be overridden during joint evaluations and experience.

How could this affect heuristic affect consumer behavior? Because it appears that we are drawn to quality over quantity in our evaluations and choices, shoppers may unconsciously pay a premium for single or packaged products with a larger proportion of their most desired items over more mixed packages with a larger number of items that may actually offer a better overall deal. To prevent this, shoppers can try placing packaged products side by side to avoid the biasing effects of affect heuristic memories.  This will help consumers more objectively take into account important features such as quantity in shopping decisions.



a 6-pack of cheetos

A 50 pack of assorted chips, with 10 packs of cheetos.

According to the affect heuristic, a cheetos lover will most likely value this significantly less than the 6-pack of cheetos without other flavors (per pack) even if the other flavors are not aversive.