Risk factors or interventions may affect the variability as well as the mean of health outcomes. Understanding this can aid aetiological understanding and public health translation, in that interventions which shift the outcome mean and reduce variability are typically preferable to those which affect only the mean. However, most commonly used statistical tools do not test for differences in variability. Tools that do have few epidemiological applications to date, and fewer applications still have attempted to explain their resulting findings. We thus provide a tutorial for investigating this using GAMLSS (Generalised Additive Models for Location, Scale and Shape).

The 1970 British birth cohort study was used, with body mass index (BMI; N = 6007) and mental wellbeing (Warwick-Edinburgh Mental Wellbeing Scale; N = 7104) measured in midlife (42–46 years) as outcomes. We used GAMLSS to investigate how multiple risk factors (sex, childhood social class, and midlife physical inactivity) related to differences in health outcome mean and variability.

Risk factors were related to sizable differences in outcome variability—for example males had marginally higher mean BMI yet 28% lower variability; lower social class and physical inactivity were each associated with higher mean and higher variability (6.1% and 13.5% higher variability, respectively). For mental wellbeing, gender was not associated with the mean while males had lower variability (–3.9%); lower social class and physical inactivity were each associated with lower mean yet higher variability (7.2% and 10.9% higher variability, respectively).

The results highlight how GAMLSS can be used to investigate how risk factors or interventions may influence the variability in health outcomes. This underutilised approach to the analysis of continuously distributed outcomes may have broader utility in epidemiologic, medical, and psychological sciences. A tutorial and replication syntax is provided online to facilitate this (

DB is supported by the Economic and Social Research Council (grant number ES/M001660/1), The Academy of Medical Sciences / Wellcome Trust (“Springboard Health of the Public in 2040” award: HOP001/1025); DB and LW are supported by the Medical Research Council (MR/V002147/1). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

What is health? Contrary to simplistic notions of its being defined as the absence of disease, it is now increasingly understood that most outcomes of public health significance are continuous in nature (

Studies into the effect on continuous outcomes of exposures, be they risk factors in observational studies or interventions in randomised trials, typically focus on mean differences in the outcome, using linear regression. However linear regression assumes homoscedasticity, that is that the variability of the outcome is unrelated to the exposure, and often this is not the case. It is possible to extend regression analysis to model the variability as well as the mean, and this has benefits in terms of not only the model’s fit but also its interpretation. If for example the intervention in a trial can be shown to reduce variability in the outcome, this could reasonably be viewed as evidence of intervention success (

Similarly, obesity interventions aim to reduce body mass index (BMI) and shift treated individuals from overweight (25–30 kg/m^{2}), obese ( > 30 kg/m^{2}), or severely obese ( > 45 kg/m^{2}) to the normal range (20–25 kg/m^{2}). However, here the effect of the intervention on variability is often to increase it. Even if not formally tested, visual comparisons of outcome distributions of some influential trials suggest that weight loss interventions increase rather than reduce BMI variability, (

Understanding if and how risk factors influence variability in health outcomes has aetiological significance, consistent with the goal of epidemiological science to understand the

Identifying associations between risk factors and outcome variability may also be useful to identify the absence or presence of heterogeneity in susceptibility to interventions or risk factors and thus aid aetiological understanding. Indeed, the finding that substantial increases in mean BMI in recent decades have been matched by increases in BMI variability indicates that there may be differential susceptibility to the obesogenic environment (

Another advantage of modelling varability arises in common situations where the outcome under study is non-linearly related to other outcomes of interest. For instance, BMI influences mortality and morbidity rates, but the relationship between BMI and mortality is thought to be J-shaped (

Recent studies in biological (

Regression methods that allow variability to be modelled are uncommon. One particular method, Generalised Additive Models for Location, Scale and Shape (GAMLSS) (

Another arguably underutilised (

In this paper, we provide a worked example of the use and interpretation of GAMLSS. Accompanying this is an online tutorial and full replication syntax for running GAMLSS in R (

The further investigation of differences in variability and skewness in these outcomes is therefore arguably of substantive interest, providing further motivation to the tutorial content. We highlight the contribution of GAMLSS by contrasting results with the more commonly used linear regression and (less commonly used) quantile regression models.

The 1970 British birth cohort study consists of all 17,196 babies born in Britain during one week of March 1970, with 9 subsequent waves of follow-up from childhood to midlife (

We selected two outcomes in midlife which capture different dimensions of health and are continuously distributed: adiposity (BMI), and mental wellbeing (Warwick-Edinburgh Mental Wellbeing Scale (WEMWBS)). BMI was measured at 46 years, and wellbeing at 42 years (

We chose three risk factors across different domains—each of them likely to independently influence health outcomes (

To visually inspect the outcome distributions and their differences across risk factor groups, we first plotted separate kernel density estimates alongside relevant descriptive statistics (mean, standard deviation, and coefficient of variation [CoV = SD/mean]). This enables a descriptive depiction of variability, with unadjusted GAMLSS results corresponding to each descriptive statistic. We then used GAMLSS (

GAMLSS is a form of regression analysis that estimates different ‘moments’ of the outcome distribution. The first moment is the location (see mean in

GAMLSS requires that the distribution is specified at the outset. In this tutorial we use two distributions which we recommend for use in epidemiological research of continuous outcomes. First, the normal distribution (called NO in GAMLSS), where location is measured by the mean and scale by the standard deviation (SD). The normal distribution has no ‘shape’ moments, as there is no skewness and kurtosis is fixed.

Second, a more complex distribution which enables skewness to be investigated: the Box-Cox Cole and Green (BCCG). Here location is the median, scale is the generalised coefficient of variation (CoV), which is calculated in the normal case as SD/mean, and shape is skewness as defined by the Box-Cox power required to transform the outcome distribution to normality. The transformation requires the outcome to be on the positive line, so zero or negative values are excluded. BCCG is effectively NO with added skewness, though parameterised differently. A Box-Cox power of 1 indicates that the distribution is normal, 0 is log-normal and –1 inverse normal, so a smaller (i.e. more negative) power corresponds to more right skewness.

After choosing a distribution, linear models are used to specify the relationship between the independent variables and the different moments of the outcome distribution. As with other regression models, GAMLSS provides a standard error for each estimated coefficient, from which 95% confidence intervals can be calculated. We note that more experienced users may wish to use alternative distributions which GAMLSS facilitates (

In our primary analyses we used the NO and BCCG families. Differences in variability are modelled with a log link, and can be multiplied by 100 and interpreted as percentage differences in variability to aid interpretation (

Separately we fitted conditional quantile regression models to estimate risk factor and BMI associations at the lower, middle and upper quartiles of the outcome distribution, that is the 25th, 50th, and 75th centiles.

All analyses were conducted using R v4.1.1. We used the

A total of 6007 participants had valid data for BMI and all risk factors, and 7104 for WEMWBS. Mean BMI was 28.4 (SD = 5.5), and mean WEMWBS 49.2 (8.3). Higher BMI was weakly associated with lower wellbeing (

Note: CoV = coefficient of variation (SD/mean).

GAMLSS results for the binary risk factors are shown in

Risk factor | % | NO distribution | BCCG distribution | |||
---|---|---|---|---|---|---|

Mean | SD | Median | CoV | Skewness | ||

Female (ref) | 52.4% | 28.1 | 6.1 | 26.9 | 0.22 | 1.10 |

Male | 47.6% | 28.7 | 4.6 | 28.2 | 0.16 | 0.75 |

Unadjusted difference, % (SE) | 1.9 (0.5) | –27.6 (1.8) | 4.1 (0.4) | –23 (1.8) | 0.48 (0.11) | |

Adjusted | 2.2 (0.5) | –27.4 (1.8) | 4.4 (0.4) | –22.6 (1.8) | 0.54 (0.11) | |

Non-manual (ref) | 36.3% | 27.7 | 5.2 | 27 | 0.19 | 1.15 |

Manual social class | 63.7% | 28.8 | 5.5 | 28 | 0.19 | 0.90 |

Unadjusted difference, % (SE) | 4.0 (0.5) | 6.1 (1.9) | 4.4 (0.5) | 6 (1.9) | 0.39 (0.11) | |

Adjusted | 3.8 (0.5) | 5.5 (1.9) | 4.3 (0.4) | 5.6 (1.9) | 0.40 (0.12) | |

Physically active (ref) | 73% | 28.1 | 5.2 | 27.4 | 0.19 | 0.97 |

Inactive | 27% | 29.1 | 6.0 | 28.3 | 0.21 | 0.94 |

Unadjusted difference, % (SE) | 3.3 (0.6) | 13.5 (2.1) | 2.9 (0.5) | 10.4 (2.1) | 0.08 (0.12) | |

Adjusted | 3.3 (0.6) | 12.1 (2.1) | 3.1 (0.5) | 9.3 (2.1) | 0.12 (0.12) |

Skewness is estimated as the Box-Cox power (that is, the power required to transform the outcome to a normal distribution); differences are the absolute difference in Box-Cox power in each subgroup estimated by GAMLSS. GAMLSS estimates multiple distribution moments simultaneously; thus, differences may not exactly correspond to descriptive comparisons reported above.

Estimates mutually adjusted for sex, social class and physical inactivity.

NO: normal distribution; BCCG: Box-Cox Cole and Green distribution: SD: standard deviation; CoV: coefficient of variation; GAMLSS: Generalized Additive Models for Location, Scale and Shape; SE, standard error.

Risk factor | % | NO distribution | BCCG distribution | |||
---|---|---|---|---|---|---|

Mean | SD | Median | COV | Skewness | ||

Female (ref) | 52.8% | 49.2 | 8.5 | 50 | 0.17 | –0.41 |

Male | 47.2% | 49.1 | 8.2 | 50 | 0.17 | –0.40 |

Unadjusted difference, % (SE) | –0.2 (0.4) | –3.9 (1.7) | –0.3 (0.4) | –3.5 (1.7) | 0.02 (0.11) | |

Adjusted | –0.6 (0.4) | –3.6 (1.7) | –0.7 (0.4) | –2.6 (1.7) | 0.00 (0.11) | |

Non-manual (ref) | 34.8% | 50.1 | 7.9 | 51 | 0.16 | –0.45 |

Manual social class | 65.2% | 48.7 | 8.5 | 49 | 0.17 | –0.37 |

Unadjusted difference, % (SE) | –2.8 (0.4) | 7.2 (1.8) | –2.9 (0.4) | 10.9 (1.8) | –0.20 (0.12) | |

Adjusted | –2.5 (0.4) | 6.0 (1.8) | –2.7 (0.4) | 9.8 (1.8) | –0.24 (0.12) | |

Physically active (ref) | 72.4% | 49.9 | 8.0 | 51 | 0.16 | –0.38 |

Inactive | 27.6% | 47.3 | 8.9 | 48 | 0.19 | –0.36 |

Unadjusted difference, % (SE) | –5.3 (0.5) | 10.9 (1.9) | –5.2 (0.4) | 16.2 (1.9) | –0.12 (0.12) | |

Adjusted | –5.3 (0.5) | 9.9 (1.9) | –5.1 (0.4) | 15.2 (1.9) | –0.10 (0.12) |

Skewness is estimated as the Box-Cox power (that is, the power required to transform the outcome to a normal distribution); differences are the absolute difference in Box-Cox power in each subgroup estimated by GAMLSS. GAMLSS estimates multiple distribution moments simultaneously; thus, differences may not exactly correspond to descriptive comparisons reported above.

Estimates mutually adjusted for sex, social class and physical inactivity.

NO: normal distribution; BCCG: Box-Cox Cole and Green distribution: SD: standard deviation; CoV: coefficient of variation; GAMLSS: Generalized Additive Models for Location, Scale and Shape; SE, standard error.

Males had higher mean BMI yet lower variability than females—see

In contrast, lower social class and physical inactivity were both associated with higher mean BMI and higher BMI variability (

The GAMLSS results were similar with the BCCG distribution rather than NO (

There was little evidence of sex differences in mean wellbeing, while males had marginally less variability than females by 3.9% (1.7%). Lower social class and physical inactivity were both associated with lower mean yet higher variability (

The results were similar with the BCCG distribution (

For BMI, the associations of lower social class and physical inactivity were stronger at upper quantiles (

Outcome | Risk factor | 25th centile | 50th centile | 75th centile |
---|---|---|---|---|

BMI @ Age 46 | Male vs female | 6.8 (0.5) | 4.5 (0.6) | –0.8 (0.7) |

Father’s Class | 3.7 (0.6) | 3.7 (0.6) | 4.9 (0.7) | |

Exercise Level | 1 (0.7) | 3 (0.7) | 4.3 (0.8) | |

WEMWBS @ Age 42 | Sex | 0 (0.7) | 0 (0.5) | 0 (0.3) |

Father’s Class | –4.5 (0.7) | –4 (0.5) | –1.8 (0.3) | |

Exercise Level | –6.9 (0.5) | –6.1 (0.5) | –1.8 (0.5) |

Note: results show the percentage difference (log-transformed x 100) in BMI or mental wellbeing (WEMWEBS; standard errors in parenthesis) at different centiles of the outcome distribution; estimates are mutually adjusted.

Plotted lines are calculated using GAMLSS estimation results of the entire outcome distribution; points at the 25th, 50th, and 75th centiles are estimated using quantile regression models. Marginal effects show the differences in outcome between each risk group across the outcome distribution.

For WEMWBS, the associations of lower social class and physical inactivity were also stronger at lower quantiles (

Plotted lines are calculated using GAMLSS estimation results of the entire outcome distribution; points at the 25th, 50th, and 75th centiles are estimated using quantile regression models. Marginal effects show the differences in outcome between each risk group across the outcome distribution.

Using an underutilised analytical approach (GAMLSS), we present empirical evidence to support the idea that risk factors can relate to sizable differences in outcome variability, and even outcome skewness, in addition to differences in the outcome mean. Females had higher variability in BMI and mental wellbeing than males; lower social class and physical inactivity were each associated with higher variability in both BMI and mental wellbeing, despite having different directions of association with the mean (higher BMI yet lower mental wellbeing).

Our findings add to an emerging literature which has investigated associations between risk factors and outcome variability. Studies (

Our findings help to reconcile findings from GAMLSS with those using quantile regression (

Why are risk factors associated with differences in outcome variability? There are multiple possible explanations. First, risk factors may not be sufficient for an outcome to occur but rather only have a causal effect in the presence of other factors, for instance as posited in models such as the

Alternatively, between-person differences in confounding and/or measurement error may also lead to risk factors being associated with outcome variability. For example, in the present study physical activity was measured via a single item capturing reported activity of a moderate-vigorous intensity for at least 30 min per day; this is an imperfect reflection of the underlying exposure which may have a causal effect (e.g. total energy expenditure [across all intensities of activity] in the case of adiposity; (

The study highlights the fact that analyses by GAMLSS and quantile regression lead to similar results at the selected quantiles of the outcome distribution—see

Strengths of this study include the analytical approach used (GAMLSS) to empirically investigate differences in outcome variability. While differences in variability can be informed by descriptive comparison (e.g. comparing standard deviations), GAMLSS additionally enables computation of estimates of precision and incorporates multivariable specifications (e.g. confounder or mediator adjustment; and inclusion of interaction terms). The use of the 1970 birth cohort data is an additional strength, enabling investigation of multiple risk factors and two largely orthogonal yet important continuous health outcomes. The national representation of this cohort is also advantageous—highly distorted sample selection can bias conventional epidemiological results (i.e. mean differences in outcomes) (

The study also has limitations. As in all observational studies, causal inference is challenging despite the use of longitudinal data. Associations of social class at birth with outcomes for example could be explained by unmeasured confounding—this may include factors such as parental mental health. This is challenging to falsify empirically owing to a lack of such data collected before birth. In contrast, sex is randomly assigned at birth, and thus its associations with outcomes are unlikely to be confounded. However, sex differences in reporting may bias associations with mental wellbeing. Physical activity and mental wellbeing were ascertained at broadly the same age, so that associations between the two could be explained by reverse causality; existing evidence appears to suggest bi-directionality of links between physical activity and both outcomes (

This study used an underutilised approach to empirically investigate associations between risk factors and outcome variability in a single cohort study. Thus, our findings require replication and extension in other datasets across other risk factors and health outcomes. Future studies should also seek to explain their findings, and where possible falsify potential explanations. Understanding how risk factors relate to and/or cause differences in outcome variability is not a standard part of epidemiological training, and it entails additional analytical and conceptual complexity. Thus, with greater application of these tools an emerging consensus on best practice should develop. In the first instance, we recommend both descriptive and formal investigation, and that analysts carefully consider the use of both absolute (e.g. SD) and relative (e.g. CoV) differences in variability. Since the CoV is fractional standard deviation (e.g. SD/mean or log SD), its suitability of use depends on the a priori anticipated relationship between the mean and variance.

In the context of randomised controlled trials, the finding of variability in treatment effects between individuals has been used to justify individualised approaches to treatment (personalised medicine). It is beyond the scope of the current article to discuss the tractability of this for complex outcomes in which treatment effects are unpredictable (

We provide empirical support for the notion that risk factors or interventions can either reduce or increase variability in health outcomes. This finding is consistent with results from quantile regression analysis where a risk factor vs outcome association is stronger (or weaker) at higher outcome centiles. Such findings may be explained by heterogeneity in the causal effect of each exposure, by the influence of other (typically unmeasured) variables, and/or by measurement error. This underutilised approach to the analysis of continuously distributed outcomes may have broader utility in epidemiological, medical, and psychological sciences. Our tutorial and syntax content is designed to facilitate this.

No competing interests declared

Conceptualization, Data curation, Formal analysis, Funding acquisition, Investigation, Methodology, Resources, Visualization, Writing - original draft, Writing - review and editing

Formal analysis, Investigation, Methodology, Resources, Software, Visualization, Writing - review and editing

Conceptualization, Investigation, Methodology, Visualization, Writing - review and editing

Human subjects: This paper uses secondary data analysis using data from a cohort study which has been followed-up since birth in 1970. Cohort members provided informed consent, and the study received full ethical approval - most recently from the NRES Committee South East Coast-Brighton and Sussex.

All data are available to download from the UK Data Archive:

Using data from the 1970 British Birth Cohort study, the authors demonstrated the utility of Generalized Additive Models for Location, Scale and Shape (GAMLSS) to investigate the association of three risk factors (sex, socioeconomic circumstances, and physical inactivity) with body mass index and mental wellbeing. This work provides empirical evidence for why we should consider how risk factors influence the variability and not just the mean of outcomes. From the perspective of developing personalized medicine, it is important to know whether interventions have response heterogeneity as the first step. If such heterogeneity is identified, the next step will be to identify the factors associated with the heterogeneity (or those who will be benefitted from the intervention). Therefore, this study contributes to the first step by investigating the possibility of response heterogeneity.

Our editorial process produces two outputs: i)

Thank you for submitting your article "Risk factors relate to the variability of health outcomes as well as the mean" for consideration by

As is customary in

Essential revisions:

The authors claim that the primary aim of this work is "exploring factors affecting outcome variability in an epidemiological context." This aim seems to be very broad, and it is unclear how one would address this aim in a single manuscript. We suggest defining the aims of the manuscript clearly in terms of the objectives the authors want to achieve. For instance, what would the audience gain by reading the manuscript (objective of a tutorial type of manuscript)? Or what is the research question the authors aim to investigate (objective of a non-tutorial type of manuscript)?

In the field of epidemiology, it is well understood that an exposure may change different parameters of the outcome distribution in the population (1). For example, a population intervention focusing only on a high-risk group would increase the right skewness of the outcome distribution in that population after implementation. Further, it is unclear how using a model that already assumes that independent variables may affect the variability of the outcome (by parameterizing this relationship) can alone provide empirical support for the that notion. Instead, having used such a model, the authors could report on the effect estimates of the risk factor on the variability of the outcome measures. In other words, more clarity is needed regarding the takeaway message of the manuscript.

We suggest that the authors make this manuscript a tutorial; if they agree with our suggestion, the following additions would considerably improve the manuscript:

i) Clearly annotated R and Stata codes to replicate the analysis. This would provide potential users of the proposed technique t with hands-on exercise.

ii) Clear examples of interpretation within epidemiological context. For example, how should one interpret the percentage point difference in SD and the uncertainty around it?

iii) Comparison between the results of GAMLSS and a technique that does not model the variance and further elaboration on the advantages of fitting this complex model over a simple model.

iv) Explanations answering the following questions: What do we learn from comparing the descriptive kernel density estimates to the unadjusted estimates? Are they supposed to be very similar? If yes, why?

v) Discussions on or recommendation for addressing the on challenges in choosing the type of outcome distribution in GAMLSS within epidemiological context.

(1) Rose G. Sick individuals and sick populations. Int J Epidemiol. 2001 Jun 1;30(3):427-32.

Essential revisions:

The authors claim that the primary aim of this work is "exploring factors affecting outcome variability in an epidemiological context." This aim seems to be very broad, and it is unclear how one would address this aim in a single manuscript. We suggest defining the aims of the manuscript clearly in terms of the objectives the authors want to achieve. For instance, what would the audience gain by reading the manuscript (objective of a tutorial type of manuscript)? Or what is the research question the authors aim to investigate (objective of a non-tutorial type of manuscript)?

In the field of epidemiology, it is well understood that an exposure may change different parameters of the outcome distribution in the population (1). For example, a population intervention focusing only on a high-risk group would increase the right skewness of the outcome distribution in that population after implementation. Further, it is unclear how using a model that already assumes that independent variables may affect the variability of the outcome (by parameterizing this relationship) can alone provide empirical support for the that notion. Instead, having used such a model, the authors could report on the effect estimates of the risk factor on the variability of the outcome measures. In other words, more clarity is needed regarding the takeaway message of the manuscript.

Thank you for these comments. We have edited the manuscript to clarify the takeaway message. It serves to be a tutorial for the use and interpretation of GAMLSS, and uses empirical examples which are chosen to be both novel and of substantive interest (thereby increasing the motivation for the tutorial content). Please see the revised introduction.

We suggest that the authors make this manuscript a tutorial; if they agree with our suggestion, the following additions would considerably improve the manuscript:

i) Clearly annotated R and Stata codes to replicate the analysis. This would provide potential users of the proposed technique t with hands-on exercise.

As suggested this is now provided in the form of a 1) a general tutorial for using GAMLSS and associated R packages (R syntax only as Stata does not support GAMLSS); 2) annotated syntax to replicate in full the analyses conducted in this manuscript.

ii) Clear examples of interpretation within epidemiological context. For example, how should one interpret the percentage point difference in SD and the uncertainty around it?

We have provided more details on the measures of variability in order to aid lay understanding (Methods, Analytical strategy paragraphs 3-4). The new Figure 1 provides a visual depiction of distributions which differ in variability to aid this.

iii) Comparison between the results of GAMLSS and a technique that does not model the variance and further elaboration on the advantages of fitting this complex model over a simple model.

We have included this. Linear regression results would only investigate mean differences; please see the introduction (paragraph 2), Methods, Analytical strategy paragraphs 1-2; and results of mean differences shown in Tables 1 and 2 which would match those from linear regression results. Results show that GAMLSS enables important inferences to be drawn to which more simple modelling of means (linear regression) or binary outcomes (logistic regression) do not.

iv) Explanations answering the following questions: What do we learn from comparing the descriptive kernel density estimates to the unadjusted estimates? Are they supposed to be very similar? If yes, why?

We have clarified that these were created with the intention of being identical, to aid interpretation of the more complex GAMLSS analyses (Methods, Analytical strategy paragraph 1).

v) Discussions on or recommendation for addressing the on challenges in choosing the type of outcome distribution in GAMLSS within epidemiological context.

We now included our recommendation of two distributions for use in epidemiological research (Methods, Analytical strategy paragraph 2-3).