Albumin

Mixed models & percent variation

In the below we fit mixed effects models of various structures to the albumin secretion data.

First we fit the full model with fixed effects for condition, day, and their interaction, as well as nested random effects for lab, study, and circuit. From this we find that labs contribute a large proportion to the total variance, whereas studies within labs contribute very little. The variability seen between studies may stem from lab-to-lab variability rather than study-to-study variability.

We then fit the model where we ignore the factor of study, i.e., the above model but with circuits nested directly within labs. We find that the variance components are very similar to before.

Next we fit a model where we ignore the layer of labs, and treat the three studies as completely independent. In this case the proportion of variability assigned to circuits within studies is slightly larger than in the previous models, although not much. Also the proportion of variability assigned to residuals is slightly larger, but overall the allocations are similar.

Finally we also investigate the case where we look at only studies from the first lab (studies 1 and 2) and fit the complete model with random effects for labs, studies, and circuits. Notably the results again indicate that indeed there is not much study-to-study variability within labs but more variability between labs.

We also investigate the BIC of each of the models using all data, and find that the mixed model with random effects for lab and circuit (and not study) has the lowest BIC. Based on this and the variance decomposition we claim that this model is the best.

npar AIC BIC logLik deviance Chisq Df Pr(>Chisq)
alb_circuit_mixed 30 -90.86427 38.86650 75.43213 -150.8643 NA NA NA
alb_lab_circuit_mixed 31 -106.80508 27.25005 84.40254 -168.8051 17.940815 1 0.0000228
alb_study_circuit_mixed 31 -105.41903 28.63609 83.70952 -167.4190 0.000000 0 NA
alb_lab_study_circuit_mixed 32 -104.81858 33.56091 84.40929 -168.8186 1.399546 1 0.2367996

[1] “Optimal model (based on BIC): alb_lab_circuit_mixed” [1] “Optimal model (based on AIC): alb_lab_circuit_mixed”

Next we look at each study at its own and investigate the amount of circuit-to-circuit variability. Clearly study 2 has larger circuit-to-circuit variability than studies 1 and 3.

Effect & SE by study

In the below we investigate the estimated disease effect for each study separately at day 13, using a mixed model with fixed effects for condition, day and the interaction, and a random effect for circuit (that is, the same models as generated the previous pie-charts).

Ketone bodies

Mixed models & percent variation

In the below we fit mixed effects models of various structures to the ketone bodies data.

First we fit the full model with fixed effects for condition, day, and their interaction, as well as nested random effects for lab, study, and circuit. From this we find that labs contribute a large proportion to the total variance, whereas studies within labs contribute very little (singular fit). The variability seen between studies may stem from lab-to-lab variability rather than study-to-study variability.

We then fit the model where we ignore the factor of study, i.e., the above model but with circuits nested directly within labs. We find that the variance components are very similar to before.

Next we fit a model where we ignore the layer of labs, and treat the three studies as completely independent. In this case the proportion of variability assigned to circuits within studies is slightly larger than in the previous models, although not much. Also the proportion of variability assigned to residuals is slightly larger, but overall the allocations are similar.

Finally we also investigate the case where we look at only studies from the first lab (studies 1 and 2) and fit the complete model with random effects for labs, studies, and circuits. Notably the results again indicate that indeed there is not much study-to-study variability (singular fit) within labs.

We also investigate the BIC of each of the models using all data, and find that the mixed model with random effects for lab and circuit (and not study) has the lowest BIC. Based on this and the variance decomposition we claim that this model is the best.

## boundary (singular) fit: see help('isSingular')

## boundary (singular) fit: see help('isSingular')

npar AIC BIC logLik deviance Chisq Df Pr(>Chisq)
ket_circuit_mixed 10 91.08592 120.9902 -35.54296 71.08592 NA NA NA
ket_lab_circuit_mixed 11 89.96745 122.8622 -33.98373 67.96745 3.118465 1 0.0774097
ket_study_circuit_mixed 11 91.04527 123.9400 -34.52264 69.04527 0.000000 0 NA
ket_lab_study_circuit_mixed 12 91.96745 127.8526 -33.98373 67.96745 1.077820 1 0.2991857

[1] “Optimal model (based on BIC): ket_circuit_mixed” [1] “Optimal model (based on AIC): ket_lab_circuit_mixed”

Next we look at each study at its own and investigate the amount of circuit-to-circuit variability. Clearly study 2 has larger circuit-to-circuit variability than studies 1 and 3.

Effect & SE by study

In the below we investigate the estimated disease effect for each study separately at day 13, using a mixed model with fixed effects for condition, day and the interaction, and a random effect for circuit (that is, the same models as generated the previous pie-charts).

IL-1R2

No data from study 1, meaning that lab and study are completely confounded. In the following we can therefore not separate between lab-to-lab variability and study-to-study variability.

Mixed models & percent variation

In the below we fit mixed effects models of various structures to the IL-1R2 data.

First we fit the full model with fixed effects for condition, day, and their interaction, as well as nested random effects for lab (or equivalently, study) and circuit.

## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.455226 (tol = 0.002, component 1)

npar AIC BIC logLik deviance Chisq Df Pr(>Chisq)
il1_circuit_mixed 14 106.8026 142.7034 -39.40128 78.80256 NA NA NA
il1_lab_circuit_mixed 15 104.7682 143.2335 -37.38412 74.76824 4.034329 1 0.0445834

[1] “Optimal model (based on BIC): il1_circuit_mixed” [1] “Optimal model (based on AIC): il1_lab_circuit_mixed”

Next we look at each study at its own and investigate the amount of circuit-to-circuit variability. Clearly study 2 has larger circuit-to-circuit variability than studies 1 and 3.

Effect & SE by study

In the below we investigate the estimated disease effect for each study separately at day 13, using a mixed model with fixed effects for condition, day and the interaction, and a random effect for circuit (that is, the same models as generated the previous pie-charts).

GTT Glucose

For GTT endpoints we only include data from the TissUse lab, and hence we cannot look at any lab-to-lab effects or variability. We also look specifically at measurements at day 13, as that is the only day where we have sampled both diseased and healthy conditions.

Mixed models & percent variation

In the below we fit mixed effects models of various structures to the GTT glucose data.

First we fit the full model with fixed effects for condition, day, and their interaction, as well as nested random effects for study and circuit.

npar AIC BIC logLik deviance Chisq Df Pr(>Chisq)
glu_day13_circuit_mixed 18 -380.6086 -329.2720 208.3043 -416.6086 NA NA NA
glu_day13_study_circuit_mixed 19 -380.3064 -326.1178 209.1532 -418.3064 1.697785 1 0.192578

[1] “Optimal model (based on BIC): glu_day13_circuit_mixed” [1] “Optimal model (based on AIC): glu_day13_circuit_mixed”

Next we look at each study at its own and investigate the amount of circuit-to-circuit variability.

Effect & SE by study

In the below we investigate the estimated disease effect for each study separately at day 13, using a mixed model with fixed effects for condition, hour and the interaction, and a random effect for circuit (that is, the same models as generated the previous pie-charts).

GTT Insulin

For GTT endpoints we only include data from the TissUse lab, and hence we cannot look at any lab-to-lab effects or variability. We also look specifically at measurements at day 13, as that is the only day where we have sampled both diseased and healthy conditions.

Mixed models & percent variation

In the below we fit mixed effects models of various structures to the GTT insulin data.

First we fit the full model with fixed effects for condition, day, and their interaction, as well as nested random effects for study and circuit. Notably, there is a very large study-to-study variability for this endpoint.

npar AIC BIC logLik deviance Chisq Df Pr(>Chisq)
ins_day13_circuit_mixed 18 250.4113 300.1304 -107.20565 214.4113 NA NA NA
ins_day13_study_circuit_mixed 19 201.1124 253.5937 -81.55618 163.1124 51.29894 1 0

[1] “Optimal model (based on BIC): ins_day13_study_circuit_mixed” [1] “Optimal model (based on AIC): ins_day13_study_circuit_mixed”

Next we look at each study at its own and investigate the amount of circuit-to-circuit variability.

## fixed-effect model matrix is rank deficient so dropping 2 columns / coefficients
## fixed-effect model matrix is rank deficient so dropping 2 columns / coefficients

Effect & SE by study

In the below we investigate the estimated disease effect for each study separately at day 13, using a mixed model with fixed effects for condition, hour and the interaction, and a random effect for circuit (that is, the same models as generated the previous pie-charts).

Appendix

Reproducibility

Analyses were conducted using the R Statistical language (version 4.2.1; R Core Team, 2022) on macOS Ventura 13.5.2, using the packages magrittr (version 2.0.3; Bache S, Wickham H, 2022), lme4 (version 1.1.34; Bates D et al., 2015), Matrix (version 1.5.1; Bates D et al., 2022), lmerTest (version 3.1.3; Kuznetsova A et al., 2017), emmeans (version 1.8.2; Lenth R, 2022), report (version 0.5.5; Makowski D et al., 2021), tibble (version 3.2.1; Müller K, Wickham H, 2023), ggplot2 (version 3.4.0; Wickham H, 2016), stringr (version 1.5.0; Wickham H, 2022), forcats (version 1.0.0; Wickham H, 2023), tidyverse (version 1.3.2; Wickham H et al., 2019), readxl (version 1.4.1; Wickham H, Bryan J, 2022), dplyr (version 1.1.2; Wickham H et al., 2023), purrr (version 1.0.2; Wickham H, Henry L, 2023), readr (version 2.1.3; Wickham H et al., 2022) and tidyr (version 1.3.0; Wickham H et al., 2023).

References