Samples

Data Analysis – Physical Activity and HbA1c Among Adults with Type 2 Diabetes

September 2, 2026 · 8 min read
Home > Samples > Data Analysis – Physical Activity and HbA1c Among Adults with Type 2 Diabetes
Data Analysis ~1,500 words Distinction standard

This is a published sample for quality demonstration only. Do not submit it as your own work; Turnitin and university similarity checks will flag it. Order an original paper written from scratch instead.

Research Question and Background

Glycaemic control is central to the management of type 2 diabetes, and glycated haemoglobin (HbA1c) is the standard marker of longer-term blood glucose. Physical activity is recommended in Australian and international guidelines as a core component of management, yet the size of its association with HbA1c in everyday practice, once other factors are accounted for, is often unclear. Because HbA1c is measured repeatedly over time within the same person, the data have a nested structure that ordinary regression cannot handle correctly.

This analysis asks: among community-dwelling adults with type 2 diabetes followed over 12 months, is greater moderate-to-vigorous physical activity associated with lower HbA1c, after adjusting for time, body mass index, age, sex and baseline insulin use? A linear mixed-effects model is used because it accounts for the correlation among repeated measurements from the same participant and makes efficient use of all available observations, including those from participants with some missing visits.

Data and Variables

The dataset comprises 240 adults with an established diagnosis of type 2 diabetes, each scheduled for assessment at baseline and at 3, 6 and 12 months, giving four planned occasions. After allowing for missed visits, 912 valid HbA1c measurements were available, an average of 3.8 per participant. The outcome was HbA1c expressed as a percentage. The primary exposure was moderate-to-vigorous physical activity, measured in minutes per week and modelled per 30-minute increment. Time was measured in months from baseline. Additional fixed covariates were body mass index in kilograms per square metre, age in years, sex (female compared with male) and insulin use at baseline (yes compared with no).

Baseline characteristics were examined before modelling. The mean age was 61 years (standard deviation 9.4), 45 per cent of participants were female, the mean body mass index was 31.2 kilograms per square metre, and 28 per cent were using insulin. Mean baseline HbA1c was 7.9 per cent, and self-reported moderate-to-vigorous physical activity averaged 96 minutes per week, well below the guideline target of 150 minutes. Retention was good: 88 per cent of participants provided at least three of the four planned measurements, and no out-of-range HbA1c values were recorded.

Analytic Approach

Analyses were conducted in R version 4.3 using the lme4 package for model estimation and the lmerTest package to obtain approximate degrees of freedom and p values via the Satterthwaite method. A random-intercept model was specified, with a random intercept for each participant to capture stable between-person differences in HbA1c, and fixed effects for physical activity, time and the covariates listed above. Models were estimated by restricted maximum likelihood. The intraclass correlation coefficient was calculated from the estimated variance components, and marginal and conditional R-squared values were computed to describe variance explained by the fixed effects alone and by the full model.

The need for a random slope was tested by comparing the random-intercept model with a model that also allowed the effect of time to vary across participants. The likelihood ratio test was not significant, chi-square (2) = 3.1, p = .212, so the more parsimonious random-intercept model was retained.

Assumption and Diagnostic Checks

The assumptions underlying the mixed model were assessed graphically and numerically. Linearity and homoscedasticity were examined using plots of the standardised residuals against fitted values, which showed a roughly even band with no funnel shape. The normality of the level-one residuals and of the participant random intercepts was assessed with normal quantile plots; both were approximately normal, with only slight departures in the tails. Multicollinearity among the fixed effects was screened using variance inflation factors computed from the fixed-effects design, all of which were below 2.

Missing HbA1c values were assumed to be missing at random. Under this assumption, likelihood-based estimation in a mixed model uses all available data without listwise deletion and yields valid estimates, which is a key reason for preferring this approach over repeated-measures analysis of variance. Influential participants were checked using Cook’s distance computed at the cluster level, and none exceeded conventional thresholds.

As a sensitivity check, the model was refitted after excluding the small number of participants who contributed only a single measurement, and the fixed-effect estimates were essentially unchanged, which supports the robustness of the findings to the handling of sparse records.

Results

The random-intercept model showed that physical activity was significantly associated with HbA1c after adjustment. Table 1 presents the fixed-effect estimates, standard errors, t statistics and p values.

Fixed effect Estimate SE t p
Intercept 7.86 0.29 27.10 <.001
Physical activity (per 30 min/week) -0.041 0.011 -3.73 <.001
Time (months) -0.028 0.008 -3.50 .001
Body mass index (per kg/m2) 0.045 0.013 3.46 .001
Age (years) 0.007 0.006 1.17 .243
Female -0.096 0.098 -0.98 .329
Insulin use at baseline 0.58 0.13 4.46 <.001

The random effects indicated substantial clustering. The participant intercept variance was 0.62 (standard deviation 0.79) and the residual variance was 0.34 (standard deviation 0.58), giving an intraclass correlation of 0.65. In other words, roughly 65 per cent of the variation in HbA1c that was not explained by the fixed effects lay between participants rather than within them, which confirms that a model accounting for clustering was necessary. The marginal R-squared, reflecting the fixed effects, was .21, and the conditional R-squared, reflecting the full model, was .72.

The gap between the marginal and conditional values shows that most of the model’s explanatory power comes from stable differences between individuals rather than from the measured predictors, which is typical of clinical panel data and underscores why a model that ignored clustering would understate the standard errors and risk spurious findings.

Interpreting the key coefficient, each additional 30 minutes of moderate-to-vigorous physical activity per week was associated with a reduction of 0.041 percentage points in HbA1c, holding other variables constant. Scaled to the guideline target of 150 minutes per week, this corresponds to an estimated reduction of approximately 0.21 percentage points, which is clinically meaningful at a population level. HbA1c also declined modestly over the study period, and higher body mass index and baseline insulin use were each associated with higher HbA1c. Age and sex were not statistically significant.

Interpretation

The findings support the guideline emphasis on physical activity as part of type 2 diabetes management, and they quantify an association that persists after adjusting for adiposity, treatment intensity and the passage of time. The magnitude is modest per unit but accumulates with volume of activity, which reinforces messages that encourage patients to build toward the recommended weekly total rather than to expect large changes from small increases. The strong intraclass correlation underscores that people differ considerably in their baseline glycaemic control, and that individualised targets are appropriate.

The positive association for baseline insulin use is expected and reflects confounding by indication, since insulin tends to be prescribed to patients with more advanced or less well-controlled disease. It should therefore be read as a marker of severity rather than a harmful effect of treatment. The overall decline in HbA1c across visits may reflect regression to the mean, the benefits of study participation, or secular improvements in care.

Clinically, the results reinforce a graded message. Because the association scales with the volume of activity, encouraging patients to accumulate minutes toward the recommended weekly total is more realistic than promising large changes from small increments, and even partial progress carries measurable benefit at the population level. The strong between-person variance also supports individualised goal setting, since patients begin from very different baselines. Physical activity is best framed as a complement to, not a substitute for, pharmacological management, particularly for patients already using insulin whose disease tends to be more advanced.

Limitations

Several limitations temper these conclusions. The study is observational, so the association between physical activity and HbA1c cannot be interpreted as strictly causal, and residual confounding by diet, sleep, medication adherence and disease duration is likely. Physical activity was self-reported and therefore subject to recall and social-desirability bias, which may attenuate the estimated effect. The assumption that data were missing at random cannot be verified directly, and informative dropout would bias the estimates. The random-intercept specification assumes a common trajectory shape across participants; although a random slope for time was not statistically supported here, individual variation in response to activity may still exist. Finally, the sample was drawn from a limited number of sites, so generalisation to the wider Australian population with type 2 diabetes should be cautious. The 12-month horizon also limits inference about longer-term glycaemic trajectories, and objective measurement of physical activity, for example through accelerometry, would strengthen future studies by removing reliance on self-report.

References

Australian Institute of Health and Welfare. (2023). Diabetes: Australian facts. AIHW.

Bates, D., Machler, M., Bolker, B., & Walker, S. (2015). Fitting linear mixed-effects models using lme4. Journal of Statistical Software, 67(1), 1 to 48.

Colberg, S. R., Sigal, R. J., & Yardley, J. E. (2016). Physical activity and type 2 diabetes: A position statement. Diabetes Care, 39(11), 2065 to 2079.

Diabetes Australia. (2021). Physical activity and type 2 diabetes: Clinical guidance. Diabetes Australia.

Kuznetsova, A., Brockhoff, P. B., & Christensen, R. H. B. (2017). lmerTest package: Tests in linear mixed-effects models. Journal of Statistical Software, 82(13), 1 to 26.

Nakagawa, S., & Schielzeth, H. (2013). A general and simple method for obtaining R-squared from generalised linear mixed-effects models. Methods in Ecology and Evolution, 4(2), 133 to 142.

National Health and Medical Research Council. (2013). Australian dietary and physical activity guidelines. NHMRC.

Snijders, T. A. B., & Bosker, R. J. (2012). Multilevel analysis: An introduction to basic and advanced multilevel modelling (2nd ed.). Sage Publications.

Umpierre, D., Ribeiro, P. A., & Schaan, B. D. (2013). Physical activity advice and glycaemic control in type 2 diabetes. Diabetologia, 56(2), 242 to 251.

Written by the BAO Editorial Team

Our editorial team is made up of Masters- and PhD-qualified academic writers, editors, and former university markers who have been helping Australian students since 2013. Every article is fact-checked, cited, and reviewed before publishing. Read our editorial standards and meet our team.

WhatsApp
Buy Assignment Online is an independent academic support and writing service. We are not affiliated with, endorsed by, sponsored by, or otherwise associated with any university, college, or examination board. All institution names, logos, and trademarks referenced on this site are the property of their respective owners and are used for identification and descriptive purposes only. Our services provide research, reference, and drafting assistance intended for use in accordance with your institution’s academic-integrity policies.