Caspase

Analyzing the effect of Condition (Hypoxia vs Normoxia) on cleaved Caspase-3

Setup
source(here::here("src", "setup.R"), echo = FALSE)

## Since downlit doesn't seem to link packages without an explicit & visible library() call anymore ...

library(here)
library(pipebind)

library(dplyr)
library(tidyr)
library(stringr)
library(purrr)
library(ggplot2)

library(glmmTMB)
library(parameters)
library(insight)
library(performance)
library(DHARMa)
library(emmeans)

library(DT)
library(gt)
library(gtsummary)

## Data

casp_responses <- c("Dens_Tot", "A_EGL", "A_ML_PCL", "A_IGL", "A_WM")

casp_data <- load_casp_data()

1 Clean Data

Here, we only keep the variables that will be used (either as predictor or response) in the analyses.

2 Density of cleaved caspase 3+ cells (cells/μm²)

2.1 Model fitting & diagnostics

Here, we chose to model Dens_Tot, which is a strictly positive continuous measure, with a Gamma family. We use a random intercept per Mouse to account for pseudo-replication.

Dens_Tot_P4_mod <- glmmTMB(
  Dens_Tot ~ Condition * Z + (1 | Mouse),
  family = Gamma("log"),
  data = filter(casp_data$clean, Stage == "P4"),
  REML = TRUE
)

2.1.1 Residual diagnostics

Checking the model’s quality of fit through the behavior of its residuals:

check_model(Dens_Tot_P4_mod, check = c("homogeneity", "qq", "reqq", "pp_check"), detrend = FALSE)

make_acf_plot(Dens_Tot_P4_mod)

2.1.2 Predictive checks

Checking the model’s quality of fit by emulate Bayesian Posterior Predictive Checks (PPC): we simulate predictions from the model and plot how accurately they match the observed data, or statistics of the observed data:

Dens_Tot_P4_mod_dharma <- simulateResiduals(Dens_Tot_P4_mod, plot = FALSE, n = 300, seed = getOption("seed"))
Dens_Tot_P4_mod_dharma_t <- t(Dens_Tot_P4_mod_dharma$simulatedResponse)
ppc_plots(Dens_Tot_P4_mod, simulations = Dens_Tot_P4_mod_dharma_t, term = "Condition", is_count = FALSE)

ppc_stat_plots(Dens_Tot_P4_mod, simulations = Dens_Tot_P4_mod_dharma_t, term = "Condition")

2.1.3 Potential outliers

According to the fitted model, the following observations are potential outliers:

✔ No potential outliers were reported.

2.2 Model analysis

2.2.1 Model parameters

(parameters(
    Dens_Tot_P4_mod, component = "conditional", effects = "fixed",
    exponentiate = should_exp(Dens_Tot_P4_mod), p_adjust = "none", summary = TRUE, digits = 3
  )
  |> print_html() 
  |> tab_header(title = NULL)
)
Parameter Coefficient SE 95% CI z p
(Intercept) 190.684 29.189 (141.259, 257.402) 34.301 < .001
Condition1 0.674 0.103 (0.499, 0.909) -2.580 0.010
Z1 1.432 0.224 (1.053, 1.946) 2.291 0.022
Z2 0.631 0.148 (0.398, 1.000) -1.960 0.050
Condition1 × Z1 1.169 0.180 (0.864, 1.581) 1.012 0.311
Condition1 × Z2 0.852 0.201 (0.538, 1.352) -0.679 0.497
Model: Dens_Tot ~ Condition * Z (34 Observations)
Residual standard deviation: 0.508 (df = 32)
Conditional R2: 0.562; Marginal R2: 0.410

2.2.2 Marginal means

emmeans(Dens_Tot_P4_mod, specs = "Condition", type = "response") |> 
  as.data.frame() |> 
  gt()
Condition response SE df lower.CL upper.CL
N 128.5 22.12 32 90.47 182.5
IH 283.0 71.62 32 169.01 473.9
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

2.2.3 Contrasts

emmeans(Dens_Tot_P4_mod, specs = "Condition", type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE) |> 
  as.data.frame() |> 
  gt()
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.454 0.1389 32 0.2434 0.8468 1 -2.58 0.01467
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale
make_signif_boxplot(Dens_Tot_P4_mod, "Condition")

2.3 Model fitting & diagnostics

Here, we chose to model Dens_Tot, which is a strictly positive continuous measure, with a Gamma family. We use a random intercept per Mouse to account for pseudo-replication.

Dens_Tot_P8_mod <- glmmTMB(
  Dens_Tot ~ Condition * Z + (1 | Mouse),
  family = Gamma("log"),
  data = filter(casp_data$clean, Stage == "P8"),
  REML = TRUE
)

2.3.1 Residual diagnostics

Checking the model’s quality of fit through the behavior of its residuals:

check_model(Dens_Tot_P8_mod, check = c("homogeneity", "qq", "reqq", "pp_check"), detrend = FALSE)

make_acf_plot(Dens_Tot_P8_mod)

2.3.2 Predictive checks

Checking the model’s quality of fit by emulate Bayesian Posterior Predictive Checks (PPC): we simulate predictions from the model and plot how accurately they match the observed data, or statistics of the observed data:

Dens_Tot_P8_mod_dharma <- simulateResiduals(Dens_Tot_P8_mod, plot = FALSE, n = 300, seed = getOption("seed"))
Dens_Tot_P8_mod_dharma_t <- t(Dens_Tot_P8_mod_dharma$simulatedResponse)
ppc_plots(Dens_Tot_P8_mod, simulations = Dens_Tot_P8_mod_dharma_t, term = "Condition", is_count = FALSE)

ppc_stat_plots(Dens_Tot_P8_mod, simulations = Dens_Tot_P8_mod_dharma_t, term = "Condition")

2.3.3 Potential outliers

According to the fitted model, the following observations are potential outliers:

✔ No potential outliers were reported.

2.4 Model analysis

2.4.1 Model parameters

(parameters(
    Dens_Tot_P8_mod, component = "conditional", effects = "fixed",
    exponentiate = should_exp(Dens_Tot_P8_mod), p_adjust = "none", summary = TRUE, digits = 3
  )
  |> print_html() 
  |> tab_header(title = NULL)
)
Parameter Coefficient SE 95% CI z p
(Intercept) 241.409 42.202 (171.376, 340.060) 31.385 < .001
Condition1 0.769 0.132 (0.549, 1.076) -1.532 0.126
Z1 1.195 0.280 (0.756, 1.891) 0.762 0.446
Z2 0.747 0.183 (0.462, 1.208) -1.190 0.234
Condition1 × Z1 1.079 0.223 (0.720, 1.617) 0.367 0.713
Condition1 × Z2 1.070 0.261 (0.663, 1.726) 0.277 0.782
Model: Dens_Tot ~ Condition * Z (32 Observations)
Residual standard deviation: 0.821 (df = 30)
Conditional R2: 0.153; Marginal R2: 0.144

2.4.2 Marginal means

emmeans(Dens_Tot_P8_mod, specs = "Condition", type = "response") |> 
  as.data.frame() |> 
  gt()
Condition response SE df lower.CL upper.CL
N 185.6 46.64 30 111.1 310.1
IH 314.0 74.90 30 192.9 511.1
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

2.4.3 Contrasts

emmeans(Dens_Tot_P8_mod, specs = "Condition", type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE) |> 
  as.data.frame() |> 
  gt()
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.591 0.2029 30 0.2931 1.192 1 -1.532 0.136
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale
make_signif_boxplot(Dens_Tot_P8_mod, "Condition")

3 Area of EGL (μm²)

3.1 Model fitting & diagnostics

Here, we chose to model A_EGL, which is a strictly positive continuous measure, with a Gamma family. We use a random intercept per Mouse to account for pseudo-replication.

A_EGL_P4_mod <- glmmTMB(
  A_EGL ~ Condition * Z + offset(log(A_Tot)) + (1 | Mouse),
  family = Gamma("log"),
  data = filter(casp_data$clean, Stage == "P4"),
  REML = TRUE
)

3.1.1 Residual diagnostics

Checking the model’s quality of fit through the behavior of its residuals:

check_model(A_EGL_P4_mod, check = c("homogeneity", "qq", "reqq", "pp_check"), detrend = FALSE)

make_acf_plot(A_EGL_P4_mod)

3.1.2 Predictive checks

Checking the model’s quality of fit by emulate Bayesian Posterior Predictive Checks (PPC): we simulate predictions from the model and plot how accurately they match the observed data, or statistics of the observed data:

A_EGL_P4_mod_dharma <- simulateResiduals(A_EGL_P4_mod, plot = FALSE, n = 300, seed = getOption("seed"))
A_EGL_P4_mod_dharma_t <- t(A_EGL_P4_mod_dharma$simulatedResponse)
ppc_plots(A_EGL_P4_mod, simulations = A_EGL_P4_mod_dharma_t, term = "Condition", is_count = FALSE)

ppc_stat_plots(A_EGL_P4_mod, simulations = A_EGL_P4_mod_dharma_t, term = "Condition")

3.1.3 Potential outliers

According to the fitted model, the following observations are potential outliers:

✔ No potential outliers were reported.

3.2 Model analysis

3.2.1 Model parameters

(parameters(
    A_EGL_P4_mod, component = "conditional", effects = "fixed",
    exponentiate = should_exp(A_EGL_P4_mod), p_adjust = "none", summary = TRUE, digits = 3
  )
  |> print_html() 
  |> tab_header(title = NULL)
)
Random effect variances not available. Returned R2 does not account for random effects.
Parameter Coefficient SE 95% CI z p
(Intercept) 0.152 0.010 (0.134, 0.173) -28.349 < .001
Condition1 1.213 0.080 (1.065, 1.381) 2.903 0.004
Z1 0.892 0.070 (0.765, 1.040) -1.461 0.144
Z2 0.918 0.105 (0.733, 1.149) -0.751 0.453
Condition1 × Z1 0.996 0.078 (0.854, 1.161) -0.052 0.959
Condition1 × Z2 1.040 0.119 (0.831, 1.302) 0.344 0.731
Model: A_EGL ~ Condition * Z + offset(log(A_Tot)) (34 Observations)
Residual standard deviation: 0.290 (df = 32)
Conditional R2: ; Marginal R2: 0.365

3.2.2 Marginal means

emmeans(A_EGL_P4_mod, specs = "Condition", type = "response") |> 
  as.data.frame() |> 
  gt()
Condition response SE df lower.CL upper.CL
N 0.5235 0.03486 32 0.4571 0.5995
IH 0.3561 0.04090 32 0.2818 0.4499
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

3.2.3 Contrasts

emmeans(A_EGL_P4_mod, specs = "Condition", type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE) |> 
  as.data.frame() |> 
  gt()
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.47 0.1952 32 1.122 1.927 1 2.903 0.006646
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale
make_signif_boxplot(A_EGL_P4_mod, "Condition")

3.3 Model fitting & diagnostics

Here, we chose to model A_EGL, which is a strictly positive continuous measure, with a Gamma family. We use a random intercept per Mouse to account for pseudo-replication.

A_EGL_P8_mod <- glmmTMB(
  A_EGL ~ Condition * Z + offset(log(A_Tot)) + (1 | Mouse),
  family = Gamma("log"),
  data = filter(casp_data$clean, Stage == "P8"),
  REML = TRUE
)

3.3.1 Residual diagnostics

Checking the model’s quality of fit through the behavior of its residuals:

check_model(A_EGL_P8_mod, check = c("homogeneity", "qq", "reqq", "pp_check"), detrend = FALSE)

make_acf_plot(A_EGL_P8_mod)

3.3.2 Predictive checks

Checking the model’s quality of fit by emulate Bayesian Posterior Predictive Checks (PPC): we simulate predictions from the model and plot how accurately they match the observed data, or statistics of the observed data:

A_EGL_P8_mod_dharma <- simulateResiduals(A_EGL_P8_mod, plot = FALSE, n = 300, seed = getOption("seed"))
A_EGL_P8_mod_dharma_t <- t(A_EGL_P8_mod_dharma$simulatedResponse)
ppc_plots(A_EGL_P8_mod, simulations = A_EGL_P8_mod_dharma_t, term = "Condition", is_count = FALSE)

ppc_stat_plots(A_EGL_P8_mod, simulations = A_EGL_P8_mod_dharma_t, term = "Condition")

3.3.3 Potential outliers

According to the fitted model, the following observations are potential outliers:

✔ No potential outliers were reported.

3.4 Model analysis

3.4.1 Model parameters

(parameters(
    A_EGL_P8_mod, component = "conditional", effects = "fixed",
    exponentiate = should_exp(A_EGL_P8_mod), p_adjust = "none", summary = TRUE, digits = 3
  )
  |> print_html() 
  |> tab_header(title = NULL)
)
Parameter Coefficient SE 95% CI z p
(Intercept) 0.255 0.015 (0.227, 0.287) -23.017 < .001
Condition1 1.041 0.062 (0.926, 1.169) 0.671 0.502
Z1 0.988 0.047 (0.900, 1.085) -0.245 0.807
Z2 0.900 0.049 (0.809, 1.001) -1.946 0.052
Condition1 × Z1 1.043 0.050 (0.950, 1.146) 0.883 0.377
Condition1 × Z2 1.057 0.057 (0.951, 1.175) 1.027 0.304
Model: A_EGL ~ Condition * Z + offset(log(A_Tot)) (32 Observations)
Residual standard deviation: 0.161 (df = 30)
Conditional R2: 0.548; Marginal R2: 0.210

3.4.2 Marginal means

emmeans(A_EGL_P8_mod, specs = "Condition", type = "response") |> 
  as.data.frame() |> 
  gt()
Condition response SE df lower.CL upper.CL
N 1.0238 0.09010 30 0.8554 1.225
IH 0.9455 0.07521 30 0.8037 1.112
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

3.4.3 Contrasts

emmeans(A_EGL_P8_mod, specs = "Condition", type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE) |> 
  as.data.frame() |> 
  gt()
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.083 0.1285 30 0.8499 1.38 1 0.6709 0.5074
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale
make_signif_boxplot(A_EGL_P8_mod, "Condition")

4 Area of ML and PL (μm²)

4.1 Model fitting & diagnostics

Here, we chose to model A_ML_PCL, which is a strictly positive continuous measure, with a Gamma family. We use a random intercept per Mouse to account for pseudo-replication.

A_ML_PCL_P4_mod <- glmmTMB(
  A_ML_PCL ~ Condition * Z + offset(log(A_Tot)) + (1 | Mouse),
  family = Gamma("log"),
  data = filter(casp_data$clean, Stage == "P4"),
  REML = TRUE
)

4.1.1 Residual diagnostics

Checking the model’s quality of fit through the behavior of its residuals:

check_model(A_ML_PCL_P4_mod, check = c("homogeneity", "qq", "reqq", "pp_check"), detrend = FALSE)

make_acf_plot(A_ML_PCL_P4_mod)

4.1.2 Predictive checks

Checking the model’s quality of fit by emulate Bayesian Posterior Predictive Checks (PPC): we simulate predictions from the model and plot how accurately they match the observed data, or statistics of the observed data:

A_ML_PCL_P4_mod_dharma <- simulateResiduals(A_ML_PCL_P4_mod, plot = FALSE, n = 300, seed = getOption("seed"))
A_ML_PCL_P4_mod_dharma_t <- t(A_ML_PCL_P4_mod_dharma$simulatedResponse)
ppc_plots(A_ML_PCL_P4_mod, simulations = A_ML_PCL_P4_mod_dharma_t, term = "Condition", is_count = FALSE)

ppc_stat_plots(A_ML_PCL_P4_mod, simulations = A_ML_PCL_P4_mod_dharma_t, term = "Condition")

4.1.3 Potential outliers

According to the fitted model, the following observations are potential outliers:

However, we have already removed the data points we had a biological/theoretical reason to believe to be outliers before fitting our model.

4.2 Model analysis

4.2.1 Model parameters

(parameters(
    A_ML_PCL_P4_mod, component = "conditional", effects = "fixed",
    exponentiate = should_exp(A_ML_PCL_P4_mod), p_adjust = "none", summary = TRUE, digits = 3
  )
  |> print_html() 
  |> tab_header(title = NULL)
)
Random effect variances not available. Returned R2 does not account for random effects.
Parameter Coefficient SE 95% CI z p
(Intercept) 0.125 0.007 (0.113, 0.139) -39.101 < .001
Condition1 1.006 0.053 (0.907, 1.116) 0.113 0.910
Z1 0.924 0.058 (0.817, 1.045) -1.253 0.210
Z2 0.900 0.083 (0.752, 1.078) -1.143 0.253
Condition1 × Z1 0.999 0.063 (0.883, 1.129) -0.021 0.983
Condition1 × Z2 1.115 0.102 (0.932, 1.335) 1.187 0.235
Model: A_ML_PCL ~ Condition * Z + offset(log(A_Tot)) (34 Observations)
Residual standard deviation: 0.232 (df = 32)
Conditional R2: ; Marginal R2: 0.229

4.2.2 Marginal means

emmeans(A_ML_PCL_P4_mod, specs = "Condition", type = "response") |> 
  as.data.frame() |> 
  gt()
Condition response SE df lower.CL upper.CL
N 0.3574 0.01904 32 0.3206 0.3984
IH 0.3531 0.03246 32 0.2928 0.4258
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

4.2.3 Contrasts

emmeans(A_ML_PCL_P4_mod, specs = "Condition", type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE) |> 
  as.data.frame() |> 
  gt()
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.012 0.1075 32 0.8151 1.257 1 0.113 0.9108
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale
make_signif_boxplot(A_ML_PCL_P4_mod, "Condition")

4.3 Model fitting & diagnostics

Here, we chose to model A_ML_PCL, which is a strictly positive continuous measure, with a Gamma family. We use a random intercept per Mouse to account for pseudo-replication.

A_ML_PCL_P8_mod <- glmmTMB(
  A_ML_PCL ~ Condition * Z + offset(log(A_Tot)) + (1 | Mouse),
  family = Gamma("log"),
  data = filter(casp_data$clean, Stage == "P8"),
  REML = TRUE
)

4.3.1 Residual diagnostics

Checking the model’s quality of fit through the behavior of its residuals:

check_model(A_ML_PCL_P8_mod, check = c("homogeneity", "qq", "reqq", "pp_check"), detrend = FALSE)

make_acf_plot(A_ML_PCL_P8_mod)

4.3.2 Predictive checks

Checking the model’s quality of fit by emulate Bayesian Posterior Predictive Checks (PPC): we simulate predictions from the model and plot how accurately they match the observed data, or statistics of the observed data:

A_ML_PCL_P8_mod_dharma <- simulateResiduals(A_ML_PCL_P8_mod, plot = FALSE, n = 300, seed = getOption("seed"))
A_ML_PCL_P8_mod_dharma_t <- t(A_ML_PCL_P8_mod_dharma$simulatedResponse)
ppc_plots(A_ML_PCL_P8_mod, simulations = A_ML_PCL_P8_mod_dharma_t, term = "Condition", is_count = FALSE)

ppc_stat_plots(A_ML_PCL_P8_mod, simulations = A_ML_PCL_P8_mod_dharma_t, term = "Condition")

4.3.3 Potential outliers

According to the fitted model, the following observations are potential outliers:

✔ No potential outliers were reported.

4.4 Model analysis

4.4.1 Model parameters

(parameters(
    A_ML_PCL_P8_mod, component = "conditional", effects = "fixed",
    exponentiate = should_exp(A_ML_PCL_P8_mod), p_adjust = "none", summary = TRUE, digits = 3
  )
  |> print_html() 
  |> tab_header(title = NULL)
)
Parameter Coefficient SE 95% CI z p
(Intercept) 0.183 0.008 (0.168, 0.199) -39.742 < .001
Condition1 1.025 0.043 (0.944, 1.114) 0.588 0.556
Z1 0.915 0.041 (0.838, 1.000) -1.971 0.049
Z2 0.845 0.044 (0.762, 0.936) -3.217 0.001
Condition1 × Z1 0.932 0.042 (0.854, 1.017) -1.578 0.115
Condition1 × Z2 1.019 0.054 (0.919, 1.130) 0.359 0.720
Model: A_ML_PCL ~ Condition * Z + offset(log(A_Tot)) (32 Observations)
Residual standard deviation: 0.166 (df = 30)
Conditional R2: 0.491; Marginal R2: 0.406

4.4.2 Marginal means

emmeans(A_ML_PCL_P8_mod, specs = "Condition", type = "response") |> 
  as.data.frame() |> 
  gt()
Condition response SE df lower.CL upper.CL
N 0.722 0.04554 30 0.6348 0.8213
IH 0.687 0.03913 30 0.6116 0.7718
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

4.4.3 Contrasts

emmeans(A_ML_PCL_P8_mod, specs = "Condition", type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE) |> 
  as.data.frame() |> 
  gt()
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.051 0.08874 30 0.8845 1.249 1 0.5885 0.5606
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale
make_signif_boxplot(A_ML_PCL_P8_mod, "Condition")

5 Area of IGL (μm²)

5.1 Model fitting & diagnostics

Here, we chose to model A_IGL, which is a strictly positive continuous measure, with a Gamma family. We use a random intercept per Mouse to account for pseudo-replication.

A_IGL_P4_mod <- glmmTMB(
  A_IGL ~ Condition * Z + offset(log(A_Tot)) + (1 | Mouse),
  family = Gamma("log"),
  data = filter(casp_data$clean, Stage == "P4"),
  REML = TRUE
)

5.1.1 Residual diagnostics

Checking the model’s quality of fit through the behavior of its residuals:

check_model(A_IGL_P4_mod, check = c("homogeneity", "qq", "reqq", "pp_check"), detrend = FALSE)

make_acf_plot(A_IGL_P4_mod)

5.1.2 Predictive checks

Checking the model’s quality of fit by emulate Bayesian Posterior Predictive Checks (PPC): we simulate predictions from the model and plot how accurately they match the observed data, or statistics of the observed data:

A_IGL_P4_mod_dharma <- simulateResiduals(A_IGL_P4_mod, plot = FALSE, n = 300, seed = getOption("seed"))
A_IGL_P4_mod_dharma_t <- t(A_IGL_P4_mod_dharma$simulatedResponse)
ppc_plots(A_IGL_P4_mod, simulations = A_IGL_P4_mod_dharma_t, term = "Condition", is_count = FALSE)

ppc_stat_plots(A_IGL_P4_mod, simulations = A_IGL_P4_mod_dharma_t, term = "Condition")

5.1.3 Potential outliers

According to the fitted model, the following observations are potential outliers:

✔ No potential outliers were reported.

5.2 Model analysis

5.2.1 Model parameters

(parameters(
    A_IGL_P4_mod, component = "conditional", effects = "fixed",
    exponentiate = should_exp(A_IGL_P4_mod), p_adjust = "none", summary = TRUE, digits = 3
  )
  |> print_html() 
  |> tab_header(title = NULL)
)
Random effect variances not available. Returned R2 does not account for random effects.
Parameter Coefficient SE 95% CI z p
(Intercept) 0.428 0.014 (0.401, 0.456) -25.829 < .001
Condition1 1.084 0.036 (1.017, 1.157) 2.464 0.014
Z1 0.936 0.036 (0.867, 1.010) -1.709 0.087
Z2 0.976 0.055 (0.874, 1.091) -0.419 0.675
Condition1 × Z1 0.999 0.039 (0.926, 1.078) -0.016 0.987
Condition1 × Z2 0.974 0.055 (0.871, 1.088) -0.471 0.638
Model: A_IGL ~ Condition * Z + offset(log(A_Tot)) (34 Observations)
Residual standard deviation: 0.143 (df = 32)
Conditional R2: ; Marginal R2: 0.375

5.2.2 Marginal means

emmeans(A_IGL_P4_mod, specs = "Condition", type = "response") |> 
  as.data.frame() |> 
  gt()
Condition response SE df lower.CL upper.CL
N 1.315 0.04337 32 1.2295 1.406
IH 1.118 0.06362 32 0.9958 1.256
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

5.2.3 Contrasts

emmeans(A_IGL_P4_mod, specs = "Condition", type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE) |> 
  as.data.frame() |> 
  gt()
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.176 0.07734 32 1.029 1.345 1 2.464 0.01928
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale
make_signif_boxplot(A_IGL_P4_mod, "Condition")

5.3 Model fitting & diagnostics

Here, we chose to model A_IGL, which is a strictly positive continuous measure, with a Gamma family. We use a random intercept per Mouse to account for pseudo-replication.

A_IGL_P8_mod <- glmmTMB(
  A_IGL ~ Condition * Z + offset(log(A_Tot)) + (1 | Mouse),
  family = Gamma("log"),
  data = filter(casp_data$clean, Stage == "P8"),
  REML = TRUE
)

5.3.1 Residual diagnostics

Checking the model’s quality of fit through the behavior of its residuals:

check_model(A_IGL_P8_mod, check = c("homogeneity", "qq", "reqq", "pp_check"), detrend = FALSE)

make_acf_plot(A_IGL_P8_mod)

5.3.2 Predictive checks

Checking the model’s quality of fit by emulate Bayesian Posterior Predictive Checks (PPC): we simulate predictions from the model and plot how accurately they match the observed data, or statistics of the observed data:

A_IGL_P8_mod_dharma <- simulateResiduals(A_IGL_P8_mod, plot = FALSE, n = 300, seed = getOption("seed"))
A_IGL_P8_mod_dharma_t <- t(A_IGL_P8_mod_dharma$simulatedResponse)
ppc_plots(A_IGL_P8_mod, simulations = A_IGL_P8_mod_dharma_t, term = "Condition", is_count = FALSE)

ppc_stat_plots(A_IGL_P8_mod, simulations = A_IGL_P8_mod_dharma_t, term = "Condition")

5.3.3 Potential outliers

According to the fitted model, the following observations are potential outliers:

✔ No potential outliers were reported.

5.4 Model analysis

5.4.1 Model parameters

(parameters(
    A_IGL_P8_mod, component = "conditional", effects = "fixed",
    exponentiate = should_exp(A_IGL_P8_mod), p_adjust = "none", summary = TRUE, digits = 3
  )
  |> print_html() 
  |> tab_header(title = NULL)
)
Random effect variances not available. Returned R2 does not account for random effects.
Parameter Coefficient SE 95% CI z p
(Intercept) 0.415 0.011 (0.393, 0.438) -32.257 < .001
Condition1 0.957 0.026 (0.907, 1.009) -1.625 0.104
Z1 0.885 0.029 (0.830, 0.944) -3.723 < .001
Z2 1.134 0.044 (1.051, 1.225) 3.221 0.001
Condition1 × Z1 0.969 0.032 (0.909, 1.034) -0.948 0.343
Condition1 × Z2 0.968 0.038 (0.896, 1.045) -0.830 0.406
Model: A_IGL ~ Condition * Z + offset(log(A_Tot)) (32 Observations)
Residual standard deviation: 0.133 (df = 30)
Conditional R2: ; Marginal R2: 0.448

5.4.2 Marginal means

emmeans(A_IGL_P8_mod, specs = "Condition", type = "response") |> 
  as.data.frame() |> 
  gt()
Condition response SE df lower.CL upper.CL
N 1.529 0.06124 30 1.409 1.660
IH 1.671 0.06192 30 1.549 1.802
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

5.4.3 Contrasts

emmeans(A_IGL_P8_mod, specs = "Condition", type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE) |> 
  as.data.frame() |> 
  gt()
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.9152 0.04993 30 0.8187 1.023 1 -1.625 0.1146
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale
make_signif_boxplot(A_IGL_P8_mod, "Condition")

6 Area of WM (μm²)

6.1 Model fitting & diagnostics

Here, we chose to model A_WM, which is a strictly positive continuous measure, with a Gamma family. We use a random intercept per Mouse to account for pseudo-replication.

A_WM_P4_mod <- glmmTMB(
  A_WM ~ Condition * Z + offset(log(A_Tot)) + (1 | Mouse),
  family = Gamma("log"),
  data = filter(casp_data$clean, Stage == "P4"),
  REML = TRUE
)

6.1.1 Residual diagnostics

Checking the model’s quality of fit through the behavior of its residuals:

check_model(A_WM_P4_mod, check = c("homogeneity", "qq", "reqq", "pp_check"), detrend = FALSE)

make_acf_plot(A_WM_P4_mod)

6.1.2 Predictive checks

Checking the model’s quality of fit by emulate Bayesian Posterior Predictive Checks (PPC): we simulate predictions from the model and plot how accurately they match the observed data, or statistics of the observed data:

A_WM_P4_mod_dharma <- simulateResiduals(A_WM_P4_mod, plot = FALSE, n = 300, seed = getOption("seed"))
A_WM_P4_mod_dharma_t <- t(A_WM_P4_mod_dharma$simulatedResponse)
ppc_plots(A_WM_P4_mod, simulations = A_WM_P4_mod_dharma_t, term = "Condition", is_count = FALSE)

ppc_stat_plots(A_WM_P4_mod, simulations = A_WM_P4_mod_dharma_t, term = "Condition")

6.1.3 Potential outliers

According to the fitted model, the following observations are potential outliers:

✔ No potential outliers were reported.

6.2 Model analysis

6.2.1 Model parameters

(parameters(
    A_WM_P4_mod, component = "conditional", effects = "fixed",
    exponentiate = should_exp(A_WM_P4_mod), p_adjust = "none", summary = TRUE, digits = 3
  )
  |> print_html() 
  |> tab_header(title = NULL)
)
Random effect variances not available. Returned R2 does not account for random effects.
Parameter Coefficient SE 95% CI z p
(Intercept) 0.268 0.033 (0.210, 0.341) -10.640 < .001
Condition1 0.781 0.097 (0.612, 0.995) -1.998 0.046
Z1 1.268 0.186 (0.952, 1.690) 1.624 0.104
Z2 1.186 0.254 (0.780, 1.803) 0.797 0.426
Condition1 × Z1 1.079 0.158 (0.810, 1.437) 0.519 0.604
Condition1 × Z2 1.034 0.221 (0.680, 1.573) 0.157 0.875
Model: A_WM ~ Condition * Z + offset(log(A_Tot)) (34 Observations)
Residual standard deviation: 0.540 (df = 32)
Conditional R2: ; Marginal R2: 0.350

6.2.2 Marginal means

emmeans(A_WM_P4_mod, specs = "Condition", type = "response") |> 
  as.data.frame() |> 
  gt()
Condition response SE df lower.CL upper.CL
N 0.5923 0.07361 32 0.4599 0.763
IH 0.9719 0.20833 32 0.6280 1.504
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

6.2.3 Contrasts

emmeans(A_WM_P4_mod, specs = "Condition", type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE) |> 
  as.data.frame() |> 
  gt()
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.6095 0.151 32 0.3679 1.01 1 -1.998 0.05423
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale
make_signif_boxplot(A_WM_P4_mod, "Condition")

6.3 Model fitting & diagnostics

Here, we chose to model A_WM, which is a strictly positive continuous measure, with a Gamma family. We use a random intercept per Mouse to account for pseudo-replication.

A_WM_P8_mod <- glmmTMB(
  A_WM ~ Condition * Z + offset(log(A_Tot)) + (1 | Mouse),
  family = Gamma("log"),
  data = filter(casp_data$clean, Stage == "P8"),
  REML = TRUE
)

6.3.1 Residual diagnostics

Checking the model’s quality of fit through the behavior of its residuals:

check_model(A_WM_P8_mod, check = c("homogeneity", "qq", "reqq", "pp_check"), detrend = FALSE)

make_acf_plot(A_WM_P8_mod)

6.3.2 Predictive checks

Checking the model’s quality of fit by emulate Bayesian Posterior Predictive Checks (PPC): we simulate predictions from the model and plot how accurately they match the observed data, or statistics of the observed data:

A_WM_P8_mod_dharma <- simulateResiduals(A_WM_P8_mod, plot = FALSE, n = 300, seed = getOption("seed"))
A_WM_P8_mod_dharma_t <- t(A_WM_P8_mod_dharma$simulatedResponse)
ppc_plots(A_WM_P8_mod, simulations = A_WM_P8_mod_dharma_t, term = "Condition", is_count = FALSE)

ppc_stat_plots(A_WM_P8_mod, simulations = A_WM_P8_mod_dharma_t, term = "Condition")

6.3.3 Potential outliers

According to the fitted model, the following observations are potential outliers:

✔ No potential outliers were reported.

6.4 Model analysis

6.4.1 Model parameters

(parameters(
    A_WM_P8_mod, component = "conditional", effects = "fixed",
    exponentiate = should_exp(A_WM_P8_mod), p_adjust = "none", summary = TRUE, digits = 3
  )
  |> print_html() 
  |> tab_header(title = NULL)
)
Parameter Coefficient SE 95% CI z p
(Intercept) 0.114 0.010 (0.096, 0.136) -24.865 < .001
Condition1 0.929 0.081 (0.783, 1.101) -0.853 0.394
Z1 1.794 0.150 (1.523, 2.114) 6.984 < .001
Z2 1.229 0.121 (1.014, 1.491) 2.099 0.036
Condition1 × Z1 1.157 0.096 (0.983, 1.361) 1.757 0.079
Condition1 × Z2 1.075 0.108 (0.883, 1.308) 0.718 0.473
Model: A_WM ~ Condition * Z + offset(log(A_Tot)) (32 Observations)
Residual standard deviation: 0.308 (df = 30)
Conditional R2: 0.748; Marginal R2: 0.677

6.4.2 Marginal means

emmeans(A_WM_P8_mod, specs = "Condition", type = "response") |> 
  as.data.frame() |> 
  gt()
Condition response SE df lower.CL upper.CL
N 0.4087 0.05311 30 0.3134 0.5329
IH 0.4740 0.05498 30 0.3741 0.6008
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

6.4.3 Contrasts

emmeans(A_WM_P8_mod, specs = "Condition", type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE) |> 
  as.data.frame() |> 
  gt()
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.8621 0.1499 30 0.6045 1.23 1 -0.8531 0.4004
- Results are averaged over the levels of: Z
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale
make_signif_boxplot(A_WM_P8_mod, "Condition")

Back to top