The program takes 3 inputs and calculates the BAC for a standard male using the Windmark BAC algorithm.
Liam Moorfield-Yee
Student
The program takes 3 inputs and calculates the BAC for a standard male using the Windmark BAC algorithm.
The variables are as follows:
The windmark algorithm calculates BAC by dividing total alcohol content consumed (g) by weight(g)*rm, where rm is the gender constant for males and is equal to .68. The ratio is then multiplied by 100, which returns BAC as a percentage, and adjusted for time elapsed.
The resulting algorithm is:
bac <- function(Drinks, weight, time){ (((as.numeric(Drinks)*14)/(as.numeric(weight)* 453.592 * 0.68))*100 - (as.numeric(time)*0.015))}
The BAC for a 100 pound man who has had 2 drinks in the past hour is:
(((2)*14)/(100* 453.592 * 0.68))*100 - (1*0.015)
## [1] 0.07577865
This is a very simple algorithm that will can be used to help people better understand how drinking affects their bodies.