+
Effect of samples variables on alpha diversity using automated model
+selection and multimodel inference with (G)LMs
+
+
From the help of glmulti package :
+
+glmulti finds what are the n best models (the confidence set of
+models) among all possible models (the candidate set, as specified by
+the user). Models are fitted with the specified fitting function
+(default is glm) and are ranked with the specified Information Criterion
+(default is aicc). The best models are found either through exhaustive
+screening of the candidates, or using a genetic algorithm, which allows
+very large candidate sets to be adressed. The output can be used for
+model selection, variable selection, and multimodel inference.
+
+
+library("glmulti")
+formula <- "Hill_0 ~ Hill_1 + Abundance + Time + Height"
+res_glmulti <-
+ glmutli_pq(data_fungi, formula = formula, level = 1)
+#> Initialization...
+#> TASK: Exhaustive screening of candidate set.
+#> Fitting...
+#> Completed.
+res_glmulti
+#> estimates unconditional_interval nb_model importance
+#> Hill_1 3.062117997 1.868174e-01 8 1
+#> Abundance 0.002959644 8.478374e-08 8 1
+#> Time 0.789091999 2.443263e-01 8 1
+#> HeightLow 6.884340946 3.444196e+01 8 1
+#> HeightMiddle 0.339123798 3.727962e+01 8 1
+#> alpha variable
+#> Hill_1 8.570200e-01 Hill_1
+#> Abundance 5.773492e-04 Abundance
+#> Time 9.800932e-01 Time
+#> HeightLow 1.163660e+01 HeightLow
+#> HeightMiddle 1.210648e+01 HeightMiddle
+
+ggplot(data = res_glmulti, aes(x = estimates, y = variable)) +
+ geom_point(
+ size = 2,
+ alpha = 1,
+ show.legend = FALSE
+ ) +
+ geom_vline(
+ xintercept = 0,
+ linetype = "dotted",
+ linewidth = 1
+ ) +
+ geom_errorbar(
+ aes(xmin = estimates - alpha, xmax = estimates + alpha),
+ width = 0.8,
+ position = position_dodge(width = 0.8),
+ alpha = 0.7,
+ show.legend = FALSE
+ ) +
+ geom_label(aes(label = nb_model), nudge_y = 0.3, size = 3) +
+ xlab("Standardized estimates") +
+ ylab(formula)
+

+
+

+
+formula <- "Hill_0 ~ Abundance + Time + Height"
+res_glmulti_interaction <-
+ glmutli_pq(data_fungi, formula = formula, level = 2)
+#> Initialization...
+#> TASK: Exhaustive screening of candidate set.
+#> Fitting...
+#>
+#> After 50 models:
+#> Best model: Hill_0~1+Abundance+Time+Time:Abundance+Height:Abundance+Height:Time
+#> Crit= 1069.11608982306
+#> Mean crit= 1218.19009955263
+#> Completed.
+res_glmulti_interaction
+#> estimates unconditional_interval nb_model importance
+#> HeightHigh:Time 0.1004073616 4.167750e-02 8 0.04216251
+#> Abundance:HeightHigh 0.0001609310 8.984023e-08 8 0.09020701
+#> HeightLow -0.7865687564 9.769200e+00 32 0.24714664
+#> HeightMiddle -2.6419930721 2.789953e+01 32 0.24714664
+#> HeightLow:Time -0.6511123699 1.599292e+00 32 0.55051517
+#> HeightMiddle:Time -1.3322473025 3.078720e+00 32 0.55051517
+#> Abundance:Time -0.0001068559 4.586032e-09 32 0.81587143
+#> Abundance:HeightLow 0.0011137659 7.957713e-07 32 0.86967993
+#> Abundance:HeightMiddle 0.0017155970 1.245718e-06 32 0.86967993
+#> Abundance 0.0024839088 8.790126e-07 32 0.90902176
+#> Time 2.7869220741 2.663548e+00 32 0.92512111
+#> alpha variable
+#> HeightHigh:Time 4.006348e-01 HeightHigh:Time
+#> Abundance:HeightHigh 5.877776e-04 Abundance:HeightHigh
+#> HeightLow 6.171172e+00 HeightLow
+#> HeightMiddle 1.038989e+01 HeightMiddle
+#> HeightLow:Time 2.491898e+00 HeightLow:Time
+#> HeightMiddle:Time 3.449710e+00 HeightMiddle:Time
+#> Abundance:Time 1.335247e-04 Abundance:Time
+#> Abundance:HeightLow 1.759641e-03 Abundance:HeightLow
+#> Abundance:HeightMiddle 2.198334e-03 Abundance:HeightMiddle
+#> Abundance 1.847287e-03 Abundance
+#> Time 3.214276e+00 Time
+
+ggplot(data = res_glmulti_interaction, aes(x = estimates, y = variable)) +
+ geom_point(
+ size = 2,
+ alpha = 1,
+ show.legend = FALSE
+ ) +
+ geom_vline(
+ xintercept = 0,
+ linetype = "dotted",
+ linewidth = 1
+ ) +
+ geom_errorbar(
+ aes(xmin = estimates - alpha, xmax = estimates + alpha),
+ width = 0.8,
+ position = position_dodge(width = 0.8),
+ alpha = 0.7,
+ show.legend = FALSE
+ ) +
+ geom_label(aes(label = nb_model), nudge_y = 0.3, size = 3) +
+ xlab("Standardized estimates") +
+ ylab(formula)
+

+
+

+