I'm using lmer4 package [lmer() function] to estimate several Average Models, which I want to plot their Estimated Coefficients. I found this document, "Plotting Estimates (Fixed Effects) of Regression Models, by Daniel Lüdecke" that explains how to plot Estimates, and it works with Average Models, but uses Conditional Average values instead of Full Average values.
Example of script:
library(lme4) options(na.action = "na.omit") PA_model_clima1_Om_ST <- lmer(O.matt ~ mes_N + Temperatura_Ar_PM_ST + RH_PM_ST + Vento_V_PM_ST + Evapotranspiracao_PM_ST + Preci_total_PM_ST + (1|ID), data=Abund) library(MuMIn) options(na.action = "na.fail") PA_clima1_Om_ST<-dredge(PA_model_clima1_Om_ST) sort.PA_clima1_Om_ST<- PA_clima1_Om_ST[order(PA_clima1_Om_ST$AICc),] top.models_PA_clima1_Om_ST<-get.models(sort.PA_clima1_Om_ST, subset = delta < 2) model.sel(top.models_PA_clima1_Om_ST) Avg_PA_clima1_Om_ST<-model.avg(top.models_PA_clima1_Om_ST, fit = TRUE) summary(Avg_PA_clima1_Om_ST)
Results of this script:
Term codes: Evapotranspiracao_PM_ST Preci_total_PM_ST RH_PM_ST Temperatura_Ar_PM_ST 1 2 3 4 Vento_V_PM_ST 5 Model-averaged coefficients: (full average) Estimate Std. Error Adjusted SE z value Pr(>|z|) (Intercept) 5.4199 1.4094 1.4124 3.837 0.000124 *** Preci_total_PM_ST -0.8679 1.0300 1.0313 0.842 0.400045 RH_PM_ST 0.6116 0.8184 0.8193 0.746 0.455397 Temperatura_Ar_PM_ST -1.9635 0.7710 0.7725 2.542 0.011026 * Vento_V_PM_ST -0.6214 0.7043 0.7052 0.881 0.378289 Evapotranspiracao_PM_ST -0.1202 0.5174 0.5183 0.232 0.816654 (conditional average) Estimate Std. Error Adjusted SE z value Pr(>|z|) (Intercept) 5.4199 1.4094 1.4124 3.837 0.000124 *** Preci_total_PM_ST -1.2200 1.0304 1.0322 1.182 0.237249 RH_PM_ST 1.0067 0.8396 0.8410 1.197 0.231317 Temperatura_Ar_PM_ST -1.9635 0.7710 0.7725 2.542 0.011026 * Vento_V_PM_ST -0.8607 0.6936 0.6949 1.238 0.215546 Evapotranspiracao_PM_ST -0.3053 0.7897 0.7912 0.386 0.699619 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Plot scrip:
library(sjPlot) library(sjlabelled) library(sjmisc) library(ggplot2) data(efc) theme_set(theme_sjplot()) plot_model(Avg_PA_clima1_Om_ST, type="est", vline.color="black", sort.est = TRUE, show.values = TRUE, value.offset = .3, title= "O. mattogrossae")
As you can see, it uses the values of Conditional Average values instead of Full Average values. How can I plot Estimates of Average Models using Full Average values?
Abund
to replicate your model and help you. – Duck