\begin{table}[htbp]
\centering
\caption{Characteristics of patients according to gender}
\label{tab:table_1}
\begin{tabular}{lcccc}
\hline
Variables & Total & Female & Male & P \\
\hline
Number of patients & 971 & 655 & 316 &  \\
Age (years) & 42 (12) & 41 (12) & 44 (12) & 0.001 \\
Waist (cm) & 133 (14) & 129 (13) & 141 (14) & $<$0.001 \\
MS & 661 (68\%) & 429 (65\%) & 232 (73\%) & 0.013 \\
Type 2 diabetes & 247 (25\%) & 147 (22) & 100 (32\%) & 0.002 \\
PTH (pmol/l) & 5.8 (2.3) & 5.8 (2.3) & 5.9 (2.4) & 0.597 \\
25(OH)D (nmol/l) & 52 (22) & 54 (22) & 50 (21) & 0.009 \\
Magnesium (mmol/l) & 0.84 (0.07) & 0.84 (0.07) & 0.85 (0.07) & 0.522 \\
Calcium (mmol/l) & 2.35 (0.07) & 2.36 (0.07) & 2.35 (0.07) & 0.024 \\
Phosphate (mmol/l) & 1.09 (0.17) & 1.10 (0.16) & 1.06 (0.17) & $<$0.001 \\
\hline
\end{tabular}

Data are means (SD) for continuous variables and n (\%) for categorical variables.
\end{table}

women had a waist circumference $>$102 cm and $>$88 cm, respectively. In total 662 (68.1\%) had MS (65.4\% and 73.3\% for women and men, respectively, p = 0.013). Of the 246 patients who had T2DM 241 (98\%) also had MS.

\section{Path model estimation}
We first performed a path analysis of the model in Figure~\ref{fig:figure_1} separately for men and women as a preliminary analysis to explore possible gender differences. Besides an apparent gender difference in the direct effects of age on both PTH and MS, and in the direct effect of PTH on MS, also phosphate showed a possibly significant gender difference in the direct path to MS (data not shown). Parameters for these possible gender differences were included along their respective paths in the overall path model, resulting in a model with reduced DIC compared to a model without such gender differences (from 7182 to 7172). Removing statistically non-significant direct paths from this larger model reduced the DIC further (from 7172 to 7142). Regression results from this final, optimal model, expressed as standardized regression coefficients and CrIs, are shown in Table~\ref{tab:table_2}. Unstandardized results are included for reference.

\section{MS}
Besides diabetes and age, only PTH and phosphate had significant direct effects on MS. The effect of T2DM was by far the strongest, while the estimated direct effect of PTH was 0.36 (95\% CrI [0.15,0.57]). This value implies that a 1 SD increase in PTH (2.3 pmol/l) results in an increase of 0.36 in the log odds of MS. Due to a significant gender difference, this direct effect of PTH on MS was significant for women only.

Direct effects of age and phosphate were 0.31 (95\% CrI [0.13,0.50]) and 0.28 (95\% CrI [0.10,0.47]), respectively, implying that an increase of 1 SD in age or phosphate (12 years and 0.17 mmol/l, respectively) results in an increase in the log OR of MS by approximately one third. Due to significant gender differences, these direct effects on MS were also only significant for women.

Even though the 95\% CrI for the gender difference for age on MS included zero, removing this gender effect from the model actually resulted in a model with an increased DIC, arguing for keeping it in the model.

\section{PTH}
All proposed explanatory variables of MS had significant direct effects on PTH. As a consequence, they all have significant indirect effects on MS for women. The strongest direct effects on PTH were vit D and phosphate; -0.27 (95\% CrI [-0.33,-0.21]) and -0.26 (95\% CrI [-0.32,-0.20]), respectively. This value implies that an increase of 1 SD in vit D or phosphate (22.0 nmol/l and 0.17 mmol/l, respectively) corresponds to a mean decrease of approximately one fourth SD in PTH (-0.58 pmol/l).

However, phosphate also has an indirect effect on PTH, mediated through calcium. The direct effect of phosphate on calcium is 0.27 (95\% CrI [0.21,0.33]), while the direct effect of calcium on PTH is -0.09 (95\% CrI [-0.15,-0.04]). The total effect of phosphate on PTH is thus -0.26+(-0.09)*0.27 = -0.28; about a 10\% increase compared to the direct effect alone. While the effect of phosphate on PTH, and in result MS, is partly mediated through calcium, the effect of magnesium on MS is mediated through both PTH and T2DM. Due to T2DM being a binary outcome along one of the pathways, this total effect cannot be quantified.

The direct effect of age on PTH was 0.20 (95\% CrI [0.13,0.27]). For the direct effect of age on PTH there was also a significant gender effect, resulting in this direct effect of age being significant for women only. For women, the total effect of age on MS is split into a direct path and two indirect paths; one via T2DM and one via PTH.

\section{MS, PTH and gender differences}
A summary of the statistically significant paths for men and women is presented in Figure~\ref{fig:figure_2}, while Table~\ref{tab:table_3} summarizes the direct and indirect effects the various proposed explanatory variables has on MS.

\section{Discussion}
Previous reports have addressed the effect of PTH on MS, and discussed whether the variable should be adjusted for when estimating the effect of other possible predictors of MS \cite{14,15,16,17}. Our path analysis on morbidly obese subjects suggests a possible mediating role of PTH in the association between MS and various demographic variables and biomarkers. Significant gender differences indicate, however, that this mediating effect is only significant for women.