Analyze the Impact of Healthy Behavior on Weight Change with a Mathematical Model using the Harris-Benedict Equations


 Background: Lifestyle diseases are the leading cause of death worldwide. The gradual increase of negative behavior in humans because of physical inactivity, unhealthy habit, and improper nutrition expedites the growth of lifestyle diseases. Proper lifestyle management in the obesity context may help to reach personal weight goal or maintain a normal weight range with optimization of health behaviors (physical activity, diet, and habits).
Objective: In this study, we develop a mathematical model to analyze the impact of regular physical activity, a proper diet, and healthy habits on weight change, targeting obesity as a study case. Followed by, we design an algorithm to verify our proposed model with simulated data and compare it with related proven models based on the defined constrains.
Methods: We proposed a weight-change mathematical model as a function of activity, habit, and nutrition with the first law of thermodynamics, basal metabolic rate ( BMR ), total daily energy expenditure ( TDEE ), and body-mass-index ( BMI ) to establish a relationship between health behavior and weight change. Followed by, we verify the model with simulated data and compared it with related established models. In this study, we have used revised Harris-Benedict equations (HB) for BMR and TDEE calculation.
Results: The proposed mathematical model showed a strong relationship between health behavior and weight change. We verified the mathematical model with a proposed algorithm using simulated data with defined constraints. The adoption of BMR and TDEE calculation following revised Harris-Benedict equations has beaten the classical Wishnofsky’s rule (3500 cal. ≈ 1 lb.) , and the models proposed by Toumasis et al., Azzeh et. Al., and Mickens et. al. with a standard deviation of ±1.829, ±2.006, ±1.85, and ±1.80, respectively.
Conclusions: This study helped us to understand the impact of healthy behavior on weight change with mathematical implications and the importance of a healthy lifestyle. As a future research scope, we wish to use this model in a health eCoach system to generate personalized lifestyle recommendations to optimize health behaviors to accomplish personal weight goals.


Introduction Overview
Globalization, rapid urbanization, and sedentary lifestyle have promoted negative health behaviors globally, affecting individuals from different financial backgrounds [1][2][3][4]. The major risk factors behind a sedentary lifestyle are -inadequate dietary intake, unhealthy habits, and physical inactivity [1,2,5,6]. The curse of a sedentary lifestyle can be -obesity, increased glycemic response, high blood pressure (BP), increased blood cholesterol, and depression [1,2,5]. Obesity is accountable for other lifestyle diseases, such as cardiovascular disease (CVDs), chronic obstructive pulmonary disease (COPD), cancer, type II diabetes, and hypertension [1,2,5,6]. Lifestyle diseases are the most leading cause of death in the world [1][2][3][4]. The primary likelihood of mortality is between ages 30 and 70 years, and by 2030, eight of the ten leading causes of death will be related to their risk status rather than gender [7]. The development of healthy behaviors may prevent the increased likelihood of lifestyle diseases and premature death worldwide [1,[7][8][9][10][11][12]. From 1980 to 2008, The incidence of obesity has almost doubled. In 2008, 1.5 billion adults had a body mass index (BMI) above 25, and about 500 million of them were considered obese [13]. In 2016, 1.9 billion+ adults over 18 and 340 million+ children and adolescents aged 5-19 were overweight. Obesity was responsible for 8% (4.7 million) of global death worldwide in 2017 [14]. Most of the world's population lives in countries where overweight and obesity cause more deaths than underweight [13][14][15][16]. Obesity does not grow overnight. It develops over time because of poor diet, lifestyle factors, physical inactivity, genetics, family history, race, ethnicity, sex, family habits, culture, social environment, and medical background [17][18][19]. Therefore, a healthy lifestyle is essential to keep up, accomplish, or regain good health and prevent sickness. Healthy behavior includes -regular physical exercise (to stay active, adequate sleep), a nutritious diet (adhere to core foods such as fruits, vegetables, and whole grains), and healthy habits (no consumption of alcohol and tobacco, and positive attitude) [1,[7][8][9][10][11][12]. Obesity and overweight are major lifestyle diseases, occur because of body-energy imbalance [11,12,20].
The excess amount of energy gets stored as a mass in the body and is termed as "weight gain" [11,12,20]. Scientific proofs emphasize that a proper dietary habit is essential to a healthy, sustainable, and quality lifestyle. A healthy nutritional pattern helps individuals to keep up adequate body weight [21,24]. Moreover, regular physical activities and keeping up a healthy habit expedite weight change in a positive direction [21,34]. Hall et al. [35,36] stated that getting thinner slows down an individual's metabolism. If individuals need to shed ten pounds of weight at the end of the year, they need to cut a hundred calories per day either by consuming fewer calories or more workout [35,36].

Background
Early weight loss (i.e., the first few weeks) tends to have a lower energy content than weight losses on subsequent weeks [37]. Forbes [38] first expressed the statistical model of the weight loss cycle, which revealed that the composition of long-term weight loss differs between thin and obese women. The result raised doubts on the research of Grande [39], performed in a group of average weight men. In addition, several previous weight loss studies conducted on obese women responded differently to male interventions [37][38][39], suggested that men lose more lean mass and less fat than women during periods of energy imbalance. First, Forbes and later Hall [40,41] proposed the correlation between the proportion of weight loss with fat-free mass (FFM) and baseline fat mass (BFM). Forbes [40] used crosssectional body composition data to explain the non-linear observational relationship between FFM and FM and concluded that the longitudinal change of body composition might be defined by the displacement along the cross-sectional curve theoretically. According to the study of Heymsfield et al. [42] on the Keel research data set, the weight change is not "constant" following Wishnofsky's law [22,23] but is essentially "dynamic". Hall et al. [43,44] proposed simple dynamic model estimates (for example, when the weight reaches a new steady-state, a change in energy intake of 10 kcal/day will result in a weight change of 1 pound). In addition, Heymsfield et al. [42] showed that, at least for those with similar BMI, the energy content of weight loss varies significantly between men and women.
Obesity is considered as a metabolic syndrome (MetS) [45]. Fat-mass index (FMI) and body mass index (BMI) are metrics used to diagnose obesity [46]. Samadi et al. [47] reported that FMI is more accurate in terms of sensitivity and specificity than BMI. The BMI is the most used method for assessing overweight and obesity. However, BMI does not always represent real body fat. It can be calculated by calculating body fat or BF (based on age, weight, height, neck, and waist circumference) and fat-free mass (based on height, weight, and BF%). Despite BMI or BF%, higher FMI levels tend to correlate with the existence of MetS. Fat-mass (FM) and FMI are closely related to body composition [45]. Bioelectrical Impedance Analysis (BIA) [45] is the most superficial, most repeatable, and lowest cost tool for determining BF% in clinical practice. It has high precision and is excellent in comparison with the dual-energy Xray absorption method (DXA). BF% accuracy is affected by height and cannot be measured separately from the fat-free mass (FFM). The fat-free-mass index (FFMI) [45] is an alternative to the BMI, which considers a person's muscle mass. FFMI measures the total amount of lean muscle mass in the body. It may also be able to predict how much muscle the body will gain, according to studies. It is a good indicator for people trying to lose weight, particularly those who are doing strength training to build muscle and lose fat. FFMI is particularly helpful to severe bodybuilders [45]. In contrast to women, men have less body fat, more muscle mass, and higher bone density, according to the National Health Service (NHS) [48]. FFM is calculated as a function of height, weight, and BF%. If we have more muscle than the average person, it is difficult to tell the difference between fat and muscle. According to a 2003 study published in Nutrition [48,49], BMI alone cannot provide information about fat-free mass or fat mass to body weight. Kim et al. [4] claimed waist-to-height ratio as a better tool than BMI and waist circumference to screen obesity and overweight, which requires more validation.
Weight-maintenance calorie or total daily energy expenditure (TDEE) is the total necessary calorie consumption per day when individuals are moderately active [64]. TDEE depends on basal metabolic rate (BMR). BMR can be measured based on the FFM value (lean mass and bone mineral content) using the Cunningham [82] or Harris Benedict's equations [64].

Motivation
We have considered human behavior as a function of activity, diet, and habit in our proposed mathematical model. We have applied modified Harris-Benedict's equations [64] with physical activity level or PAL ("α") for the TDEE calculation [50]. The "α" value can be assessed with wearable activity devices (e.g., Fitbit, MOX2), daily. For general population, BMI calculation is very straightforward based on height and weight only. Therefore, we have used the BMI metric for obesity categorization as a substitute of FFMI. Genetics, FM, FFM, waisthip ratio and waist measurement are beyond the scope of this study. We focused only on obesity assessment in the general healthy adults rather than special categories, such as children, the elderly, bodybuilders, disabled, and people consuming steroids. We will focus TDEE calculation on a more granular level based on weight change dynamics, metabolic adaptation, LBM, FM, and FFM in our future studies.
The aim of this study can be divided into the following two sections -(a.) to develop a mathematical model to establish a relationship between health behavior (activity, diet, and habits) and weight change; and (b.) model verification with simulated datasets based on a proposed and implemented algorithm.

Existing Weight-Change Mathematical Models
Different research groups proposed different methods to model human weight change over time. In this study, we included core weight-change mathematical models related to energy expenditure, and excluded models which are primarily focused on nutrition assessment (i.e., macronutrient flux balance, nutrient level), genetics, and complex biochemical processes (e.g., lipolysis, ketone oxidation, proteolysis, glycerol 3-Phosphate production, glycerol gluconeogenesis, gluconeogenesis from amino acids, macronutrient oxidation, lipogenesis, carbohydrate and protein perturbation, and respiratory gas exchange). Wishnofsky rule's [22,23] fundamental analysis states that reduced energy consumption decreases the enforced energy deficit and delays weight loss when people lose weight. On the first day of diet, reducing consumption by 500 kcal results in an energy deficit of 500 kcal, but the extent of this deficit and the weight loss decreases dramatically with time. However, the biochemical processes in the body are much more complex [22,23]. The self-limiting principles of steady weight loss are as follows -the loss of energetically active tissue, metabolic adaptations, and a lower cost of weight-related energy expenditure [22,23]. According to the second evaluation of Wishnofsky's law [22,23], the composition of voluntary diet-induced weight loss is based on the subject's initial body composition. Obese people lose mostly energy-dense fat because they have a negative energy balance, while lean people lose a lot of fat-free mass with a low energy content (FFM). Obese subjects must decrease their energy consumption more than lean subjects to lose one pound while having a "healthier" composition of weight loss. This "early" weight reduction effect, which is frequently dismissed as unimportant, will typically bring down the energy content of weight loss well below Wishnofsky's law [22,23]. Forbes, in 1970, first conceptualized a mathematical model related to weight change. He used cross-sectional body composition data to explain an observational, non-linear relationship between FFM and FM, speculating that longitudinal changes in body composition were defined by displacement along the cross-sectional curve [40]. According to Forbes [40], shift along the cross-sectional curve defines longitudinal changes in body composition. The following equation was derived for infinitesimal body weight (BW) shifts (dBW). Therefore, Forbes' theory predicted that FFM's contribution to an infinitesimal weight shift was exclusively dependent on the FM. Hall extended Forbes's theory [40] to explain macroscopic weight changes. In addition to the initial FM, the new equation predicts that the composition of weight change is determined by both the direction and magnitude of the weight change. Experimental data from underfeeding and overfeeding humans were compared to explain the connection between Forbes' theory and the P-ratio, an alternative representation of body composition change that assumes the existence of an energy partitioning parameter. The P-ratio is a measure of how much of an energy imbalance can be explained by changes in the body's protein reserves. Initially, the Pratio was thought to be a constant for everyone. According to the new version of Forbes' theory, the P-ratio is affected by the initial body composition as well as the direction and magnitude of weight loss [40].
) where α = 9.05 represents the ratio of the energy densities of FM to FFM.
Kien et al. [50] performed a study on 26 healthy, nonobese young adults for 28-days and came up with an improved prediction of TDEE in terms of resting energy expenditure (REE). To maintain a constant body weight, energy intake was adjusted. FFM and FM were measured using dual-energy X-ray absorptiometry before and after the study period, and TDEE was calculated using the change (after and before) in body energy (BE) and observed energy intake (EI): TDEE = EI -ΔBE. A TDEE estimate based on the Harris-Benedict equation (TDEE = 1.6 * REE) was examined. The measurements suggest the following estimation of TDEE - Toumasis et al. [21] developed a mathematical diet model in 2004 to describe the relationship between weight change and calorie expense. They considered consumed energy as "C" and expensed energy as "40B" (where, 40 is the mean of 35 and 45 that signifies average calories/kg./day depending on factors, such as age, sex, metabolic rate). Their proposed mathematical relationship can be written as follows - , where B = current body weight, and A = energy constant Their resultant model for weight change with calorie can be written as below: In Toumasis's model, neither dietary nor habit components were considered, and the daily rate of energy expenditure (a = 40 Cal/kg/day) was obtained from primitive techniques. Azzeh et al. [54] improved the model proposed by Toumasis et al., in 2011, with an additional component, such as exercise. They conducted a study on twenty students who walked on a treadmill for thirty min., at a fixed speed of 3.2 km./hr., in a varying temperature range between 20 0 to 25 0 celsius (C). The trial's principal objective was to establish a connection among weight and the measure of energy consumed per individual because of activity. They upgraded the model as follows: where B = current body weight, A = energy constant, and b = a+7.876.
They observed the ratio of energy burned due to the treadmill activity to body weight, on average, is 7.876 (KJ/kg)/day. They observed better weight-loss than the previous model with exercise component. Their resultant model for weight change can be written as: Azzeh's proposed model was not entirely accurate due to the selection of a small sample size. No habit components were considered in the model, and the daily rate of energy expenditure (a = 40 Cal/kg/day) was obtained from primitive techniques. They further proposed to improve the model with ambient temperature as formulated below, where the factor "b" depends on heat and mass transfer, and ambient temperature has an impact on body thermoregulation, and metabolic rate: where F(T) function depends on ambient temperature.
Mickens et al. [55] proposed a mathematical model on the dieting process, which is nonlinear, and based on first-order differential calculus. They determined all the features of the model with linear stability analysis and phase-space techniques. Their developed model can be formulated as below: where F(t) = intake function, E(t) = measures of physical activity, F(t)-E(t) = λ > 0, and M(W) = metabolism function ~ W α and α ≈ 0.7 where 0< α <1, and β > 0.
Neither activity nor habit components were considered in the Mickens's model. Horgan et al. [56] used a stochastic process to model weight changes and explained its behavior as an autoregressive process. According to their model, if intake and activity maintain a constant mean, bodyweight will stay within a few percent of a fixed point. It is easier to see that activity levels will maintain natural stability because they have a lower bound, no matter how sedentary one becomes. Aldila et al. [57] proposed a state change mathematical model for obesity on a closed population to demonstrate that the intervention program with sound life mission and restoration has an altogether diminished number of obese individuals. They considered factors such as natural recruitment rate (/day), natural mortality rate (/day), interaction coefficient (/day), infection rate because of bad life habit (/day), natural recovery rate from overweight to healthy comp (/day), total individuals, health recruitment rate, life campaign rate, and treatment rate for the obese population. Their proposed model requires the inclusion of social interaction rate, demographic classification, and personalization. The proposed model suffers from model validation with social interaction, activity, and age. J´odar et al. [58] presented a 3-5-year-old childhood obesity model to contemplate obesity in the Spanish area of Valencia. They considered the following factors in their non-linear system of first-order differential equations -transmission rate due to social pressure for BFS (bakery, fried meals, and sweet beverages) consumption, BFS consumption, time, interaction, and diet. The mathematical model derived the increasing trend of child obesity in Valencia due to the frequent consumption of BFS. Their considered parameters in the model are constant over long period of time and suffers from model validation with physical activity. A similar study was performed at Valencia on 24-65 years old residents by Santonja et al. [59]. They proposed a mathematical model to foresee the frequency of abundance weight in the population in the forthcoming years. They found that a sedentary lifestyle and nutritional habits are behind the reason of weight increase in the society. Their proposed mathematical model considered factors such as lifestyle, time, weight transition, diet, and social interaction. However, their considered factors were constant over long period of time. Thomas et al. [60] proposed a mathematical model for non-diabetic patient, with first-order differential calculus related to weight change with following key factors -resting metabolic rate (RMR), nonexercise activity thermogenesis, and dietary induced thermogenesis. Their model can be represented based on the first-order law of thermodynamics. However, the model suffers from accurate measurement of energy expenditures based on the considered parameters: = − , where, R = rate of energy stored or lost, I = rate of ingested energy, and E = rate of expended energy. Therefore, There are no mathematical models that are fully accurate. Based on the assumed restrictions, each of them has their merits and demerits as specified. However, the knowledge obtained after studying different weight-change models helps us to formulate our projected mathematical model to analyze the correlation between healthy behavior (activity, diet, and habit) and weight change. This study enhances mathematical model proposed by  Table 1) with simulated data for performance evaluation.

Methods
This section is distributed among the following three subsections -(a.) relevant formulas for this study, (b.) mathematical model development, and (c.) algorithm for model evaluation.

Relevant Formulas
In 1918 and 1919, the original Harris-Benedict equations were written [64].  [66,67]. Calorie estimation considering lean body mass (LBM) gives the most exact result of energy use; however, even without LBM, we can get a sensibly close estimate. Lean body mass (LBM), pregnancy, bodybuilding, heredity, and child obesity are beyond this paper's scope for BMR calculation. Therefore, in our proposed weight-change mathematical model, we reused Harris-Benedict's linear equation for BMR representation, as follows: TDEE (Extra active) = BMR * 1.9 (hard exercise 2 or more times per day, or training for marathon, or triathlon.) [α=1.9] (eq. 8) Therefore, TDEE can be represented as: TDEE = BMR * C5, where C5 is the activity multiplier constant and its value > 0. (eq. 9) Body-mass-index (BMI) is another critical health factor responsible for assessing individuals' nutritional status and classification of individuals in the following categories -underweight, normal weight, overweight, and obese, in a very simple approach, based on their weight and height [70]: BMI = (weight / height 2 ) * 703, where, weight is in pounds (lb.), and height is in inches (inch.). (eq. 10) [SI unit: Kg/m 2 ] BMI does not change with age or gender. It is certainly not a direct estimation and is just utilized as a screening tool and subsequently, not considered an in-depth analytic test. There are additionally a few constraints to this estimation. Since BMI uses just tallness and weight, it does not represent individuals who might be a lower in average physique yet better than expected bulky person, such as bodybuilders. Such constraints are beyond this paper's scope. In this study, for measuring individual's weight category, we have focused on BMI value. The BMI constraints are age, gender, height, weight, activity, metabolism, temperature, ethnicity, muscle mass, and body fat.

Measurement of ideal body weight (IBW) is important for individual weight management.
To verify our proposed model and ideal weight convergence, we followed Miller's equation [

Development of the Proposed Mathematical Model
Proper dieting is a habit of eating and drinking in a controlled approach to lose or, sometimes, increase weight, or in some cases, to normalize the amounts of certain nutrients. Reducing weight with cutting down daily consumption is a slow process, but it can be accelerated in combination with regular physical activities. The same is proved in our proposed model. In overall calculation, we considered temperature as a constant. The model is applicable for checking variation in limited period weight change with the adoption of healthy habits for fixed age and height. We wish to use this model in a health eCoach system to generate personalized lifestyle recommendations to optimize health behaviors to accomplish personal weight goals. The influence of body weight variability [79,80] will be added to this model in the future after a detailed study on a group of trials.

Model Evaluation with Simulated Data and Proposed Algorithm
The proposed model has been evaluated in the following three directionsa. visualization of tentative weight convergence for a limited number of days (e.g., 30-90 days in this context), b. comparing the performance of the proposed model with related models as described in Table 1, under defined settings, and c. calculation of number of days to reach personal ideal weight goal. In this study, we simulated data for six dummy participants as detailed in Table  2, where participants are created for three weight groups -overweight, underweight, and normal weight. Their target weight has been determined by ideal body weight as calculated with (eq. 11) and (eq. 12). In the subsequent section, we describe how the adoption of healthy behavior influenced weight convergence or maintaining a normal weight range.

Step 4.2: Append W(t) in a list, and update BMI value.
Step 5: Measure body composition based on final BMI value and compare with initial value.
Step 6: Plot the list as weight change (Y-axis) over number of days (X-axis) to visualize the trend of weight change of individual participants. The convergence of the graph should follow (eq. 21).

Note:
 The worst-case time complexity of the proposed algorithm is O(N 2 ), where N = problem size > 0. The proposed algorithm is implemented in Python 3.8.5 with Spyder4 editor in Anaconda distribution.  Behavior change is a slow and complex process. Daily activity, drinking habit, and calorie intake from dietary habit cannot be fixed. Therefore, we must consider some randomness in their value selection in terms of calorie for real-life situation. Therefore, this algorithm can be improved further with real-time, automatic, personalized lifestyle recommendations (with a health eCoach system). The weight-convergence will change over days with a modification in the assumed values of activity level, calorie input through diet, and habit in the algorithm as designed above.  If individuals need to lose weight, then they need to reduce their calories a day by reducing calorie intake or increasing exercise [35,36]. The defined rules and values in the algorithm are adjustable based on personalized goals. We assumed a changing value of {-(Y1+Y2)} in the range between 100-600 kcal in weight-loss simulation testing. We adopted a dynamic value of (Y1+Y2) between 600-1000 kcal in weight-gain simulation testing to augment daily calory consumption. However, it must be related to other personalized parameters, such as context, activity level, and physical condition. We will add this dynamic feature to our proposed model in the future during a detailed study on a group of controlled trials.  The novelty of using the proposed model and the algorithm in a health eCoach recommender system for optimizing health behaviors is conceptualized in Figure 2.  The codebase for data configuration, algorithm development, and data visualization can be downloaded from the GitHub (Digital Appendix 1) for code reproducibility.  Used libraries in the simulated python environment are described in Table 3.  The configuration of the system and used software in this study are described in Table 4 and Table 5, respectively.

Results
We implemented the algorithm over simulated participants ("P-1" to "P-6") for a fixed duration of 30 days, 60 days, and 90 days, consecutively as described in Table 6.  Figure 4. We obtained better weight-loss convergence than other models under provided settings, and it proves that healthy behavior (proper physical activity, appropriate dietary intake, and healthy habit) has a significant impact on weight-change. Therefore, adoption of healthy behavior can help weight-loss in obese/overweight.   Table 7 demonstrates how long it might take to reach the targeted ideal body weight for individual participants "P-1" to "P-4" (we exclude "P-5" and "P-6" as they are already at normal weight range) with our proposed model. The rules for health behavior change in the algorithm can be made dynamic for personalized recommendation generation to promote a healthy lifestyle.

Discussion
In this model, we have shown how weight loss/gain can be described as a function of activity, diet, and habit. FFM-based TDEE calculation does not include activity level and needs expertise for data capturing. Thus, we followed activity based TDEE calculation following the revised HB equations which is based on simple parameters with less measurement overhead. According to this algorithm, the recommendation generation is rule driven. However, it is the scope of future research to convert it into hybrid (rule driven and data driven). This model has certain limitations. Quantifying weight-change over time is a complex task because of multiple influencing factors, as stated in the introductory section. If the FFM knowledge is unavailable, then the HB, revised HB, or WHO equations are possible alternatives, but their accuracy on an individual level can be minimal [76].

Conclusion
The proposed non-linear mathematical model with first-order differential equations has been formulated based on the well-established scientific equations related to accurate bodyenergy balance measurement. In the model verification with simulated data, we considered specific modifiable rules for decreasing, increasing, and keeping a constant individualized weight as a function of activity level, habit, and diet over time. The developed mathematical model is mathematically appropriate, realistic and can predict individual weight change's tentative duration to reach a pre-set weight goal. The human body tends to get adjusted with the new weight, and it might take some time, but the same time-lag has not been considered in this model. For future work, the limitations of the model assumptions should be examined. The proposed mathematical model showed a strong relationship between health behavior and weight change. This study helped us to understand the impact of healthy behavior on obesity and overweight with numerical implications and the importance of adopting a healthy lifestyle and refraining from negative behavior change. The proposed model has been compared to other related models to evaluate mutual performance under defined settings. A comparison is required based on natural personal health and wellness data from actual participants to verify the model's efficacy and reliability. This model aims to illustrate how changing health behavior will help to meet personalized weight-change goals. A model verification algorithm has been suggested to develop it in the future for use in an eCoach recommender system for healthy lifestyle promotion. The accuracy of the proposed model can be further checked with metrics, such as LBM, FFM, FM, and FFMI. In the future, we will extend the model with Markov-Decision-Process (MDP) [77] for reward-based performance evaluation to optimize health behaviors in a health eCoach recommender system.

Declarations Ethics Approval and Consent to Participate
Not applicable.