Jeremy
Mon Sep 21 22:30:39 2015
The BMI is an attempt to quantify the amount of tissue mass (muscle, fat, and bone) in an individual, and then categorize that person as underweight, normal weight, overweight, or obese based on that value.
The BFP not only depends on the weight and height(BMI), but also on other variables like age. Here we use the data set 'fat' to plot the average BFP for 252 males as function of their ages.
The formular used in our app is linear fitted from this data set.
lmfit <- lm(data = fat, body.fat ~ BMI + age)
summary(lmfit)$sigma
[1] 5.093259
As we can see the residual standard error is about 5% which is not bad for just include two most common variables. In our acutual app, we need to first calculate BMI from the weight and height provided by the user. One thing to notice is that since our data only includes male subjects, the results are more accurate for male than female.