Moved by Metrics Uncategorized Start Tracking and Follow the Trends to Better Health What a Health Tracking App Can Teach About Trend Analysis

Start Tracking and Follow the Trends to Better Health What a Health Tracking App Can Teach About Trend Analysis

Moved by Metrics will take a look at the iBP Blood Pressure app to demonstrate a real-world version of patient self-monitoring: seeing the data points, how to interpret them and gaining insights that, for our user, can help that person make better choices for a healthy lifestyle.  In demonstrating this example of the “Quantified Self”, we’ll learn more about the statistics behind the charts, diagrams and graphs that the user sees. Owning one’s health is the mantra of “personalized medicine,” and Moved by Metrics is helping to spread the word. Part of personalized medicine is to encourage individuals to be proactive in self-monitoring. Creating a personal regimen of exercise habits and health data monitoring has become simpler and increasingly popular as a tool in improving health. Physical activity has been shown to reduce the risk of many types of illness such as heart disease, type 2 diabetes, and even some types of cancer.  Now self-tracking has become easier than ever with the aid of mobile smartphone apps and sensor-based telehealth software. Health apps have also become increasingly sophisticated in not only measuring and collecting data such as daily activity, steps taken, weight, blood pressure or heart rate, but also analyzing and visualizing information on an ongoing basis for the user. Being able to visualize the information helps users to understand progress over time or, in the case of tracking a chronic condition, becoming more aware of how everyday activities and actions impact it. Tracking Blood Pressure as a Key Indicator of Health In many cases, consistent tracking can help patients control their disease by seeing how their behavior impacts their numbers. For persons with hypertension, a condition that can lead to coronary heart disease, heart failure, stoke, kidney failure and other health problems, using a health tracking app for blood pressure, rather than self-monitoring via a written diary, is more convenient. Moved by Metrics will take a look at the iBP Blood Pressure app to demonstrate a real-world version of patient self-monitoring: seeing the data points, how to interpret them and gaining insights that, for our user, can help that person make better choices for a healthy lifestyle.  In demonstrating this example of the “Quantified Self”, we’ll learn more about the statistics behind the charts, diagrams and graphs that the user sees. iBP Blood Pressure, a leading mobile health app from Leading Edge Apps, is a blood pressure tracking app specifically designed for hypertensive patients (www.leadingedgeapps.com ). The main goal of this telehealth app is to assist the user in monitoring blood pressure readings over time, visualizing them, and if desired, sharing the data with a healthcare provider.  A separate device (iBP recommends Withings) takes the readings, sends data into either an iPhone or Android smartphone, and into the iBP app viewable either on the smartphone or online. Analyzing the iBP Blood Pressure Data The iBP Blood Pressure app has data displays that are easily read with interactive graphs showing lows, highs, averages and trend lines using statistical analysis.  Figure 1 shows a screenshot of a mobile phone iBP user chart, showing systolic and diastolic pressure data as well as blood glucose (gold) and calculated pulse readings (green) (www.imedicalapps.com ).  This is what the user sees. The systolic blood pressure is when the heart muscle contracts; systolic readings are shown in blue on the graph. The diastolic pressure is the blood pressure when the heart is relaxed; diastolic readings are shown in purple. The line graphs show eight days of sample data with mock dates of October 14 through October 21, 2011.   For the purpose of this article, we will use these numbers to simulate patient data.  How does the user or physician, best understand this data and more deeply understand the trends they depict? Let’s first review a standard blood pressure reference chart (Figure 2). This shows the normal and borderline ranges.  The iBP Blood Pressure app differentiates optimal points in yellow and sub-optimal in green.  Above borderline alerts are in red showing two systolic blood pressure (SBP) data points over 140 mm Hg and one diastolic blood pressure (DBP) point over 90 mm Hg levels respectively. These normal versus abnormal delineation lines are in pink.  The blue and purple lines on the plots are the trend lines.  On visual observation, the blue SBP trend line shows a notable decrease in the systolic pressure whereas the purple DBP trend line slightly Figure 1. Data Display on iBP Pressure App

[av_image src=’https://www.movedbymetrics.com/wp-content/uploads/2013/07/graph2.jpg’ attachment=’2329′ align=’center’ animation=’no-animation’ link=” target=’no’ av_uid=’av-jz7i0′]

Figure 2.  Blood Pressure Reference Chart

[av_image src=’https://www.movedbymetrics.com/wp-content/uploads/2013/07/f2.png’ attachment=’2330′ align=’center’ animation=’no-animation’ link=” target=’no’ av_uid=’av-dczvs’]

Calculating the Real Trend Line One might think the line was a visual guesstimate just from “eyeballing” the data and then drawing a straight line through the scatter of points and computing the slope.  However, an empirical trend line lacks precision and prediction. A trend line is the “best fit” straight line and usually shows whether something is increasing or decreasing at a steady rate. For our discussion, we will focus on the SBP trend line.  The eight day period of SBP readings shows an overall decline. One may want know the average drop in the SBP rate. The type of analysis used to “best fit” a trend line is linear regression analysis.  This technique is very powerful because the equation of the best fit straight line determines the relationship between the two variables TIME (measured in days) and SBP (measured in millimeters of mercury).  The linear regression equation is y = mx+b, where y is the dependent variable (SBP) and x is the independent (or explanatory) variable (Time).  The slope of the line is m, and b is the intercept (the value of y when x=0).  When there is only one explanatory variable in the equation it is called a simple linear regression. The Ordinary Least-Squares (OLS) method is used for fitting a linear trend equation. A requirement for simple OLS regression is to have a continuous response variable (a variable that can legitimately be described using a mean) and a single explanatory variable.  Also, OLS observations must be independent of each other, and in time series data each point occurs at single point in time. Let’s use our data to show how this method is applied.  The daily Systolic Blood Pressure (SBP) data for the eight day period from October 14 to 21, 2011 is presented in Table 1. This data is an approximation of the points on the screenshot depicted in Figure 1.  An Excel scatter plot of this data with a linear trend line is shown in Figure 3.  A  Simple Trend Line Approach

  1. Graph the data
  2. Decide on linear model
  3. Use OLS to fit model

The OLS trend equation is y = b0 + b1x. (Note: in context of regression the convention is  y = b0 + b1x, where b1 is the slope of the line, and b0 is the y intercept). The mathematical properties of an OLS trend are:

  1. ∑(y – y) = 0
  2. ∑(y – y)2  =  a minimum

These equations give the ground rules stating that the difference of the observed values and the trend values (called deviations) must sum to zero.  The sum of squared deviations is a minimum for the trend equation.  This basically says that the determined linear equation will have the smallest sum of squared deviations of the observed values about the trend values. To compute b0 and b1, the equations are:

  1. b0 = mean of y = ∑y/n
  2. b1 = ∑xy/∑x2

The measure of time, x, is coded so that the sum of the time periods equals 0 (∑x = 0), therefore the mean of x is 0.  If the number of periods is odd then the middle period is 0.  For an odd number of periods, the earlier middle period is -1 and the later is 1.  Table 2 presents the computed numbers to complete the calculations.  Here b0 = 1024/8 = 128 and b1= -184/60 = -3.067.  The trend equation for our SBP data is y = 128 – 3.067x. The trend ys are calculated using with the coded times in the x column in the trend equation.  The trend line points (x,y) are plotted.  The equation tells us the average SBP for the eight days was 128 mm Hg and the average daily decrease in SBP was 3.067 mm Hg. Table 1. Daily Systolic Blood Pressure Data         

Obs #

Date

SBP

1

14-Oct

130

2

15-Oct

148

3

16-Oct

142

4

17-Oct

128

5

18-Oct

117

6

19-Oct

121

7

20-Oct

119

8

21- Oct

119

Table 2.  Ordinary Least Squares Method to Fit Model

y x xy x2 Trend y
130 -4 -520 16 140
148 -3 -444 9 137
142 -2 -284 4 134
128 -1 -128 1 131
117 1 117 1 125
121 2 242 4 122
119 3 357 9 119
119 4 476 16 116

Figure 3.  An Excel scatter-plot showing the relationship between Systolic Blood Pressure (SBP) and Time (measured in days) with trend line and equation. [av_image src=’https://www.movedbymetrics.com/wp-content/uploads/2013/07/f3.png’ attachment=’2331′ align=’center’ animation=’no-animation’ link=” target=’no’ av_uid=’av-6lxvs’] In the Final Analysis, the Trend Is… Trend monitoring looks for changes over time periods.  In our example, the SBP dropped on average 3.067 mmHg a day for the 8 day period. Our data shows this patient started with a high normal SBP level, and then had two consecutive days of abnormal readings. By the fifth day, the patient’s SBP fell below normal, then for the next three days remained normal.  One can only assume that when the SBP spiked to 140 mm Hg, an intervention was taken. This could have be a new or changed medication regimen, a restrictive diet or new exercise program that caused the SBP to normalize. The trend line confirms the decreased rate and the positive change to the patient’s health. Concluding…                                                      The benefits of telehealth monitoring via apps such as iBP can be invaluable for both patients and clinicians.  Personalized data gathering and tracking technology simplifies the monitoring of a patient’s blood pressure. Over time this can help them control their disease and reduce the chances of heart disease.  The data can also be analyzed more extensively to check trends and to observe the broader picture of the patient’s wellness. If you would like to read more on regression analysis, read Georgette’s article,  Draw the Line – The Straight and Narrow of Using Regression Lines.

Related Post