18  Adults (Platforms)

Data

Description

Variable Description
Mouse

Mouse unique identifier

Condition

Hypoxia condition: Normoxia (N) vs Intermittent Hypoxia (IH)

Percent_Distance_Target

Percentage of distance covered in the target quadrant over the total distance covered

Percent_Time_Target

Percentage of time spent in the target quadrant over the total time of the test

Act_Mean_Speed

Actimetry Mean Speed (m/s)

Act_Distance

Actimetry Distance (m)

Crossing_Time

Crossing Time (s)

Nbr_Missteps

Number of Missteps

Rearing_Time

Rearing Time

Grooming_Time

Grooming Time

Open_Arms_Time

Time in Open Arms

Closed_Arms_Time

Time in Closed Arms

Nbr_Entry_Open

Number of Entries in Open Arms

Nbr_Entry_Closed

Number of Entries in Closed Arms

Variable Description
Mouse

Mouse unique identifier

Condition

Hypoxia condition: Normoxia (N) vs Intermittent Hypoxia (IH)

Percent_Distance_Target

Percentage of distance covered in the target quadrant over the total distance covered

Percent_Time_Target

Percentage of time spent in the target quadrant over the total time of the test

Act_Mean_Speed

Actimetry Mean Speed (m/s)

Act_Distance

Actimetry Distance (m)

Crossing_Time

Crossing Time (s)

Nbr_Missteps

Number of Missteps

Rearing_Time

Rearing Time

Grooming_Time

Grooming Time

Open_Arms_Time

Time in Open Arms

Closed_Arms_Time

Time in Closed Arms

Nbr_Entry_Open

Number of Entries in Open Arms

Nbr_Entry_Closed

Number of Entries in Closed Arms

Correlations

18.1 Distance % covered in the target quadrant

18.1.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 0.511 0.13 0.017 0.255 0.12 0.33 0.79 0.867 0.835 14
IH 0.392 0.108 0.012 0.275 0.118 0.12 0.49 −2.009 4.753 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 0.511 0.13 0.017 0.255 0.12 0.33 0.79 0.867 0.835 14
IH 0.392 0.108 0.012 0.275 0.118 0.12 0.49 −2.009 4.753 10

18.1.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Percent_Distance_Target ~ Condition, data = data, 
    family = beta_family("logit"), REML = TRUE, ziformula = ~0, 
    dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-23.27 -22.07 -19.74 0.44 0.12 14.42
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-23.27 -22.07 -19.74 0.44 0.12 14.42

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

Model call:

```{r}
glmmTMB(formula = Percent_Distance_Target ~ Condition, data = data, 
    family = gaussian("log"), REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-22.59 -21.39 -19.06 0.02 0.12 0.12
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-22.59 -21.39 -19.06 0.02 0.12 0.12

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

18.1.3 Effects Analysis

```{r}
glmmTMB(formula = Percent_Distance_Target ~ Condition, data = data, 
    family = beta_family("logit"), REML = TRUE, ziformula = ~0, 
    dispformula = ~1)
```

18.1.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 1.054 0.143 (0.81, 1.38) 0.389 0.697
Condition2 0.604 0.129 (0.40, 0.92) -2.359 0.018 *
Model: Percent_Distance_Target ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 1.054 0.143 (0.81, 1.38) 0.389 0.697
Condition2 0.604 0.129 (0.40, 0.92) -2.359 0.018 *
Model: Percent_Distance_Target ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 5.57 1 0.020 *
term statistic df p.value
Condition 5.57 1 0.020 *

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 -23.84 -21.48 13.92 -27.84
mod_full 3 -27.27 -23.74 16.63 -33.27 5.43 1 0.020 *
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 -23.84 -21.48 13.92 -27.84
mod_full 3 -27.27 -23.74 16.63 -33.27 5.43 1 0.020 *
Important

Our LRT() method removes the predictor plus all its interactions

18.1.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition response SE df lower.CL upper.CL
N 0.513 0.034 23 0.443 0.583
IH 0.389 0.039 23 0.312 0.472
Condition response SE df lower.CL upper.CL
N 0.513 0.034 23 0.443 0.583
IH 0.389 0.039 23 0.312 0.472
- Confidence level used: 0.95
- Intervals are back-transformed from the logit scale

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast odds.ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.655 0.353 23 1.064 2.574 1 2.359 0.027 *
contrast odds.ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.655 0.353 23 1.064 2.574 1 2.359 0.027 *
- Confidence level used: 0.95
- Intervals are back-transformed from the log odds ratio scale
- Tests are performed on the log odds ratio scale

Boxplot:


18.2 Time % spent in the target quadrant

18.2.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 0.513 0.156 0.024 0.304 0.182 0.22 0.78 −0.056 −0.115 14
IH 0.384 0.115 0.013 0.301 0.13 0.11 0.52 −1.448 3.271 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 0.513 0.156 0.024 0.304 0.182 0.22 0.78 −0.056 −0.115 14
IH 0.384 0.115 0.013 0.301 0.13 0.11 0.52 −1.448 3.271 10

18.2.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Percent_Time_Target ~ Condition, data = data, 
    family = beta_family("logit"), REML = TRUE, ziformula = ~0, 
    dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-17.78 -16.58 -14.24 0.45 0.13 10.95
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-17.78 -16.58 -14.24 0.45 0.13 10.95

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

No potential outliers detected by the model.

Model call:

```{r}
glmmTMB(formula = Percent_Time_Target ~ Condition, data = data, 
    family = gaussian("log"), REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-16.13 -14.93 -12.60 0.02 0.13 0.14
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-16.13 -14.93 -12.60 0.02 0.13 0.14

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

18.2.3 Effects Analysis

```{r}
glmmTMB(formula = Percent_Time_Target ~ Condition, data = data, 
    family = beta_family("logit"), REML = TRUE, ziformula = ~0, 
    dispformula = ~1)
```

18.2.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 1.052 0.162 (0.78, 1.42) 0.331 0.741
Condition2 0.590 0.143 (0.37, 0.95) -2.176 0.030 *
Model: Percent_Time_Target ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 1.052 0.162 (0.78, 1.42) 0.331 0.741
Condition2 0.590 0.143 (0.37, 0.95) -2.176 0.030 *
Model: Percent_Time_Target ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 4.73 1 0.030 *
term statistic df p.value
Condition 4.73 1 0.030 *

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 -18.57 -16.21 11.28 -22.57
mod_full 3 -21.26 -17.72 13.63 -27.26 4.69 1 0.030 *
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 -18.57 -16.21 11.28 -22.57
mod_full 3 -21.26 -17.72 13.63 -27.26 4.69 1 0.030 *
Important

Our LRT() method removes the predictor plus all its interactions

18.2.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition response SE df lower.CL upper.CL
N 0.513 0.039 23 0.433 0.592
IH 0.383 0.044 23 0.296 0.478
Condition response SE df lower.CL upper.CL
N 0.513 0.039 23 0.433 0.592
IH 0.383 0.044 23 0.296 0.478
- Confidence level used: 0.95
- Intervals are back-transformed from the logit scale

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast odds.ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.696 0.411 23 1.026 2.801 1 2.176 0.040 *
contrast odds.ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.696 0.411 23 1.026 2.801 1 2.176 0.040 *
- Confidence level used: 0.95
- Intervals are back-transformed from the log odds ratio scale
- Tests are performed on the log odds ratio scale

Boxplot:


18.3 Actimetry Mean Speed

18.3.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 0.042 0.014 0 0.326 0.02 0.026 0.068 0.848 −0.429 14
IH 0.046 0.013 0 0.289 0.021 0.022 0.06 −1.039 −0.145 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 0.042 0.014 0 0.326 0.02 0.026 0.068 0.848 −0.429 14
IH 0.046 0.013 0 0.289 0.021 0.022 0.06 −1.039 −0.145 10

18.3.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Act_Mean_Speed ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-128.97 -127.77 -125.44 2.62e-03 0.01 0.32
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-128.97 -127.77 -125.44 2.62e-03 0.01 0.32

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

Model call:

```{r}
glmmTMB(formula = Act_Mean_Speed ~ Condition, data = data, family = gaussian("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-128.60 -127.40 -125.07 2.62e-03 0.01 0.01
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
-128.60 -127.40 -125.07 2.62e-03 0.01 0.01

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

18.3.3 Effects Analysis

```{r}
glmmTMB(formula = Act_Mean_Speed ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

18.3.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 0.042 0.004 (0.04, 0.05) -37.342 < .001
Condition2 1.107 0.146 (0.85, 1.43) 0.771 0.441
Model: Act_Mean_Speed ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 0.042 0.004 (0.04, 0.05) -37.342 < .001
Condition2 1.107 0.146 (0.85, 1.43) 0.771 0.441
Model: Act_Mean_Speed ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 0.59 1 0.440
term statistic df p.value
Condition 0.59 1 0.440

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 -136.26 -133.90 70.13 -140.26
mod_full 3 -134.90 -131.36 70.45 -140.90 0.64 1 0.420
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 -136.26 -133.90 70.13 -140.26
mod_full 3 -134.90 -131.36 70.45 -140.90 0.64 1 0.420
Important

Our LRT() method removes the predictor plus all its interactions

18.3.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition response SE df lower.CL upper.CL
N 0.042 0.004 23 0.035 0.05
IH 0.046 0.005 23 0.037 0.057
Condition response SE df lower.CL upper.CL
N 0.042 0.004 23 0.035 0.05
IH 0.046 0.005 23 0.037 0.057
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.903 0.119 23 0.688 1.187 1 −0.771 0.449
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.903 0.119 23 0.688 1.187 1 −0.771 0.449
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale

Boxplot:


18.4 Actimetry Distance

18.4.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 25.02 8.134 66.162 0.325 11.517 15.579 40.864 0.865 −0.388 14
IH 27.626 8.015 64.24 0.29 12.621 13.149 36.213 −1.033 −0.164 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 25.02 8.134 66.162 0.325 11.517 15.579 40.864 0.865 −0.388 14
IH 27.626 8.015 64.24 0.29 12.621 13.149 36.213 −1.033 −0.164 10

18.4.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Act_Distance ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
178.02 179.22 181.56 2.48e-03 7.74 0.32
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
178.02 179.22 181.56 2.48e-03 7.74 0.32

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

Model call:

```{r}
glmmTMB(formula = Act_Distance ~ Condition, data = data, family = gaussian("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
178.42 179.62 181.95 2.48e-03 7.74 8.09
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
178.42 179.62 181.95 2.48e-03 7.74 8.09

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

18.4.3 Effects Analysis

```{r}
glmmTMB(formula = Act_Distance ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

18.4.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 25.020 2.126 (21.18, 29.55) 37.893 < .001
Condition2 1.104 0.145 (0.85, 1.43) 0.753 0.452
Model: Act_Distance ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 25.020 2.126 (21.18, 29.55) 37.893 < .001
Condition2 1.104 0.145 (0.85, 1.43) 0.753 0.452
Model: Act_Distance ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 0.57 1 0.450
term statistic df p.value
Condition 0.57 1 0.450

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 170.70 173.05 -83.35 166.70
mod_full 3 172.09 175.62 -83.04 166.09 0.61 1 0.430
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 170.70 173.05 -83.35 166.70
mod_full 3 172.09 175.62 -83.04 166.09 0.61 1 0.430
Important

Our LRT() method removes the predictor plus all its interactions

18.4.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition response SE df lower.CL upper.CL
N 25.02 2.126 23 20.987 29.828
IH 27.626 2.777 23 22.438 34.012
Condition response SE df lower.CL upper.CL
N 25.02 2.126 23 20.987 29.828
IH 27.626 2.777 23 22.438 34.012
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.906 0.119 23 0.69 1.189 1 −0.753 0.459
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.906 0.119 23 0.69 1.189 1 −0.753 0.459
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale

Boxplot:


18.5 Crossing Time

18.5.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 11.718 4.781 22.858 0.408 5.866 6.573 24.883 1.743 3.632 14
IH 12.233 3.747 14.039 0.306 4.848 8.523 19.853 1.363 0.809 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 11.718 4.781 22.858 0.408 5.866 6.573 24.883 1.743 3.632 14
IH 12.233 3.747 14.039 0.306 4.848 8.523 19.853 1.363 0.809 10

18.5.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Crossing_Time ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
142.50 143.70 146.03 4.69e-04 4.20 0.33
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
142.50 143.70 146.03 4.69e-04 4.20 0.33

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

Model call:

```{r}
glmmTMB(formula = Crossing_Time ~ Condition, data = data, family = gaussian("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
148.37 149.57 151.91 4.69e-04 4.20 4.39
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
148.37 149.57 151.91 4.69e-04 4.20 4.39

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

18.5.3 Effects Analysis

```{r}
glmmTMB(formula = Crossing_Time ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

18.5.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 11.718 1.046 (9.84, 13.96) 27.575 < .001
Condition2 1.044 0.144 (0.80, 1.37) 0.311 0.756
Model: Crossing_Time ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 11.718 1.046 (9.84, 13.96) 27.575 < .001
Condition2 1.044 0.144 (0.80, 1.37) 0.311 0.756
Model: Crossing_Time ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 0.10 1 0.760
term statistic df p.value
Condition 0.10 1 0.760

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 134.86 137.22 -65.43 130.86
mod_full 3 136.76 140.29 -65.38 130.76 0.11 1 0.750
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 134.86 137.22 -65.43 130.86
mod_full 3 136.76 140.29 -65.38 130.76 0.11 1 0.750
Important

Our LRT() method removes the predictor plus all its interactions

18.5.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition response SE df lower.CL upper.CL
N 11.718 1.046 23 9.742 14.094
IH 12.233 1.292 23 9.832 15.219
Condition response SE df lower.CL upper.CL
N 11.718 1.046 23 9.742 14.094
IH 12.233 1.292 23 9.832 15.219
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.958 0.132 23 0.72 1.275 1 −0.311 0.759
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.958 0.132 23 0.72 1.275 1 −0.311 0.759
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale

Boxplot:


18.6 Number of Missteps

18.6.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 0.881 0.902 0.814 1.024 1.667 0 2.333 0.388 −1.372 14
IH 2.9 2.132 4.544 0.735 3 0.667 7 1.07 0.124 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 0.881 0.902 0.814 1.024 1.667 0 2.333 0.388 −1.372 14
IH 2.9 2.132 4.544 0.735 3 0.667 7 1.07 0.124 10

18.6.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Nbr_Missteps ~ Condition, data = data, family = gaussian("identity"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
92.08 93.28 95.61 0.51 1.46 1.53
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
92.08 93.28 95.61 0.51 1.46 1.53

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

No potential outliers detected by the model.

18.6.3 Effects Analysis

```{r}
glmmTMB(formula = Nbr_Missteps ~ Condition, data = data, family = gaussian("identity"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

18.6.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 0.881 0.409 (0.08, 1.68) 2.155 0.031 *
Condition2 2.019 0.633 (0.78, 3.26) 3.188 0.001 ***
Model: Nbr_Missteps ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 0.881 0.409 (0.08, 1.68) 2.155 0.031 *
Condition2 2.019 0.633 (0.78, 3.26) 3.188 0.001 ***
Model: Nbr_Missteps ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 10.16 1 0.001 **
term statistic df p.value
Condition 10.16 1 0.001 **

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 99.54 101.89 -47.77 95.54
mod_full 3 92.42 95.96 -43.21 86.42 9.11 1 0.003 **
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 99.54 101.89 -47.77 95.54
mod_full 3 92.42 95.96 -43.21 86.42 9.11 1 0.003 **
Important

Our LRT() method removes the predictor plus all its interactions

18.6.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition emmean SE df lower.CL upper.CL
N 0.881 0.409 23 0.035 1.727
IH 2.9 0.484 23 1.899 3.901
Condition emmean SE df lower.CL upper.CL
N 0.881 0.409 23 0.035 1.727
IH 2.9 0.484 23 1.899 3.901
- Confidence level used: 0.95

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast estimate SE df lower.CL upper.CL t.ratio p.value
N - IH −2.019 0.633 23 −3.329 −0.709 −3.188 0.004 **
contrast estimate SE df lower.CL upper.CL t.ratio p.value
N - IH −2.019 0.633 23 −3.329 −0.709 −3.188 0.004 **
- Confidence level used: 0.95

Boxplot:


18.7 Rearing Time

18.7.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 58.357 22.321 498.247 0.382 25.25 32 121 1.658 4.293 14
IH 56 18.439 340 0.329 31.5 21 76 −0.656 −0.51 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 58.357 22.321 498.247 0.382 25.25 32 121 1.658 4.293 14
IH 56 18.439 340 0.329 31.5 21 76 −0.656 −0.51 10

18.7.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Rearing_Time ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
220.88 222.08 224.42 4.31e-04 19.93 0.36
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
220.88 222.08 224.42 4.31e-04 19.93 0.36

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

Model call:

```{r}
glmmTMB(formula = Rearing_Time ~ Condition, data = data, family = gaussian("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
223.14 224.34 226.68 4.31e-04 19.93 20.82
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
223.14 224.34 226.68 4.31e-04 19.93 20.82

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

18.7.3 Effects Analysis

```{r}
glmmTMB(formula = Rearing_Time ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

18.7.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 58.357 5.611 (48.33, 70.46) 42.295 < .001
Condition2 0.960 0.143 (0.72, 1.28) -0.277 0.782
Model: Rearing_Time ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 58.357 5.611 (48.33, 70.46) 42.295 < .001
Condition2 0.960 0.143 (0.72, 1.28) -0.277 0.782
Model: Rearing_Time ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 0.08 1 0.780
term statistic df p.value
Condition 0.08 1 0.780

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 213.53 215.88 -104.76 209.53
mod_full 3 215.44 218.98 -104.72 209.44 0.08 1 0.770
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 213.53 215.88 -104.76 209.53
mod_full 3 215.44 218.98 -104.72 209.44 0.08 1 0.770
Important

Our LRT() method removes the predictor plus all its interactions

18.7.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition response SE df lower.CL upper.CL
N 58.357 5.611 23 47.831 71.199
IH 56 6.371 23 44.257 70.859
Condition response SE df lower.CL upper.CL
N 58.357 5.611 23 47.831 71.199
IH 56 6.371 23 44.257 70.859
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.042 0.155 23 0.766 1.418 1 0.277 0.784
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.042 0.155 23 0.766 1.418 1 0.277 0.784
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale

Boxplot:


18.8 Grooming Time

18.8.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 26.764 15.256 232.744 0.57 23.3 10.9 64.1 1.301 1.375 14
IH 33.5 12.528 156.958 0.374 18 21.4 61.3 1.353 1.659 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 26.764 15.256 232.744 0.57 23.3 10.9 64.1 1.301 1.375 14
IH 33.5 12.528 156.958 0.374 18 21.4 61.3 1.353 1.659 10

18.8.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Grooming_Time ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
198.35 199.55 201.89 0.01 13.60 0.46
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
198.35 199.55 201.89 0.01 13.60 0.46

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

Model call:

```{r}
glmmTMB(formula = Grooming_Time ~ Condition, data = data, family = gaussian("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
203.73 204.93 207.26 0.01 13.60 14.20
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
203.73 204.93 207.26 0.01 13.60 14.20

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

18.8.3 Effects Analysis

```{r}
glmmTMB(formula = Grooming_Time ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

18.8.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 26.764 3.292 (21.03, 34.06) 26.721 < .001
Condition2 1.252 0.239 (0.86, 1.82) 1.178 0.239
Model: Grooming_Time ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 26.764 3.292 (21.03, 34.06) 26.721 < .001
Condition2 1.252 0.239 (0.86, 1.82) 1.178 0.239
Model: Grooming_Time ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 1.39 1 0.240
term statistic df p.value
Condition 1.39 1 0.240

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 193.38 195.73 -94.69 189.38
mod_full 3 193.90 197.44 -93.95 187.90 1.48 1 0.220
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 193.38 195.73 -94.69 189.38
mod_full 3 193.90 197.44 -93.95 187.90 1.48 1 0.220
Important

Our LRT() method removes the predictor plus all its interactions

18.8.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition response SE df lower.CL upper.CL
N 26.764 3.292 23 20.751 34.52
IH 33.5 4.876 23 24.79 45.27
Condition response SE df lower.CL upper.CL
N 26.764 3.292 23 20.751 34.52
IH 33.5 4.876 23 24.79 45.27
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.799 0.152 23 0.539 1.185 1 −1.178 0.251
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.799 0.152 23 0.539 1.185 1 −1.178 0.251
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale

Boxplot:


18.9 Time in Open Arms

18.9.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 18.814 21.885 478.932 1.163 22.725 1.2 77.7 1.874 3.372 14
IH 21.52 18.127 328.577 0.842 29.675 0.1 49.3 0.48 −1.027 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 18.814 21.885 478.932 1.163 22.725 1.2 77.7 1.874 3.372 14
IH 21.52 18.127 328.577 0.842 29.675 0.1 49.3 0.48 −1.027 10

18.9.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Open_Arms_Time ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
196.85 198.05 200.39 4.56e-03 19.56 1.19
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
196.85 198.05 200.39 4.56e-03 19.56 1.19

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

No potential outliers detected by the model.

Model call:

```{r}
glmmTMB(formula = Open_Arms_Time ~ Condition, data = data, family = gaussian("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
218.13 219.33 221.67 4.56e-03 19.56 20.43
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
218.13 219.33 221.67 4.56e-03 19.56 20.43

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

18.9.3 Effects Analysis

```{r}
glmmTMB(formula = Open_Arms_Time ~ Condition, data = data, family = Gamma("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

18.9.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 18.814 5.959 (10.11, 35.00) 9.266 < .001
Condition2 1.144 0.561 (0.44, 2.99) 0.274 0.784
Model: Open_Arms_Time ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 18.814 5.959 (10.11, 35.00) 9.266 < .001
Condition2 1.144 0.561 (0.44, 2.99) 0.274 0.784
Model: Open_Arms_Time ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 0.07 1 0.780
term statistic df p.value
Condition 0.07 1 0.780

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 194.28 196.64 -95.14 190.28
mod_full 3 196.20 199.74 -95.10 190.20 0.08 1 0.780
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 194.28 196.64 -95.14 190.28
mod_full 3 196.20 199.74 -95.10 190.20 0.08 1 0.780
Important

Our LRT() method removes the predictor plus all its interactions

18.9.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition response SE df lower.CL upper.CL
N 18.814 5.959 23 9.771 36.226
IH 21.52 8.064 23 9.912 46.72
Condition response SE df lower.CL upper.CL
N 18.814 5.959 23 9.771 36.226
IH 21.52 8.064 23 9.912 46.72
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.874 0.429 23 0.317 2.412 1 −0.274 0.787
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.874 0.429 23 0.317 2.412 1 −0.274 0.787
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale

Boxplot:


18.10 Time in Closed Arms

18.10.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 236.929 28.053 786.995 0.118 34.75 163 269 −1.537 2.695 14
IH 231.3 22.613 511.344 0.098 16 195 279 0.438 2.052 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 236.929 28.053 786.995 0.118 34.75 163 269 −1.537 2.695 14
IH 231.3 22.613 511.344 0.098 16 195 279 0.438 2.052 10

18.10.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Closed_Arms_Time ~ Condition, data = data, 
    family = Gamma("log"), REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
240.13 241.33 243.66 1.47e-04 24.86 0.12
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
240.13 241.33 243.66 1.47e-04 24.86 0.12

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

Model call:

```{r}
glmmTMB(formula = Closed_Arms_Time ~ Condition, data = data, 
    family = gaussian("log"), REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
238.50 239.70 242.03 1.47e-04 24.86 25.97
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma
238.50 239.70 242.03 1.47e-04 24.86 25.97

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

18.10.3 Effects Analysis

```{r}
glmmTMB(formula = Closed_Arms_Time ~ Condition, data = data, 
    family = Gamma("log"), REML = TRUE, ziformula = ~0, dispformula = ~1)
```

18.10.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 236.929 7.304 (223.04, 251.68) 177.374 < .001
Condition2 0.976 0.047 (0.89, 1.07) -0.503 0.615
Model: Closed_Arms_Time ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 236.929 7.304 (223.04, 251.68) 177.374 < .001
Condition2 0.976 0.047 (0.89, 1.07) -0.503 0.615
Model: Closed_Arms_Time ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 0.25 1 0.610
term statistic df p.value
Condition 0.25 1 0.610

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 228.41 230.76 -112.20 224.41
mod_full 3 230.13 233.67 -112.07 224.13 0.27 1 0.600
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 228.41 230.76 -112.20 224.41
mod_full 3 230.13 233.67 -112.07 224.13 0.27 1 0.600
Important

Our LRT() method removes the predictor plus all its interactions

18.10.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition response SE df lower.CL upper.CL
N 236.929 7.304 23 222.292 252.529
IH 231.3 8.436 23 214.49 249.427
Condition response SE df lower.CL upper.CL
N 236.929 7.304 23 222.292 252.529
IH 231.3 8.436 23 214.49 249.427
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.024 0.049 23 0.928 1.131 1 0.503 0.619
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 1.024 0.049 23 0.928 1.131 1 0.503 0.619
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale

Boxplot:


18.11 Number of Entries in Open Arms

18.11.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 2.643 2.373 5.632 0.898 3 1 9 1.827 3.148 14
IH 3 2.108 4.444 0.703 3.5 0 6 −0.178 −1.246 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 2.643 2.373 5.632 0.898 3 1 9 1.827 3.148 14
IH 3 2.108 4.444 0.703 3.5 0 6 −0.178 −1.246 10

18.11.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Nbr_Entry_Open ~ Condition, data = data, family = nbinom2("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma Score_log Score_spherical
106.91 108.11 110.44 4.73e-03 2.17 3.36 -2.07 0.19
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma Score_log Score_spherical
106.91 108.11 110.44 4.73e-03 2.17 3.36 -2.07 0.19

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

performance::check_overdispersion(mod)
# Overdispersion test

       dispersion ratio =  0.981
  Pearson's Chi-Squared = 22.557
                p-value =  0.487
performance::check_zeroinflation(mod)
# Check for zero-inflation

   Observed zeros: 2
  Predicted zeros: 3
            Ratio: 1.50

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

No potential outliers detected by the model.

18.11.3 Effects Analysis

```{r}
glmmTMB(formula = Nbr_Entry_Open ~ Condition, data = data, family = nbinom2("log"), 
    REML = TRUE, ziformula = ~0, dispformula = ~1)
```

18.11.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 2.643 0.581 (1.72, 4.07) 4.423 < .001
Condition2 1.135 0.379 (0.59, 2.18) 0.380 0.704
Model: Nbr_Entry_Open ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 2.643 0.581 (1.72, 4.07) 4.423 < .001
Condition2 1.135 0.379 (0.59, 2.18) 0.380 0.704
Model: Nbr_Entry_Open ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 0.14 1 0.700
term statistic df p.value
Condition 0.14 1 0.700

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 102.85 105.21 -49.43 98.85
mod_full 3 104.69 108.23 -49.35 98.69 0.16 1 0.690
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 102.85 105.21 -49.43 98.85
mod_full 3 104.69 108.23 -49.35 98.69 0.16 1 0.690
Important

Our LRT() method removes the predictor plus all its interactions

18.11.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition response SE df lower.CL upper.CL
N 2.643 0.581 23 1.678 4.164
IH 3 0.753 23 1.784 5.044
Condition response SE df lower.CL upper.CL
N 2.643 0.581 23 1.678 4.164
IH 3 0.753 23 1.784 5.044
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.881 0.294 23 0.442 1.757 1 −0.38 0.708
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.881 0.294 23 0.442 1.757 1 −0.38 0.708
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale

Boxplot:


18.12 Number of Entries in Closed Arms

18.12.1 Data Exploration

Distribution:

Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 11.357 4.717 22.247 0.415 6.75 4 21 0.642 0.035 14
IH 12 4.69 22 0.391 6.75 4 18 −0.63 −0.462 10
Condition Mean SD Variance CoV IQR Min Max Skewness Kurtosis n
N 11.357 4.717 22.247 0.415 6.75 4 21 0.642 0.035 14
IH 12 4.69 22 0.391 6.75 4 18 −0.63 −0.462 10

18.12.2 Models & Diagnostics

Exploring some Generalized Linear (Mixed) model candidates:

Model call:

```{r}
glmmTMB(formula = Nbr_Entry_Closed ~ Condition, data = data, 
    family = nbinom2("log"), REML = TRUE, ziformula = ~0, dispformula = ~1)
```

Performance:

performance::performance(mod)
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma Score_log Score_spherical
151.27 152.47 154.81 1.04e-03 4.51 11.58 -3.15 0.20
AIC AICc BIC R2_conditional R2_marginal RMSE Sigma Score_log Score_spherical
151.27 152.47 154.81 1.04e-03 4.51 11.58 -3.15 0.20

Residuals:

performance::check_model(
  mod, panel = FALSE,
  check = c("pp_check", "qq", "reqq", "linearity", "homogeneity")
)

performance::check_overdispersion(mod)
# Overdispersion test

       dispersion ratio =  0.911
  Pearson's Chi-Squared = 20.963
                p-value =  0.583

Predictions:

Simulating data from the model for pseudo “Posterior Predictive” plots.

Simulated data vs observed data:

Simulated statistics vs observed ones:

Potential outliers:

No potential outliers detected by the model.

18.12.3 Effects Analysis

```{r}
glmmTMB(formula = Nbr_Entry_Closed ~ Condition, data = data, 
    family = nbinom2("log"), REML = TRUE, ziformula = ~0, dispformula = ~1)
```

18.12.3.1 Coefficients

❖ All effects (Wald):

parameters::parameters(
  mod, component = "conditional", effects = "fixed",
  exponentiate = should_exp(mod), p_adjust = "none", summary = TRUE, digits = 3
)
Parameter Coefficient SE 95% CI z p
(Intercept) 11.357 1.268 (9.13, 14.13) 21.772 < .001
Condition2 1.057 0.181 (0.75, 1.48) 0.321 0.748
Model: Nbr_Entry_Closed ~ Condition (24 Observations)
Parameter Coefficient SE 95% CI z p
(Intercept) 11.357 1.268 (9.13, 14.13) 21.772 < .001
Condition2 1.057 0.181 (0.75, 1.48) 0.321 0.748
Model: Nbr_Entry_Closed ~ Condition (24 Observations)

❖ Main effects (Wald Chi-Square):

car::Anova(mod, type = 3)
term statistic df p.value
Condition 0.10 1 0.750
term statistic df p.value
Condition 0.10 1 0.750

❖ Main effects (Likelihood Ratio Test):

LRT(mod, pred = "Condition")
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 144.50 146.86 -70.25 140.50
mod_full 3 146.39 149.93 -70.20 140.39 0.11 1 0.740
model df aic bic log_lik deviance chisq chi_df pr_chisq
mod_reduced 2 144.50 146.86 -70.25 140.50
mod_full 3 146.39 149.93 -70.20 140.39 0.11 1 0.740
Important

Our LRT() method removes the predictor plus all its interactions

18.12.3.2 Marginal Effects

Marginal means & Contrasts for each predictor:

Marginal Means:

emmeans(mod, specs = pred, type = "response")
Condition response SE df lower.CL upper.CL
N 11.357 1.268 23 9.016 14.307
IH 12 1.563 23 9.166 15.711
Condition response SE df lower.CL upper.CL
N 11.357 1.268 23 9.016 14.307
IH 12 1.563 23 9.166 15.711
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale

Contrasts:

emmeans(mod, specs = pred, type = "response") |> 
  contrast(method = "pairwise", adjust = "none", infer = TRUE)
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.946 0.162 23 0.664 1.35 1 −0.321 0.751
contrast ratio SE df lower.CL upper.CL null t.ratio p.value
N / IH 0.946 0.162 23 0.664 1.35 1 −0.321 0.751
- Confidence level used: 0.95
- Intervals are back-transformed from the log scale
- Tests are performed on the log scale

Boxplot: