APCRP Salinity Analysis

Author

Hellinghausen, Kristina L., Dodd, Lynde L.

Published

January 6, 2024

1 Load packages

library(tidyr)
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ purrr     1.0.2
✔ forcats   1.0.0     ✔ readr     2.1.4
✔ ggplot2   3.4.4     ✔ stringr   1.5.1
✔ lubridate 1.9.3     ✔ tibble    3.2.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(easystats)
# Attaching packages: easystats 0.7.0
✔ bayestestR  0.13.1.1   ✔ correlation 0.8.4   
✔ datawizard  0.9.1      ✔ effectsize  0.8.6   
✔ insight     0.19.7     ✔ modelbased  0.8.6.3 
✔ performance 0.10.8     ✔ parameters  0.21.3  
✔ report      0.5.8      ✔ see         0.8.1   
library(readxl) #for reading in data
library(dplyr) #used for summary stats
library(plotrix) #for std error

Attaching package: 'plotrix'

The following object is masked from 'package:datawizard':

    rescale
library(cowplot) #used for plot themes

Attaching package: 'cowplot'

The following object is masked from 'package:lubridate':

    stamp
library(GGally) #used for plots
Registered S3 method overwritten by 'GGally':
  method from   
  +.gg   ggplot2
library(ggtext) #fonts
library(performance) #used to check model
library(car) #used to perform stat test
Loading required package: carData

Attaching package: 'car'

The following object is masked from 'package:dplyr':

    recode

The following object is masked from 'package:purrr':

    some
library(report) #used to report test results
library(emmeans) #to calc emmeans and perform post hoc test

Attaching package: 'emmeans'

The following object is masked from 'package:GGally':

    pigs
library(multcomp) #post hoc testing
Loading required package: mvtnorm

Attaching package: 'mvtnorm'

The following object is masked from 'package:modelbased':

    standardize

The following object is masked from 'package:effectsize':

    standardize

The following object is masked from 'package:datawizard':

    standardize

Loading required package: survival
Loading required package: TH.data
Loading required package: MASS

Attaching package: 'MASS'

The following object is masked from 'package:dplyr':

    select


Attaching package: 'TH.data'

The following object is masked from 'package:MASS':

    geyser
library(broom) #tidy function
library(ggpattern)
library(MuMIn) #for dredge function

Attaching package: 'MuMIn'

The following object is masked from 'package:insight':

    get_call
library(lme4) #for mixed models
Loading required package: Matrix

Attaching package: 'Matrix'

The following objects are masked from 'package:tidyr':

    expand, pack, unpack
library(EnvStats) # for adding sample size

Attaching package: 'EnvStats'

The following object is masked from 'package:MASS':

    boxcox

The following object is masked from 'package:car':

    qqPlot

The following objects are masked from 'package:parameters':

    kurtosis, skewness

The following objects are masked from 'package:datawizard':

    kurtosis, skewness

The following objects are masked from 'package:stats':

    predict, predict.lm

2 Set working directory

setwd("~/Desktop")

3 Read in data

data<-read_excel(path="Salinity_DS_10.05.23.xlsx",
                    sheet="DS",
                    col_names = T,
                    na=c("NA", "", "na"))

data$TMT<- factor(data$TMT, levels = c("0", "0.5", "1", "10", "20"))
data$`temp (C)`<- factor(data$`temp (C)`, levels = c("25", "30"))
data$spp<- factor(data$spp, levels=c("TB", "TN"))

germ_prop<-read_excel(path="Salinity_DS_10.05.23.xlsx",
                    sheet="germ_prop",
                    col_names = T,
                    na=c("NA", "", "na"))
germ_prop$Salinity<- factor(germ_prop$Salinity, levels = c("0", "0.5", "1", "10", "20"))
germ_prop$Temp<- factor(germ_prop$Temp, levels = c("25", "30"))
germ_prop$Species<- factor(germ_prop$Species, levels=c("TB", "TN"))

4 Variables

Response variables: Biomass (DWg), Germination (0=not germinated, 1=germinated), Viability determined by TZ test (0=not viable, 1=viable)

Predictor variables: Salinity (“TMT”, ppt), temperature (C), Species (TB and TN)

5 Summary dataframes

sum_bio<- data %>% #ABG biomass
  group_by(spp, TMT, `temp (C)`) %>%
  summarize(n=n(),
            mean_biomass=mean(`final ABG DW (g)`, na.rm=TRUE),
            SE_biomass=std.error(`final ABG DW (g)`, na.rm=TRUE))
`summarise()` has grouped output by 'spp', 'TMT'. You can override using the
`.groups` argument.
sum_bio
# A tibble: 20 × 6
# Groups:   spp, TMT [10]
   spp   TMT   `temp (C)`     n mean_biomass SE_biomass
   <fct> <fct> <fct>      <int>        <dbl>      <dbl>
 1 TB    0     25            20       0.0785    0.0195 
 2 TB    0     30            20       0.0325    0.0153 
 3 TB    0.5   25            20       0.0605    0.0315 
 4 TB    0.5   30            20       0.0275    0.0190 
 5 TB    1     25            20       0.08      0.0342 
 6 TB    1     30            20       0.0475    0.0245 
 7 TB    10    25            20       0.0085    0.00658
 8 TB    10    30            20       0         0      
 9 TB    20    25            20       0         0      
10 TB    20    30            20       0         0      
11 TN    0     25            20       0.021     0.0146 
12 TN    0     30            20       0         0      
13 TN    0.5   25            20       0.145     0.0681 
14 TN    0.5   30            20       0         0      
15 TN    1     25            20       0.0655    0.0450 
16 TN    1     30            20       0         0      
17 TN    10    25            20       0.0184    0.0160 
18 TN    10    30            20       0         0      
19 TN    20    25            20       0.0005    0.0005 
20 TN    20    30            20       0         0      
sum_seed<- data %>% #seed biomass
  group_by(spp, TMT, `temp (C)`) %>%
  summarize(n=n(),
            mean_seed=mean(`final seed DW (g)`, na.rm=TRUE),
            SE_seed=std.error(`final seed DW (g)`, na.rm=TRUE))
`summarise()` has grouped output by 'spp', 'TMT'. You can override using the
`.groups` argument.
sum_seed
# A tibble: 20 × 6
# Groups:   spp, TMT [10]
   spp   TMT   `temp (C)`     n mean_seed SE_seed
   <fct> <fct> <fct>      <int>     <dbl>   <dbl>
 1 TB    0     25            20     0.411  0.0637
 2 TB    0     30            20     0.321  0.0621
 3 TB    0.5   25            20     0.230  0.0505
 4 TB    0.5   30            20     0.209  0.0596
 5 TB    1     25            20     0.29   0.0576
 6 TB    1     30            20     0.314  0.109 
 7 TB    10    25            20     0.312  0.0686
 8 TB    10    30            20     0.102  0.0423
 9 TB    20    25            20     0.053  0.0251
10 TB    20    30            20     0.064  0.0441
11 TN    0     25            20     1.86   0.198 
12 TN    0     30            20     0.999  0.234 
13 TN    0.5   25            20     1.47   0.193 
14 TN    0.5   30            20     1.73   0.207 
15 TN    1     25            20     1.30   0.233 
16 TN    1     30            20     1.08   0.236 
17 TN    10    25            20     1.36   0.246 
18 TN    10    30            20     0.940  0.232 
19 TN    20    25            20     1.34   0.234 
20 TN    20    30            20     1.16   0.228 
sum_germ<- data %>% #germination
  group_by(spp, TMT, `temp (C)`) %>%
  summarize(n=n(),
            mean_germ=mean(germination, na.rm=TRUE),
            SE_germ=std.error(germination, na.rm=TRUE))
`summarise()` has grouped output by 'spp', 'TMT'. You can override using the
`.groups` argument.
sum_germ
# A tibble: 20 × 6
# Groups:   spp, TMT [10]
   spp   TMT   `temp (C)`     n mean_germ SE_germ
   <fct> <fct> <fct>      <int>     <dbl>   <dbl>
 1 TB    0     25            20      0.65  0.109 
 2 TB    0     30            20      0.2   0.0918
 3 TB    0.5   25            20      0.25  0.0993
 4 TB    0.5   30            20      0.15  0.0819
 5 TB    1     25            20      0.5   0.115 
 6 TB    1     30            20      0.2   0.0918
 7 TB    10    25            20      0.2   0.0918
 8 TB    10    30            20      0     0     
 9 TB    20    25            20      0     0     
10 TB    20    30            20      0     0     
11 TN    0     25            20      0.1   0.0688
12 TN    0     30            20      0     0     
13 TN    0.5   25            20      0.2   0.0918
14 TN    0.5   30            20      0     0     
15 TN    1     25            20      0.15  0.0819
16 TN    1     30            20      0     0     
17 TN    10    25            20      0.15  0.0819
18 TN    10    30            20      0     0     
19 TN    20    25            20      0.1   0.0688
20 TN    20    30            20      0     0     
sum_via<- data %>% #viability
  group_by(spp, TMT, `temp (C)`) %>%
  summarize(n=n(),
            mean_viability=mean(`TZ test`, na.rm=TRUE),
            SE_viability=std.error(`TZ test`, na.rm=TRUE))
`summarise()` has grouped output by 'spp', 'TMT'. You can override using the
`.groups` argument.
sum_via
# A tibble: 20 × 6
# Groups:   spp, TMT [10]
   spp   TMT   `temp (C)`     n mean_viability SE_viability
   <fct> <fct> <fct>      <int>          <dbl>        <dbl>
 1 TB    0     25            20          0.917       0.0833
 2 TB    0     30            20          0.846       0.104 
 3 TB    0.5   25            20          1           0     
 4 TB    0.5   30            20          0.8         0.133 
 5 TB    1     25            20          1           0     
 6 TB    1     30            20          0.778       0.147 
 7 TB    10    25            20          0.636       0.152 
 8 TB    10    30            20          0.385       0.140 
 9 TB    20    25            20          0.333       0.142 
10 TB    20    30            20          0.182       0.122 
11 TN    0     25            20          0.895       0.0723
12 TN    0     30            20          0.5         0.115 
13 TN    0.5   25            20          0.8         0.0918
14 TN    0.5   30            20          0.8         0.0918
15 TN    1     25            20          0.588       0.123 
16 TN    1     30            20          0.706       0.114 
17 TN    10    25            20          0.667       0.114 
18 TN    10    30            20          0.526       0.118 
19 TN    20    25            20          0.611       0.118 
20 TN    20    30            20          0.632       0.114 

6 Reorder levels

sum_bio$TMT<- factor(sum_bio$TMT, levels = c("0", "0.5", "1", "10", "20"))
sum_seed$TMT<- factor(sum_seed$TMT, levels = c("0", "0.5", "1", "10", "20"))
sum_germ$TMT<- factor(sum_germ$TMT, levels = c("0", "0.5", "1", "10", "20"))
sum_via$TMT<- factor(sum_via$TMT, levels = c("0", "0.5", "1", "10", "20"))

7 Total biomass

Barplot.

plot_bio<- sum_bio %>%
  as_tibble() %>%
  ggplot(aes(x=TMT,
             y=mean_biomass,
             ymin=mean_biomass,
             ymax=mean_biomass+SE_biomass,
             fill=spp)) +
facet_grid(~`temp (C)`, switch="x", scales = "free_x", space="free_x") +
    theme(panel.spacing = unit(0, "lines"), 
         strip.background = element_blank(),
         strip.placement = "outside") +
  geom_bar(stat="identity",
           position="dodge",
           width=0.6,
           color="black") +
  scale_fill_manual(values = c(TN = "darkgrey", TB = "mediumblue")) +
  scale_y_continuous() +
  geom_errorbar(width=0.6, position="dodge") +
  labs(title="Mean ± SE Aboveground biomass (DWg) ",
       x="Salinity (ppt)",
       y="Mean ± SE ABG biomass (DWg)") +
  geom_hline(yintercept=mean(sum_bio$mean_biomass), color="black", linetype=2) +
  theme_cowplot() +
theme(axis.text.x = element_text(angle=0, hjust=0.5),
       legend.text = element_text(size=rel(0.85)),
       text = element_text(family="serif", size=12), #TNR for windows
       legend.title = element_text(size=rel(0.85)))
plot_bio

Point plot.

temp_names <- as_labeller(
     c(`25` = "25°C", `30` = "30°C"))

library(RColorBrewer)

t_biomass <- sum_bio %>%
  as_tibble() %>%
  ggplot(aes(x=TMT,
             y=mean_biomass)) +
  facet_wrap(~`temp (C)`, labeller=temp_names)+
  geom_point(aes(shape=spp, fill=TMT, color=TMT), size=3) +
  scale_color_manual(values = c("0"="#1B9E77", "0.5"="#D95F02", "1"="#7570B3", "10"="#E6AB02", "20"="#666666"))+
  geom_path(aes(group=interaction(spp, TMT), color=TMT))+
  labs(title="",
       x="Salinity (ppt)",
       y="Mean biomass (DWg)") +
  theme_cowplot() +
theme(axis.text.x = element_text(angle=0, hjust=0.5),
       text = element_text(family="serif", size=20))
t_biomass
`geom_path()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_path()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?

Point and line plot.

abg_point<- sum_bio %>%
  as_tibble() %>%
  ggplot(aes(x=TMT,
             y=mean_biomass)) +
  geom_point(aes(shape=`temp (C)`, fill=spp, color=spp), size=3.5) +
    scale_shape_manual(values=c("25"=21, "30"=24))+
  scale_color_manual(values = c(TN = "black", TB = "mediumblue"))+
    scale_fill_manual(values = c(TN = "black", TB = "mediumblue"), guide="none") +
  labs(title="",
       x="Salinity (ppt)",
       y="Mean biomass (DWg)\n") +
  geom_path(aes(group=interaction(spp, `temp (C)`), color=spp), linewidth=0.8) +
  theme_cowplot() +
  guides(color=guide_legend(title="Species"), shape=guide_legend(title="Temperature (°C)"))+
theme(axis.text.x = element_text(angle=0, hjust=0.5, family="serif", size=18),
      axis.text.y = element_text(family="serif",size=18),
      text = element_text(family="serif", size=20),
      legend.position = c(0.8,0.5))
abg_point

7.1 Analysis

#fit best model, conduct factorial anova

m<- lm (`final ABG DW (g)`~TMT*spp*`temp (C)`, data=data)
hist(m$residuals) #heavy right skew, log transformation did not help

m1<-glm(`final ABG DW (g)` ~ TMT*spp*`temp (C)`, data=data)
m2<-glm(`final ABG DW (g)` ~ TMT*spp+`temp (C)`, data=data)
m3<-glm(`final ABG DW (g)` ~ TMT+spp*`temp (C)`, data=data)
m4<-glm(`final ABG DW (g)` ~ TMT+spp+`temp (C)`, data=data)

check_model(m4)

comp<-compare_performance(m1, m2, m3, m4)
comp #all models have similar AIC; choose simplest
# Comparison of Model Performance Indices

Name | Model |  AIC (weights) | AICc (weights) |  BIC (weights) |    R2 |  RMSE | Sigma
---------------------------------------------------------------------------------------
m1   |   glm | -650.5 (0.062) | -648.1 (0.024) | -566.7 (<.001) | 0.124 | 0.102 | 0.104
m2   |   glm | -652.7 (0.186) | -651.9 (0.164) | -604.8 (<.001) | 0.089 | 0.104 | 0.105
m3   |   glm | -653.9 (0.335) | -653.4 (0.352) | -618.0 (0.098) | 0.078 | 0.104 | 0.106
m4   |   glm | -654.3 (0.418) | -654.0 (0.460) | -622.4 (0.902) | 0.074 | 0.105 | 0.106
summary(m4)

Call:
glm(formula = `final ABG DW (g)` ~ TMT + spp + `temp (C)`, data = data)

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-0.08100  -0.04396  -0.02288   0.00791   0.81745  

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)   0.055750   0.013971   3.990 7.87e-05 ***
TMT0.5        0.025250   0.016698   1.512 0.131304    
TMT1          0.015250   0.016698   0.913 0.361661    
TMT10        -0.026262   0.016698  -1.573 0.116577    
TMT20        -0.032875   0.016698  -1.969 0.049682 *  
sppTN        -0.008455   0.010561  -0.801 0.423850    
`temp (C)`30 -0.037045   0.010561  -3.508 0.000504 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for gaussian family taken to be 0.01115327)

    Null deviance: 4.7333  on 399  degrees of freedom
Residual deviance: 4.3832  on 393  degrees of freedom
AIC: -654.32

Number of Fisher Scoring iterations: 2
report(m4)
We fitted a linear model (estimated using ML) to predict final ABG DW (g) with
TMT, spp and temp (C) (formula: `final ABG DW (g)` ~ TMT + spp + `temp (C)`).
The model's explanatory power is weak (R2 = 0.07). The model's intercept,
corresponding to TMT = 0, spp = TB and temp (C) = 25, is at 0.06 (95% CI [0.03,
0.08], t(393) = 3.99, p < .001). Within this model:

  - The effect of TMT [0.5] is statistically non-significant and positive (beta =
0.03, 95% CI [-7.48e-03, 0.06], t(393) = 1.51, p = 0.130; Std. beta = 0.23, 95%
CI [-0.07, 0.53])
  - The effect of TMT [1] is statistically non-significant and positive (beta =
0.02, 95% CI [-0.02, 0.05], t(393) = 0.91, p = 0.361; Std. beta = 0.14, 95% CI
[-0.16, 0.44])
  - The effect of TMT [10] is statistically non-significant and negative (beta =
-0.03, 95% CI [-0.06, 6.47e-03], t(393) = -1.57, p = 0.116; Std. beta = -0.24,
95% CI [-0.54, 0.06])
  - The effect of TMT [20] is statistically significant and negative (beta =
-0.03, 95% CI [-0.07, -1.47e-04], t(393) = -1.97, p = 0.049; Std. beta = -0.30,
95% CI [-0.60, -1.35e-03])
  - The effect of spp [TN] is statistically non-significant and negative (beta =
-8.46e-03, 95% CI [-0.03, 0.01], t(393) = -0.80, p = 0.423; Std. beta = -0.08,
95% CI [-0.27, 0.11])
  - The effect of temp (C) [30] is statistically significant and negative (beta =
-0.04, 95% CI [-0.06, -0.02], t(393) = -3.51, p < .001; Std. beta = -0.34, 95%
CI [-0.53, -0.15])

Standardized parameters were obtained by fitting the model on a standardized
version of the dataset. 95% Confidence Intervals (CIs) and p-values were
computed using a Wald t-distribution approximation.

7.2 Post-hoc test

fitem<- emmeans(m4, ~ TMT+spp+`temp (C)`, type = "response")
emdf<-as.data.frame(fitem) #put into df
tukey_abg<- fitem %>% pairs() #tukey hsd
tukeyabg<-as.data.frame(tukey_abg)
tukeyabg
 contrast                                      estimate         SE  df t.ratio
 TMT0 TB temp (C)25 - TMT0.5 TB temp (C)25   -0.0252500 0.01669826 393  -1.512
 TMT0 TB temp (C)25 - TMT1 TB temp (C)25     -0.0152500 0.01669826 393  -0.913
 TMT0 TB temp (C)25 - TMT10 TB temp (C)25     0.0262625 0.01669826 393   1.573
 TMT0 TB temp (C)25 - TMT20 TB temp (C)25     0.0328750 0.01669826 393   1.969
 TMT0 TB temp (C)25 - TMT0 TN temp (C)25      0.0084550 0.01056091 393   0.801
 TMT0 TB temp (C)25 - TMT0.5 TN temp (C)25   -0.0167950 0.01975765 393  -0.850
 TMT0 TB temp (C)25 - TMT1 TN temp (C)25     -0.0067950 0.01975765 393  -0.344
 TMT0 TB temp (C)25 - TMT10 TN temp (C)25     0.0347175 0.01975765 393   1.757
 TMT0 TB temp (C)25 - TMT20 TN temp (C)25     0.0413300 0.01975765 393   2.092
 TMT0 TB temp (C)25 - TMT0 TB temp (C)30      0.0370450 0.01056091 393   3.508
 TMT0 TB temp (C)25 - TMT0.5 TB temp (C)30    0.0117950 0.01975765 393   0.597
 TMT0 TB temp (C)25 - TMT1 TB temp (C)30      0.0217950 0.01975765 393   1.103
 TMT0 TB temp (C)25 - TMT10 TB temp (C)30     0.0633075 0.01975765 393   3.204
 TMT0 TB temp (C)25 - TMT20 TB temp (C)30     0.0699200 0.01975765 393   3.539
 TMT0 TB temp (C)25 - TMT0 TN temp (C)30      0.0455000 0.01493538 393   3.046
 TMT0 TB temp (C)25 - TMT0.5 TN temp (C)30    0.0202500 0.02240306 393   0.904
 TMT0 TB temp (C)25 - TMT1 TN temp (C)30      0.0302500 0.02240306 393   1.350
 TMT0 TB temp (C)25 - TMT10 TN temp (C)30     0.0717625 0.02240306 393   3.203
 TMT0 TB temp (C)25 - TMT20 TN temp (C)30     0.0783750 0.02240306 393   3.498
 TMT0.5 TB temp (C)25 - TMT1 TB temp (C)25    0.0100000 0.01669826 393   0.599
 TMT0.5 TB temp (C)25 - TMT10 TB temp (C)25   0.0515125 0.01669826 393   3.085
 TMT0.5 TB temp (C)25 - TMT20 TB temp (C)25   0.0581250 0.01669826 393   3.481
 TMT0.5 TB temp (C)25 - TMT0 TN temp (C)25    0.0337050 0.01975765 393   1.706
 TMT0.5 TB temp (C)25 - TMT0.5 TN temp (C)25  0.0084550 0.01056091 393   0.801
 TMT0.5 TB temp (C)25 - TMT1 TN temp (C)25    0.0184550 0.01975765 393   0.934
 TMT0.5 TB temp (C)25 - TMT10 TN temp (C)25   0.0599675 0.01975765 393   3.035
 TMT0.5 TB temp (C)25 - TMT20 TN temp (C)25   0.0665800 0.01975765 393   3.370
 TMT0.5 TB temp (C)25 - TMT0 TB temp (C)30    0.0622950 0.01975765 393   3.153
 TMT0.5 TB temp (C)25 - TMT0.5 TB temp (C)30  0.0370450 0.01056091 393   3.508
 TMT0.5 TB temp (C)25 - TMT1 TB temp (C)30    0.0470450 0.01975765 393   2.381
 TMT0.5 TB temp (C)25 - TMT10 TB temp (C)30   0.0885575 0.01975765 393   4.482
 TMT0.5 TB temp (C)25 - TMT20 TB temp (C)30   0.0951700 0.01975765 393   4.817
 TMT0.5 TB temp (C)25 - TMT0 TN temp (C)30    0.0707500 0.02240306 393   3.158
 TMT0.5 TB temp (C)25 - TMT0.5 TN temp (C)30  0.0455000 0.01493538 393   3.046
 TMT0.5 TB temp (C)25 - TMT1 TN temp (C)30    0.0555000 0.02240306 393   2.477
 TMT0.5 TB temp (C)25 - TMT10 TN temp (C)30   0.0970125 0.02240306 393   4.330
 TMT0.5 TB temp (C)25 - TMT20 TN temp (C)30   0.1036250 0.02240306 393   4.625
 TMT1 TB temp (C)25 - TMT10 TB temp (C)25     0.0415125 0.01669826 393   2.486
 TMT1 TB temp (C)25 - TMT20 TB temp (C)25     0.0481250 0.01669826 393   2.882
 TMT1 TB temp (C)25 - TMT0 TN temp (C)25      0.0237050 0.01975765 393   1.200
 TMT1 TB temp (C)25 - TMT0.5 TN temp (C)25   -0.0015450 0.01975765 393  -0.078
 TMT1 TB temp (C)25 - TMT1 TN temp (C)25      0.0084550 0.01056091 393   0.801
 TMT1 TB temp (C)25 - TMT10 TN temp (C)25     0.0499675 0.01975765 393   2.529
 TMT1 TB temp (C)25 - TMT20 TN temp (C)25     0.0565800 0.01975765 393   2.864
 TMT1 TB temp (C)25 - TMT0 TB temp (C)30      0.0522950 0.01975765 393   2.647
 TMT1 TB temp (C)25 - TMT0.5 TB temp (C)30    0.0270450 0.01975765 393   1.369
 TMT1 TB temp (C)25 - TMT1 TB temp (C)30      0.0370450 0.01056091 393   3.508
 TMT1 TB temp (C)25 - TMT10 TB temp (C)30     0.0785575 0.01975765 393   3.976
 TMT1 TB temp (C)25 - TMT20 TB temp (C)30     0.0851700 0.01975765 393   4.311
 TMT1 TB temp (C)25 - TMT0 TN temp (C)30      0.0607500 0.02240306 393   2.712
 TMT1 TB temp (C)25 - TMT0.5 TN temp (C)30    0.0355000 0.02240306 393   1.585
 TMT1 TB temp (C)25 - TMT1 TN temp (C)30      0.0455000 0.01493538 393   3.046
 TMT1 TB temp (C)25 - TMT10 TN temp (C)30     0.0870125 0.02240306 393   3.884
 TMT1 TB temp (C)25 - TMT20 TN temp (C)30     0.0936250 0.02240306 393   4.179
 TMT10 TB temp (C)25 - TMT20 TB temp (C)25    0.0066125 0.01669826 393   0.396
 TMT10 TB temp (C)25 - TMT0 TN temp (C)25    -0.0178075 0.01975765 393  -0.901
 TMT10 TB temp (C)25 - TMT0.5 TN temp (C)25  -0.0430575 0.01975765 393  -2.179
 TMT10 TB temp (C)25 - TMT1 TN temp (C)25    -0.0330575 0.01975765 393  -1.673
 TMT10 TB temp (C)25 - TMT10 TN temp (C)25    0.0084550 0.01056091 393   0.801
 TMT10 TB temp (C)25 - TMT20 TN temp (C)25    0.0150675 0.01975765 393   0.763
 TMT10 TB temp (C)25 - TMT0 TB temp (C)30     0.0107825 0.01975765 393   0.546
 TMT10 TB temp (C)25 - TMT0.5 TB temp (C)30  -0.0144675 0.01975765 393  -0.732
 TMT10 TB temp (C)25 - TMT1 TB temp (C)30    -0.0044675 0.01975765 393  -0.226
 TMT10 TB temp (C)25 - TMT10 TB temp (C)30    0.0370450 0.01056091 393   3.508
 TMT10 TB temp (C)25 - TMT20 TB temp (C)30    0.0436575 0.01975765 393   2.210
 TMT10 TB temp (C)25 - TMT0 TN temp (C)30     0.0192375 0.02240306 393   0.859
 TMT10 TB temp (C)25 - TMT0.5 TN temp (C)30  -0.0060125 0.02240306 393  -0.268
 TMT10 TB temp (C)25 - TMT1 TN temp (C)30     0.0039875 0.02240306 393   0.178
 TMT10 TB temp (C)25 - TMT10 TN temp (C)30    0.0455000 0.01493538 393   3.046
 TMT10 TB temp (C)25 - TMT20 TN temp (C)30    0.0521125 0.02240306 393   2.326
 TMT20 TB temp (C)25 - TMT0 TN temp (C)25    -0.0244200 0.01975765 393  -1.236
 TMT20 TB temp (C)25 - TMT0.5 TN temp (C)25  -0.0496700 0.01975765 393  -2.514
 TMT20 TB temp (C)25 - TMT1 TN temp (C)25    -0.0396700 0.01975765 393  -2.008
 TMT20 TB temp (C)25 - TMT10 TN temp (C)25    0.0018425 0.01975765 393   0.093
 TMT20 TB temp (C)25 - TMT20 TN temp (C)25    0.0084550 0.01056091 393   0.801
 TMT20 TB temp (C)25 - TMT0 TB temp (C)30     0.0041700 0.01975765 393   0.211
 TMT20 TB temp (C)25 - TMT0.5 TB temp (C)30  -0.0210800 0.01975765 393  -1.067
 TMT20 TB temp (C)25 - TMT1 TB temp (C)30    -0.0110800 0.01975765 393  -0.561
 TMT20 TB temp (C)25 - TMT10 TB temp (C)30    0.0304325 0.01975765 393   1.540
 TMT20 TB temp (C)25 - TMT20 TB temp (C)30    0.0370450 0.01056091 393   3.508
 TMT20 TB temp (C)25 - TMT0 TN temp (C)30     0.0126250 0.02240306 393   0.564
 TMT20 TB temp (C)25 - TMT0.5 TN temp (C)30  -0.0126250 0.02240306 393  -0.564
 TMT20 TB temp (C)25 - TMT1 TN temp (C)30    -0.0026250 0.02240306 393  -0.117
 TMT20 TB temp (C)25 - TMT10 TN temp (C)30    0.0388875 0.02240306 393   1.736
 TMT20 TB temp (C)25 - TMT20 TN temp (C)30    0.0455000 0.01493538 393   3.046
 TMT0 TN temp (C)25 - TMT0.5 TN temp (C)25   -0.0252500 0.01669826 393  -1.512
 TMT0 TN temp (C)25 - TMT1 TN temp (C)25     -0.0152500 0.01669826 393  -0.913
 TMT0 TN temp (C)25 - TMT10 TN temp (C)25     0.0262625 0.01669826 393   1.573
 TMT0 TN temp (C)25 - TMT20 TN temp (C)25     0.0328750 0.01669826 393   1.969
 TMT0 TN temp (C)25 - TMT0 TB temp (C)30      0.0285900 0.01493538 393   1.914
 TMT0 TN temp (C)25 - TMT0.5 TB temp (C)30    0.0033400 0.02240306 393   0.149
 TMT0 TN temp (C)25 - TMT1 TB temp (C)30      0.0133400 0.02240306 393   0.595
 TMT0 TN temp (C)25 - TMT10 TB temp (C)30     0.0548525 0.02240306 393   2.448
 TMT0 TN temp (C)25 - TMT20 TB temp (C)30     0.0614650 0.02240306 393   2.744
 TMT0 TN temp (C)25 - TMT0 TN temp (C)30      0.0370450 0.01056091 393   3.508
 TMT0 TN temp (C)25 - TMT0.5 TN temp (C)30    0.0117950 0.01975765 393   0.597
 TMT0 TN temp (C)25 - TMT1 TN temp (C)30      0.0217950 0.01975765 393   1.103
 TMT0 TN temp (C)25 - TMT10 TN temp (C)30     0.0633075 0.01975765 393   3.204
 TMT0 TN temp (C)25 - TMT20 TN temp (C)30     0.0699200 0.01975765 393   3.539
 TMT0.5 TN temp (C)25 - TMT1 TN temp (C)25    0.0100000 0.01669826 393   0.599
 TMT0.5 TN temp (C)25 - TMT10 TN temp (C)25   0.0515125 0.01669826 393   3.085
 TMT0.5 TN temp (C)25 - TMT20 TN temp (C)25   0.0581250 0.01669826 393   3.481
 TMT0.5 TN temp (C)25 - TMT0 TB temp (C)30    0.0538400 0.02240306 393   2.403
 TMT0.5 TN temp (C)25 - TMT0.5 TB temp (C)30  0.0285900 0.01493538 393   1.914
 TMT0.5 TN temp (C)25 - TMT1 TB temp (C)30    0.0385900 0.02240306 393   1.723
 TMT0.5 TN temp (C)25 - TMT10 TB temp (C)30   0.0801025 0.02240306 393   3.576
 TMT0.5 TN temp (C)25 - TMT20 TB temp (C)30   0.0867150 0.02240306 393   3.871
 TMT0.5 TN temp (C)25 - TMT0 TN temp (C)30    0.0622950 0.01975765 393   3.153
 TMT0.5 TN temp (C)25 - TMT0.5 TN temp (C)30  0.0370450 0.01056091 393   3.508
 TMT0.5 TN temp (C)25 - TMT1 TN temp (C)30    0.0470450 0.01975765 393   2.381
 TMT0.5 TN temp (C)25 - TMT10 TN temp (C)30   0.0885575 0.01975765 393   4.482
 TMT0.5 TN temp (C)25 - TMT20 TN temp (C)30   0.0951700 0.01975765 393   4.817
 TMT1 TN temp (C)25 - TMT10 TN temp (C)25     0.0415125 0.01669826 393   2.486
 TMT1 TN temp (C)25 - TMT20 TN temp (C)25     0.0481250 0.01669826 393   2.882
 TMT1 TN temp (C)25 - TMT0 TB temp (C)30      0.0438400 0.02240306 393   1.957
 TMT1 TN temp (C)25 - TMT0.5 TB temp (C)30    0.0185900 0.02240306 393   0.830
 TMT1 TN temp (C)25 - TMT1 TB temp (C)30      0.0285900 0.01493538 393   1.914
 TMT1 TN temp (C)25 - TMT10 TB temp (C)30     0.0701025 0.02240306 393   3.129
 TMT1 TN temp (C)25 - TMT20 TB temp (C)30     0.0767150 0.02240306 393   3.424
 TMT1 TN temp (C)25 - TMT0 TN temp (C)30      0.0522950 0.01975765 393   2.647
 TMT1 TN temp (C)25 - TMT0.5 TN temp (C)30    0.0270450 0.01975765 393   1.369
 TMT1 TN temp (C)25 - TMT1 TN temp (C)30      0.0370450 0.01056091 393   3.508
 TMT1 TN temp (C)25 - TMT10 TN temp (C)30     0.0785575 0.01975765 393   3.976
 TMT1 TN temp (C)25 - TMT20 TN temp (C)30     0.0851700 0.01975765 393   4.311
 TMT10 TN temp (C)25 - TMT20 TN temp (C)25    0.0066125 0.01669826 393   0.396
 TMT10 TN temp (C)25 - TMT0 TB temp (C)30     0.0023275 0.02240306 393   0.104
 TMT10 TN temp (C)25 - TMT0.5 TB temp (C)30  -0.0229225 0.02240306 393  -1.023
 TMT10 TN temp (C)25 - TMT1 TB temp (C)30    -0.0129225 0.02240306 393  -0.577
 TMT10 TN temp (C)25 - TMT10 TB temp (C)30    0.0285900 0.01493538 393   1.914
 TMT10 TN temp (C)25 - TMT20 TB temp (C)30    0.0352025 0.02240306 393   1.571
 TMT10 TN temp (C)25 - TMT0 TN temp (C)30     0.0107825 0.01975765 393   0.546
 TMT10 TN temp (C)25 - TMT0.5 TN temp (C)30  -0.0144675 0.01975765 393  -0.732
 TMT10 TN temp (C)25 - TMT1 TN temp (C)30    -0.0044675 0.01975765 393  -0.226
 TMT10 TN temp (C)25 - TMT10 TN temp (C)30    0.0370450 0.01056091 393   3.508
 TMT10 TN temp (C)25 - TMT20 TN temp (C)30    0.0436575 0.01975765 393   2.210
 TMT20 TN temp (C)25 - TMT0 TB temp (C)30    -0.0042850 0.02240306 393  -0.191
 TMT20 TN temp (C)25 - TMT0.5 TB temp (C)30  -0.0295350 0.02240306 393  -1.318
 TMT20 TN temp (C)25 - TMT1 TB temp (C)30    -0.0195350 0.02240306 393  -0.872
 TMT20 TN temp (C)25 - TMT10 TB temp (C)30    0.0219775 0.02240306 393   0.981
 TMT20 TN temp (C)25 - TMT20 TB temp (C)30    0.0285900 0.01493538 393   1.914
 TMT20 TN temp (C)25 - TMT0 TN temp (C)30     0.0041700 0.01975765 393   0.211
 TMT20 TN temp (C)25 - TMT0.5 TN temp (C)30  -0.0210800 0.01975765 393  -1.067
 TMT20 TN temp (C)25 - TMT1 TN temp (C)30    -0.0110800 0.01975765 393  -0.561
 TMT20 TN temp (C)25 - TMT10 TN temp (C)30    0.0304325 0.01975765 393   1.540
 TMT20 TN temp (C)25 - TMT20 TN temp (C)30    0.0370450 0.01056091 393   3.508
 TMT0 TB temp (C)30 - TMT0.5 TB temp (C)30   -0.0252500 0.01669826 393  -1.512
 TMT0 TB temp (C)30 - TMT1 TB temp (C)30     -0.0152500 0.01669826 393  -0.913
 TMT0 TB temp (C)30 - TMT10 TB temp (C)30     0.0262625 0.01669826 393   1.573
 TMT0 TB temp (C)30 - TMT20 TB temp (C)30     0.0328750 0.01669826 393   1.969
 TMT0 TB temp (C)30 - TMT0 TN temp (C)30      0.0084550 0.01056091 393   0.801
 TMT0 TB temp (C)30 - TMT0.5 TN temp (C)30   -0.0167950 0.01975765 393  -0.850
 TMT0 TB temp (C)30 - TMT1 TN temp (C)30     -0.0067950 0.01975765 393  -0.344
 TMT0 TB temp (C)30 - TMT10 TN temp (C)30     0.0347175 0.01975765 393   1.757
 TMT0 TB temp (C)30 - TMT20 TN temp (C)30     0.0413300 0.01975765 393   2.092
 TMT0.5 TB temp (C)30 - TMT1 TB temp (C)30    0.0100000 0.01669826 393   0.599
 TMT0.5 TB temp (C)30 - TMT10 TB temp (C)30   0.0515125 0.01669826 393   3.085
 TMT0.5 TB temp (C)30 - TMT20 TB temp (C)30   0.0581250 0.01669826 393   3.481
 TMT0.5 TB temp (C)30 - TMT0 TN temp (C)30    0.0337050 0.01975765 393   1.706
 TMT0.5 TB temp (C)30 - TMT0.5 TN temp (C)30  0.0084550 0.01056091 393   0.801
 TMT0.5 TB temp (C)30 - TMT1 TN temp (C)30    0.0184550 0.01975765 393   0.934
 TMT0.5 TB temp (C)30 - TMT10 TN temp (C)30   0.0599675 0.01975765 393   3.035
 TMT0.5 TB temp (C)30 - TMT20 TN temp (C)30   0.0665800 0.01975765 393   3.370
 TMT1 TB temp (C)30 - TMT10 TB temp (C)30     0.0415125 0.01669826 393   2.486
 TMT1 TB temp (C)30 - TMT20 TB temp (C)30     0.0481250 0.01669826 393   2.882
 TMT1 TB temp (C)30 - TMT0 TN temp (C)30      0.0237050 0.01975765 393   1.200
 TMT1 TB temp (C)30 - TMT0.5 TN temp (C)30   -0.0015450 0.01975765 393  -0.078
 TMT1 TB temp (C)30 - TMT1 TN temp (C)30      0.0084550 0.01056091 393   0.801
 TMT1 TB temp (C)30 - TMT10 TN temp (C)30     0.0499675 0.01975765 393   2.529
 TMT1 TB temp (C)30 - TMT20 TN temp (C)30     0.0565800 0.01975765 393   2.864
 TMT10 TB temp (C)30 - TMT20 TB temp (C)30    0.0066125 0.01669826 393   0.396
 TMT10 TB temp (C)30 - TMT0 TN temp (C)30    -0.0178075 0.01975765 393  -0.901
 TMT10 TB temp (C)30 - TMT0.5 TN temp (C)30  -0.0430575 0.01975765 393  -2.179
 TMT10 TB temp (C)30 - TMT1 TN temp (C)30    -0.0330575 0.01975765 393  -1.673
 TMT10 TB temp (C)30 - TMT10 TN temp (C)30    0.0084550 0.01056091 393   0.801
 TMT10 TB temp (C)30 - TMT20 TN temp (C)30    0.0150675 0.01975765 393   0.763
 TMT20 TB temp (C)30 - TMT0 TN temp (C)30    -0.0244200 0.01975765 393  -1.236
 TMT20 TB temp (C)30 - TMT0.5 TN temp (C)30  -0.0496700 0.01975765 393  -2.514
 TMT20 TB temp (C)30 - TMT1 TN temp (C)30    -0.0396700 0.01975765 393  -2.008
 TMT20 TB temp (C)30 - TMT10 TN temp (C)30    0.0018425 0.01975765 393   0.093
 TMT20 TB temp (C)30 - TMT20 TN temp (C)30    0.0084550 0.01056091 393   0.801
 TMT0 TN temp (C)30 - TMT0.5 TN temp (C)30   -0.0252500 0.01669826 393  -1.512
 TMT0 TN temp (C)30 - TMT1 TN temp (C)30     -0.0152500 0.01669826 393  -0.913
 TMT0 TN temp (C)30 - TMT10 TN temp (C)30     0.0262625 0.01669826 393   1.573
 TMT0 TN temp (C)30 - TMT20 TN temp (C)30     0.0328750 0.01669826 393   1.969
 TMT0.5 TN temp (C)30 - TMT1 TN temp (C)30    0.0100000 0.01669826 393   0.599
 TMT0.5 TN temp (C)30 - TMT10 TN temp (C)30   0.0515125 0.01669826 393   3.085
 TMT0.5 TN temp (C)30 - TMT20 TN temp (C)30   0.0581250 0.01669826 393   3.481
 TMT1 TN temp (C)30 - TMT10 TN temp (C)30     0.0415125 0.01669826 393   2.486
 TMT1 TN temp (C)30 - TMT20 TN temp (C)30     0.0481250 0.01669826 393   2.882
 TMT10 TN temp (C)30 - TMT20 TN temp (C)30    0.0066125 0.01669826 393   0.396
 p.value
  0.9942
  1.0000
  0.9908
  0.9131
  1.0000
  1.0000
  1.0000
  0.9696
  0.8593
  0.0604
  1.0000
  0.9999
  0.1439
  0.0549
  0.2129
  1.0000
  0.9986
  0.1442
  0.0622
  1.0000
  0.1943
  0.0656
  0.9776
  1.0000
  1.0000
  0.2186
  0.0912
  0.1641
  0.0604
  0.6752
  0.0016
  0.0004
  0.1620
  0.2129
  0.6022
  0.0031
  0.0009
  0.5954
  0.3059
  0.9997
  1.0000
  1.0000
  0.5621
  0.3176
  0.4712
  0.9983
  0.0604
  0.0123
  0.0033
  0.4227
  0.9900
  0.2129
  0.0172
  0.0056
  1.0000
  1.0000
  0.8113
  0.9817
  1.0000
  1.0000
  1.0000
  1.0000
  1.0000
  0.0604
  0.7929
  1.0000
  1.0000
  1.0000
  0.2129
  0.7151
  0.9996
  0.5738
  0.8978
  1.0000
  1.0000
  1.0000
  1.0000
  1.0000
  0.9928
  0.0604
  1.0000
  1.0000
  1.0000
  0.9732
  0.2129
  0.9942
  1.0000
  0.9908
  0.9131
  0.9318
  1.0000
  1.0000
  0.6244
  0.3995
  0.0604
  1.0000
  0.9999
  0.1439
  0.0549
  1.0000
  0.1943
  0.0656
  0.6587
  0.9318
  0.9752
  0.0489
  0.0180
  0.1641
  0.0604
  0.6752
  0.0016
  0.0004
  0.5954
  0.3059
  0.9174
  1.0000
  0.9318
  0.1743
  0.0778
  0.4712
  0.9983
  0.0604
  0.0123
  0.0033
  1.0000
  1.0000
  1.0000
  1.0000
  0.9318
  0.9909
  1.0000
  1.0000
  1.0000
  0.0604
  0.7929
  1.0000
  0.9990
  1.0000
  1.0000
  0.9318
  1.0000
  1.0000
  1.0000
  0.9928
  0.0604
  0.9942
  1.0000
  0.9908
  0.9131
  1.0000
  1.0000
  1.0000
  0.9696
  0.8593
  1.0000
  0.1943
  0.0656
  0.9776
  1.0000
  1.0000
  0.2186
  0.0912
  0.5954
  0.3059
  0.9997
  1.0000
  1.0000
  0.5621
  0.3176
  1.0000
  1.0000
  0.8113
  0.9817
  1.0000
  1.0000
  0.9996
  0.5738
  0.8978
  1.0000
  1.0000
  0.9942
  1.0000
  0.9908
  0.9131
  1.0000
  0.1943
  0.0656
  0.5954
  0.3059
  1.0000

P value adjustment: tukey method for comparing a family of 20 estimates 

8 Seed biomass

Barplot

plot_seed<- sum_seed %>%
  as_tibble() %>%
  ggplot(aes(x=TMT,
             y=mean_seed,
             ymin=mean_seed,
             ymax=mean_seed+SE_seed,
             fill=spp)) +
facet_grid(~`temp (C)`, switch="x", scales = "free_x", space="free_x") +
    theme(panel.spacing = unit(0, "lines"), 
         strip.background = element_blank(),
         strip.placement = "outside") +
  geom_bar(stat="identity",
           position="dodge",
           width=0.6,
           color="black") +
   scale_fill_manual(values = c(TN = "darkgrey", TB = "mediumblue")) +
  scale_y_continuous() +
  geom_errorbar(width=0.6, position="dodge") +
  labs(title="Mean ± SE Seed biomass (DWg) ",
       x="Salinity (ppt)",
       y="Mean ± SE Seed biomass (DWg)") +
  geom_hline(yintercept=mean(sum_seed$mean_seed), color="black", linetype=2) +
  theme_cowplot() +
theme(axis.text.x = element_text(angle=0, hjust=0.5),
       legend.text = element_text(size=rel(0.85)),
       text = element_text(family="serif", size=12), #TNR for windows
       legend.title = element_text(size=rel(0.85)))
plot_seed

8.1 Analysis

#fit best model, conduct factorial anova

m<- lm (`final seed DW (g)`~TMT*spp*`temp (C)`, data=data)
hist(m$residuals)

m1<-glm(`final seed DW (g)` ~ TMT*spp*`temp (C)`, data=data)
m2<-glm(`final seed DW (g)` ~ TMT*spp+`temp (C)`, data=data)
m3<-glm(`final seed DW (g)` ~ TMT+spp*`temp (C)`, data=data)
m4<-glm(`final seed DW (g)` ~ TMT+spp+`temp (C)`, data=data)

check_model(m4)

comp<-compare_performance(m1, m2, m3, m4)
comp #m3&4 similar, law of parsimony
# Comparison of Model Performance Indices

Name | Model | AIC (weights) | AICc (weights) | BIC (weights) |    R2 |  RMSE | Sigma
-------------------------------------------------------------------------------------
m1   |   glm | 912.4 (0.041) |  914.9 (0.016) | 996.2 (<.001) | 0.401 | 0.718 | 0.737
m2   |   glm | 910.2 (0.127) |  911.0 (0.110) | 958.1 (<.001) | 0.377 | 0.733 | 0.743
m3   |   glm | 907.6 (0.458) |  908.1 (0.471) | 943.5 (0.143) | 0.372 | 0.736 | 0.743
m4   |   glm | 908.0 (0.374) |  908.4 (0.403) | 940.0 (0.857) | 0.368 | 0.738 | 0.744
summary(m4)

Call:
glm(formula = `final seed DW (g)` ~ TMT + spp + `temp (C)`, data = data)

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-1.54107  -0.27717  -0.00107   0.49084   1.77633  

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept)   0.43722    0.09848   4.440 1.17e-05 ***
TMT0.5        0.01125    0.11771   0.096   0.9239    
TMT1         -0.15225    0.11771  -1.293   0.1966    
TMT10        -0.22025    0.11771  -1.871   0.0621 .  
TMT20        -0.24412    0.11771  -2.074   0.0387 *  
sppTN         1.09260    0.07445  14.676  < 2e-16 ***
`temp (C)`30 -0.17130    0.07445  -2.301   0.0219 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for gaussian family taken to be 0.5542326)

    Null deviance: 344.77  on 399  degrees of freedom
Residual deviance: 217.81  on 393  degrees of freedom
AIC: 908.02

Number of Fisher Scoring iterations: 2
report(m4)
We fitted a linear model (estimated using ML) to predict final seed DW (g) with
TMT, spp and temp (C) (formula: `final seed DW (g)` ~ TMT + spp + `temp (C)`).
The model's explanatory power is substantial (R2 = 0.37). The model's
intercept, corresponding to TMT = 0, spp = TB and temp (C) = 25, is at 0.44
(95% CI [0.24, 0.63], t(393) = 4.44, p < .001). Within this model:

  - The effect of TMT [0.5] is statistically non-significant and positive (beta =
0.01, 95% CI [-0.22, 0.24], t(393) = 0.10, p = 0.924; Std. beta = 0.01, 95% CI
[-0.24, 0.26])
  - The effect of TMT [1] is statistically non-significant and negative (beta =
-0.15, 95% CI [-0.38, 0.08], t(393) = -1.29, p = 0.196; Std. beta = -0.16, 95%
CI [-0.41, 0.08])
  - The effect of TMT [10] is statistically non-significant and negative (beta =
-0.22, 95% CI [-0.45, 0.01], t(393) = -1.87, p = 0.061; Std. beta = -0.24, 95%
CI [-0.49, 0.01])
  - The effect of TMT [20] is statistically significant and negative (beta =
-0.24, 95% CI [-0.47, -0.01], t(393) = -2.07, p = 0.038; Std. beta = -0.26, 95%
CI [-0.51, -0.01])
  - The effect of spp [TN] is statistically significant and positive (beta =
1.09, 95% CI [0.95, 1.24], t(393) = 14.68, p < .001; Std. beta = 1.18, 95% CI
[1.02, 1.33])
  - The effect of temp (C) [30] is statistically significant and negative (beta =
-0.17, 95% CI [-0.32, -0.03], t(393) = -2.30, p = 0.021; Std. beta = -0.18, 95%
CI [-0.34, -0.03])

Standardized parameters were obtained by fitting the model on a standardized
version of the dataset. 95% Confidence Intervals (CIs) and p-values were
computed using a Wald t-distribution approximation.

8.2 Post-hoc test

#post hoc

fitem<- emmeans(m4, ~ TMT+spp+`temp (C)`)
emdf<-as.data.frame(fitem) #put into df
tukey_seed<- fitem %>% pairs() #tukey hsd
tukeyseed<-as.data.frame(tukey_abg)

9 Germination

Barplot

plot_germ<- sum_germ %>%
  as_tibble() %>%
  ggplot(aes(x=TMT,
             y=mean_germ,
             ymin=mean_germ,
             ymax=mean_germ+SE_germ,
             fill=spp)) +
facet_grid(~`temp (C)`, switch="x", scales = "free_x", space="free_x") +
    theme(panel.spacing = unit(0, "lines"), 
         strip.background = element_blank(),
         strip.placement = "outside") +
  geom_bar(stat="identity",
           position="dodge",
           width=0.6,
           color="black") +
  scale_y_continuous(labels = scales::percent, limits=c (0,1))+
  scale_fill_manual(values = c(TN = "darkgrey", TB = "mediumblue")) +
  geom_errorbar(width=0.6, position="dodge") +
  labs(title="Mean ± SE germination (%) ",
       x="Salinity (ppt)",
       y="Mean ± SE germination (%)") +
  geom_hline(yintercept=mean(sum_germ$mean_germ), color="black", linetype=2) +
  theme_cowplot() +
theme(axis.text.x = element_text(angle=0, hjust=0.5),
       legend.text = element_text(size=rel(0.85)),
       text = element_text(family="serif", size=12), #TNR for windows
       legend.title = element_text(size=rel(0.85)))
plot_germ

Point and line plot

sum_germ$TMT <- as.numeric(as.character(sum_germ$TMT))

germ_point<- sum_germ %>%
  as_tibble() %>%
  ggplot(aes(x=TMT,
             y=mean_germ)) +
  geom_point(aes(shape=`temp (C)`, fill=spp, color=spp), size=4) +
    scale_shape_manual(values=c("25"=21, "30"=24))+
  scale_fill_manual(values = c(TN = "black", TB = "mediumblue")) +
  scale_color_manual(values = c(TN = "black", TB = "mediumblue"))+
  scale_y_continuous(labels = scales::percent, limits=c (0,1))+
  labs(title="Mean germination (%) ",
       x="Salinity (ppt)",
       y="Mean germination (%)") +
  geom_path(aes(group=interaction(spp, `temp (C)`), color=spp)) +
  theme_cowplot() +
theme(axis.text.x = element_text(angle=0, hjust=0.5),
       text = element_text(family="serif", size=12))
germ_point

Line plot over time

germ_plot<- germ_prop %>%
  as_tibble() %>%
  ggplot(aes(x=`Time (days)`,
             y=Proportion_germ)) +
  facet_grid(~Salinity)+
  geom_point(aes(shape=Temp, fill=Species, color=Species), size=3) +
    scale_shape_manual(values=c("25"=21, "30"=24))+
  scale_fill_manual(values = c(TN = "black", TB = "mediumblue")) +
  scale_color_manual(values = c(TN = "black", TB = "mediumblue"))+
  scale_y_continuous(limits=c (0,1))+
  geom_path(aes(group=interaction(Species, Temp), color=Species))+
  labs(title="Proportion germination",
       x="Time (days)",
       y="Proportion germination") +
  theme_cowplot() +
theme(axis.text.x = element_text(angle=0, hjust=0.5),
       text = element_text(family="serif", size=12))
germ_plot
Warning: Removed 12 rows containing missing values (`geom_point()`).
Warning: Removed 1 row containing missing values (`geom_path()`).

Alternative plot over time

temp_names <- as_labeller(
     c(`25` = "25°C", `30` = "30°C"))

library(RColorBrewer)

germ_plot2<- germ_prop %>%
  as_tibble() %>%
  ggplot(aes(x=`Time (days)`,
             y=Proportion_germ)) +
  facet_wrap(~Temp, labeller=temp_names)+
  geom_point(aes(shape=Species, fill=Salinity, color=Salinity), size=3) +
  scale_color_manual(values = c("0"="#1B9E77", "0.5"="#D95F02", "1"="#7570B3", "10"="#E6AB02", "20"="#666666"))+
  scale_y_continuous(limits=c (0,1))+
  geom_path(aes(group=interaction(Species, Salinity), color=Salinity))+
  labs(title="",
       x="Time (days)",
       y="Proportion germination\n") +
  theme_cowplot() +
theme(axis.text.x = element_text(angle=0, hjust=0.5, family="serif", size=18),
      axis.text.y = element_text(family="serif", size=18),
       text = element_text(family="serif", size=20))
germ_plot2
Warning: Removed 12 rows containing missing values (`geom_point()`).
Warning: Removed 1 row containing missing values (`geom_path()`).

9.1 Analysis

#fit model, conduct logistic regression, calculate odds ratio

m1<-glm(germination ~ TMT*spp*`temp (C)`, data=data, family = binomial(link="logit"))
m2<-glm(germination ~ TMT*spp+`temp (C)`, data=data, family = binomial(link="logit"))
m3<-glm(germination ~ TMT+spp*`temp (C)`, data=data, family = binomial(link="logit"))
m4<-glm(germination ~ TMT+spp+`temp (C)`, data=data, family = binomial(link="logit"))

check_model(m4)

comp<-compare_performance(m1, m2, m3, m4)
comp #m2 best fit
# Comparison of Model Performance Indices

Name | Model | AIC (weights) | AICc (weights) | BIC (weights) | Tjur's R2 |  RMSE | Sigma | Log_loss | Score_log | Score_spherical |   PCP
------------------------------------------------------------------------------------------------------------------------------------------
m1   |   glm | 272.9 (0.006) |  275.1 (0.003) | 352.7 (<.001) |     0.236 | 0.306 | 0.783 |    0.291 |    -9.855 |           0.032 | 0.813
m2   |   glm | 263.4 (0.741) |  264.1 (0.711) | 307.3 (0.004) |     0.236 | 0.308 | 0.788 |    0.302 |    -9.971 |           0.027 | 0.813
m3   |   glm | 265.8 (0.220) |  266.2 (0.247) | 297.7 (0.470) |     0.195 | 0.312 | 0.798 |    0.312 |    -9.388 |           0.028 | 0.803
m4   |   glm | 269.6 (0.033) |  269.9 (0.039) | 297.5 (0.526) |     0.200 | 0.312 | 0.806 |    0.319 |    -9.517 |           0.026 | 0.804
summary(m2)

Call:
glm(formula = germination ~ TMT * spp + `temp (C)`, family = binomial(link = "logit"), 
    data = data)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.4363  -0.5258  -0.2422  -0.1647   2.3245  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)    0.5907     0.3914   1.509 0.131305    
TMT0.5        -1.2858     0.5555  -2.315 0.020636 *  
TMT1          -0.3894     0.5113  -0.762 0.446247    
TMT10         -2.1685     0.6565  -3.303 0.000956 ***
TMT20        -18.4811   972.6279  -0.019 0.984840    
sppTN         -2.9474     0.8245  -3.575 0.000351 ***
`temp (C)`30  -1.9370     0.3876  -4.997 5.82e-07 ***
TMT0.5:sppTN   2.0647     1.0704   1.929 0.053739 .  
TMT1:sppTN     0.8371     1.0860   0.771 0.440819    
TMT10:sppTN    2.6162     1.1617   2.252 0.024319 *  
TMT20:sppTN   18.4811   972.6285   0.019 0.984840    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 327.58  on 399  degrees of freedom
Residual deviance: 241.38  on 389  degrees of freedom
AIC: 263.38

Number of Fisher Scoring iterations: 17
anova(m2,test="LRT") # conducting likelihood-ratio test
Analysis of Deviance Table

Model: binomial, link: logit

Response: germination

Terms added sequentially (first to last)

           Df Deviance Resid. Df Resid. Dev  Pr(>Chi)    
NULL                         399     327.58              
TMT         4   23.299       395     304.28 0.0001104 ***
spp         1   18.865       394     285.42 1.403e-05 ***
`temp (C)`  1   29.834       393     255.58 4.706e-08 ***
TMT:spp     4   14.198       389     241.38 0.0066888 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
report(m2)
We fitted a logistic model (estimated using ML) to predict germination with
TMT, spp and temp (C) (formula: germination ~ TMT * spp + `temp (C)`). The
model's explanatory power is moderate (Tjur's R2 = 0.24). The model's
intercept, corresponding to TMT = 0, spp = TB and temp (C) = 25, is at 0.59
(95% CI [-0.17, 1.38], p = 0.131). Within this model:

  - The effect of TMT [0.5] is statistically significant and negative (beta =
-1.29, 95% CI [-2.42, -0.22], p = 0.021; Std. beta = -1.29, 95% CI [-2.42,
-0.22])
  - The effect of TMT [1] is statistically non-significant and negative (beta =
-0.39, 95% CI [-1.41, 0.61], p = 0.446; Std. beta = -0.39, 95% CI [-1.41,
0.61])
  - The effect of TMT [10] is statistically significant and negative (beta =
-2.17, 95% CI [-3.58, -0.96], p < .001; Std. beta = -2.17, 95% CI [-3.58,
-0.96])
  - The effect of TMT [20] is statistically non-significant and negative (beta =
-18.48, 95% CI [-397.09, 12.47], p = 0.985; Std. beta = -18.48, 95% CI
[-397.09, 12.47])
  - The effect of spp [TN] is statistically significant and negative (beta =
-2.95, 95% CI [-4.89, -1.51], p < .001; Std. beta = -2.95, 95% CI [-4.89,
-1.51])
  - The effect of temp (C) [30] is statistically significant and negative (beta =
-1.94, 95% CI [-2.74, -1.21], p < .001; Std. beta = -1.94, 95% CI [-2.74,
-1.21])
  - The effect of TMT [0.5] × spp [TN] is statistically non-significant and
positive (beta = 2.06, 95% CI [0.03, 4.36], p = 0.054; Std. beta = 2.06, 95% CI
[0.03, 4.36])
  - The effect of TMT [1] × spp [TN] is statistically non-significant and
positive (beta = 0.84, 95% CI [-1.28, 3.13], p = 0.441; Std. beta = 0.84, 95%
CI [-1.28, 3.13])
  - The effect of TMT [10] × spp [TN] is statistically significant and positive
(beta = 2.62, 95% CI [0.37, 5.06], p = 0.024; Std. beta = 2.62, 95% CI [0.37,
5.06])
  - The effect of TMT [20] × spp [TN] is statistically non-significant and
positive (beta = 18.48, 95% CI [-15.66, 379.62], p = 0.985; Std. beta = 18.48,
95% CI [-15.66, 379.62])

Standardized parameters were obtained by fitting the model on a standardized
version of the dataset. 95% Confidence Intervals (CIs) and p-values were
computed using a Wald z-distribution approximation.
odds1<- tidy(m2, exponentiate = TRUE, conf.level = 0.95) #odds ratio
odds1
# A tibble: 11 × 5
   term         estimate std.error statistic     p.value
   <chr>           <dbl>     <dbl>     <dbl>       <dbl>
 1 (Intercept)   1.81e+0     0.391    1.51   0.131      
 2 TMT0.5        2.76e-1     0.556   -2.31   0.0206     
 3 TMT1          6.77e-1     0.511   -0.762  0.446      
 4 TMT10         1.14e-1     0.656   -3.30   0.000956   
 5 TMT20         9.41e-9   973.      -0.0190 0.985      
 6 sppTN         5.25e-2     0.825   -3.57   0.000351   
 7 `temp (C)`30  1.44e-1     0.388   -5.00   0.000000582
 8 TMT0.5:sppTN  7.88e+0     1.07     1.93   0.0537     
 9 TMT1:sppTN    2.31e+0     1.09     0.771  0.441      
10 TMT10:sppTN   1.37e+1     1.16     2.25   0.0243     
11 TMT20:sppTN   1.06e+8   973.       0.0190 0.985      
exp(coefficients(m2))
 (Intercept)       TMT0.5         TMT1        TMT10        TMT20        sppTN 
1.805222e+00 2.764317e-01 6.774393e-01 1.143494e-01 9.413960e-09 5.247372e-02 
`temp (C)`30 TMT0.5:sppTN   TMT1:sppTN  TMT10:sppTN  TMT20:sppTN 
1.441399e-01 7.883231e+00 2.309670e+00 1.368315e+01 1.062252e+08 
exp(confint(m2))
Waiting for profiling to be done...
Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
                     2.5 %        97.5 %
(Intercept)   8.458234e-01  3.979359e+00
TMT0.5        8.911481e-02  7.992506e-01
TMT1          2.451030e-01  1.839538e+00
TMT10         2.793892e-02  3.833792e-01
TMT20        3.507275e-173  2.604065e+05
sppTN         7.515026e-03  2.203594e-01
`temp (C)`30  6.430500e-02  2.970186e-01
TMT0.5:sppTN  1.029492e+00  7.796542e+01
TMT1:sppTN    2.770546e-01  2.296899e+01
TMT10:sppTN   1.454614e+00  1.582247e+02
TMT20:sppTN   1.586360e-07 7.396305e+164

10 Viability

Barplot

plot_via<- sum_via %>%
  as_tibble() %>%
  ggplot(aes(x=TMT,
             y=mean_viability,
             ymin=mean_viability,
             ymax=mean_viability+SE_viability,
             fill=spp)) +
facet_grid(~`temp (C)`, switch="x", scales = "free_x", space="free_x") +
    theme(panel.spacing = unit(0, "lines"), 
         strip.background = element_blank(),
         strip.placement = "outside") +
  geom_bar(stat="identity",
           position="dodge",
           width=0.6,
           color="black") +
   scale_fill_manual(values = c(TN = "darkgrey", TB = "mediumblue")) +
  scale_y_continuous(labels = scales::percent, limits=c (0,1))+
  geom_errorbar(width=0.6, position="dodge") +
  labs(title="Mean ± SE viability (%)",
       x="Salinity (ppt)",
       y="Mean ± SE viability (%)") +
  geom_hline(yintercept=mean(sum_via$mean_viability), color="black", linetype=2) +
  theme_cowplot() +
theme(axis.text.x = element_text(angle=0, hjust=0.5),
       legend.text = element_text(size=rel(0.85)),
       text = element_text(family="serif", size=12), #TNR for windows
       legend.title = element_text(size=rel(0.85)))
plot_via

10.1 Analysis

#fit model, conduct logistic regression, calculate odds ratio

m1<-glm(viability ~ TMT*spp*`temp (C)`, data=data, family = binomial(link="logit"))
m2<-glm(viability ~ TMT*spp+`temp (C)`, data=data, family = binomial(link="logit"))
m3<-glm(viability ~ TMT+spp*`temp (C)`, data=data, family = binomial(link="logit"))
m4<-glm(viability ~ TMT+spp+`temp (C)`, data=data, family = binomial(link="logit"))

check_model(m4)

comp<-compare_performance(m1, m2, m3, m4)
comp #m2 and m4 similar, will use simplest
# Comparison of Model Performance Indices

Name | Model | AIC (weights) | AICc (weights) | BIC (weights) | Tjur's R2 |  RMSE | Sigma | Log_loss | Score_log | Score_spherical |   PCP
------------------------------------------------------------------------------------------------------------------------------------------
m1   |   glm | 532.9 (0.002) |  535.2 (<.001) | 612.8 (<.001) |     0.142 | 0.463 | 1.139 |    0.616 |  -156.927 |           0.005 | 0.571
m2   |   glm | 522.1 (0.425) |  522.7 (0.381) | 566.0 (<.001) |     0.127 | 0.467 | 1.134 |    0.625 |  -153.657 |           0.005 | 0.563
m3   |   glm | 524.0 (0.164) |  524.3 (0.172) | 555.9 (0.052) |     0.110 | 0.472 | 1.138 |    0.635 |  -152.077 |           0.004 | 0.555
m4   |   glm | 522.1 (0.409) |  522.4 (0.446) | 550.1 (0.948) |     0.110 | 0.472 | 1.137 |    0.635 |  -152.206 |           0.004 | 0.555
rep<-anova(m4,test="LRT")
summary(m4)

Call:
glm(formula = viability ~ TMT + spp + `temp (C)`, family = binomial(link = "logit"), 
    data = data)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.7426  -1.0835   0.7033   1.0976   1.7684  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)   0.13364    0.27682   0.483  0.62926    
TMT0.5        0.05704    0.33777   0.169  0.86591    
TMT1         -0.49445    0.33315  -1.484  0.13776    
TMT10        -0.82118    0.33537  -2.449  0.01434 *  
TMT20        -1.10367    0.34029  -3.243  0.00118 ** 
sppTN         1.08031    0.21373   5.055 4.31e-07 ***
`temp (C)`30 -0.35869    0.21247  -1.688  0.09138 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 554.48  on 399  degrees of freedom
Residual deviance: 508.13  on 393  degrees of freedom
AIC: 522.13

Number of Fisher Scoring iterations: 4
report(m4)
We fitted a logistic model (estimated using ML) to predict viability with TMT,
spp and temp (C) (formula: viability ~ TMT + spp + `temp (C)`). The model's
explanatory power is weak (Tjur's R2 = 0.11). The model's intercept,
corresponding to TMT = 0, spp = TB and temp (C) = 25, is at 0.13 (95% CI
[-0.41, 0.68], p = 0.629). Within this model:

  - The effect of TMT [0.5] is statistically non-significant and positive (beta =
0.06, 95% CI [-0.61, 0.72], p = 0.866; Std. beta = 0.06, 95% CI [-0.61, 0.72])
  - The effect of TMT [1] is statistically non-significant and negative (beta =
-0.49, 95% CI [-1.15, 0.16], p = 0.138; Std. beta = -0.49, 95% CI [-1.15,
0.16])
  - The effect of TMT [10] is statistically significant and negative (beta =
-0.82, 95% CI [-1.49, -0.17], p = 0.014; Std. beta = -0.82, 95% CI [-1.49,
-0.17])
  - The effect of TMT [20] is statistically significant and negative (beta =
-1.10, 95% CI [-1.78, -0.44], p = 0.001; Std. beta = -1.10, 95% CI [-1.78,
-0.44])
  - The effect of spp [TN] is statistically significant and positive (beta =
1.08, 95% CI [0.67, 1.50], p < .001; Std. beta = 1.08, 95% CI [0.67, 1.50])
  - The effect of temp (C) [30] is statistically non-significant and negative
(beta = -0.36, 95% CI [-0.78, 0.06], p = 0.091; Std. beta = -0.36, 95% CI
[-0.78, 0.06])

Standardized parameters were obtained by fitting the model on a standardized
version of the dataset. 95% Confidence Intervals (CIs) and p-values were
computed using a Wald z-distribution approximation.
odds<- tidy(m4, exponentiate = TRUE, conf.level = 0.95) #odds ratio
odds
# A tibble: 7 × 5
  term         estimate std.error statistic     p.value
  <chr>           <dbl>     <dbl>     <dbl>       <dbl>
1 (Intercept)     1.14      0.277     0.483 0.629      
2 TMT0.5          1.06      0.338     0.169 0.866      
3 TMT1            0.610     0.333    -1.48  0.138      
4 TMT10           0.440     0.335    -2.45  0.0143     
5 TMT20           0.332     0.340    -3.24  0.00118    
6 sppTN           2.95      0.214     5.05  0.000000431
7 `temp (C)`30    0.699     0.212    -1.69  0.0914     
exp(coefficients(m4))
 (Intercept)       TMT0.5         TMT1        TMT10        TMT20        sppTN 
   1.1429830    1.0586930    0.6099069    0.4399134    0.3316511    2.9455794 
`temp (C)`30 
   0.6985905 
exp(confint(m4))
Waiting for profiling to be done...
                 2.5 %    97.5 %
(Intercept)  0.6655983 1.9775496
TMT0.5       0.5454985 2.0570186
TMT1         0.3156317 1.1683807
TMT10        0.2260677 0.8441246
TMT20        0.1683681 0.6409755
sppTN        1.9453041 4.5004475
`temp (C)`30 0.4596539 1.0582066