Heterogeneity in the association between weather and pain severity among patients with chronic pain: a Bayesian multilevel regression analysis

Supplemental Digital Content is Available in the Text. Weather sensitivity among patients with chronic pain is a phenomenon more apparent in some participant subgroups.


Introduction
This supplementary file presents further details and additional materials not presented in the main manuscript.

Further detail on the Multilevel model 2.1 Model formulation
The model was formulated as follows. Let denote the ℎ pain-severity level report for the ℎ participant at time and denote the accompanying vector of covariate values at the time , = 1, … , , and = 1, … , . We assume that the ordinal response with = 5 ordered categories (or levels) can be viewed as a censored observation from a hidden continuous variable, * , where −∞ ≡ 0 < 1 < ⋯ < ≡ ∞ are suitable threshold parameters [1]. That is, a response for the ℎ individual at time occurs in pain-severity category ( = ) if the latent response process * exceeds the threshold value −1 , but does not exceed the threshold value . Then, for the specification of the relationship between the unobserved * and the vector of regressors , we follow a mixed-effect model-type specification [1] where are population-level regression coefficients, = ( 1 , … , ) are patient-specific, normally distributed, ∼ (0, σ u l 2 ) random effects describing the heterogeneity (i.e., individuals' deviation from the population-level effect) among different individuals, is × design matrix for the fixed effect, is a × design matrix corresponding to the randomeffect vectors , and is the underlying error, where is the number of variables included in the fixed effect, including the global intercept, and L is the number of random components, including the random intercept. We assume a normal distribution for leading to a probit model. Also, we assume independence between and (i.e., a homogeneous residual variance conditional on the fixed effect and random effect).

Estimation
We used the Markov-chain Monte Carlo (MCMC) simulations to fit the above multilevel probit model. Bayesian estimation requires prior information for each of the model parameters. We assumed a weakly informative but proper prior for all model parameters. That is, we assumed a normal N(0, 2.5) prior for each of the regression coefficients ( ) and a half-Student-t prior with a mean of zero, three degrees of freedom, and a scale parameter of 10 [2] for the hyperparameters ( 2 , = 1, … , ). All models were fitted using the R package brms [3] based on Stan [4] using four chains of 8000 iterations each, thinned to every 10 trials where the first 4000 iterations are considered as burn-in trials. A Gelman-Rubin diagnostic ( � ) [2] was used to confirm model convergence.

Model goodness of fit
We used a posterior predictive check approach to evaluate the fitted models' goodness of fit [5]. The posterior predictive check works by comparing the observed data to the simulated data from the fitted model. To generate the data used for posterior predictive checks (PPCs), we simulate from the posterior predictive distribution, which is the distribution of the outcome variable implied by a model after using the observed data to update our beliefs about unknown model parameters. If a model is a good fit for the data, then the simulated data should look like the observed data. Figure S1: The observed proportion of pain severity response over time.

BELIEFS IN WEATHER-PAIN ASSOCIATION:
Belief that the weather influences pain on a scale of 1-10: median (IQR) 7 (6-9) 7 (6-9) * Participants may report more than one pain condition, and when they do, they are counted multiple times in the above table. + Only particpants that had reponded to the baseline questionare included in the full cohort.