Hi all,
I’m looking at the influence of several variables on a response variable and to do this I’ve created different models. I then used the loo function to observe the best model, but there was no significant difference between my models.
So I don’t know how I can choose which variables have the greatest influence on my dependent variable.
I’ve attached the code for my 4 compared models as well as the R output.
Model1= brm(nestedness.2~modularity_mean+within_mod + (1|gr(apes, cov = A)) + (1|Subpopulation),
data = DATAA, family = gaussian(), data2 = list(A = A), prior = c(prior(inv_gamma(0.002,0.002), "sd"),
prior(inv_gamma(0.002,0.002), "sigma")), sample_prior = TRUE, chains = 4, cores = 2, iter = 125000,
warmup = 62500, thin=25, save_pars = save_pars(all = TRUE))
model2 = brm(nestedness.2~density_mean+within_den + modularity_mean+within_mod
+sex_ratio_mean+within_SR + (1|gr(apes, cov = A)) + (1|Subpopulation),data = DATAA,family = gaussian(),data2 = list(A = A), prior = c(prior(inv_gamma(0.002,0.002), "sd"),prior(inv_gamma(0.002,0.002), "sigma")
), sample_prior = TRUE, chains = 4, cores = 2, iter = 125000, warmup = 62500, thin=25)
model3 = brm(nestedness.2~modularity_mean+within_mod + size_mean + within_size + (1|gr(apes, cov = A)) + (1|Subpopulation), data = DATAA, family = gaussian(), data2 = list(A = A), prior = c(prior(inv_gamma(0.002,0.002), "sd"),prior(inv_gamma(0.002,0.002), "sigma") ), sample_prior = TRUE, chains = 4, cores = 2, iter = 125000,
warmup = 62500, thin=25, save_pars = save_pars(all = TRUE))
model4 = brm(nestedness.2~density_mean+within_den + modularity_mean+within_mod
+sex_ratio_mean+within_SR+size_mean+within_size + (1|gr(apes, cov = A)) + (1|Subpopulation),
data = DATAA, family = gaussian(), data2 = list(A = A), prior = c(prior(inv_gamma(0.002,0.002), "sd"),prior(inv_gamma(0.002,0.002), "sigma") ), sample_prior = TRUE, chains = 4, cores = 2, iter = 125000,
warmup = 62500, thin=25, save_pars = save_pars(all = TRUE))
loo4.4 = loo(modelBRMS4.4,moment_match = TRUE)
loo3.3 = loo(modelBRMS3.3,moment_match = TRUE)
loo2.2 = loo(modelBRMS2.2)
loo1.1 = loo(modelBRMS1.1)
loo_compare(loo1.1,loo2.2,loo3.3,loo4.4)
#. elpd_diff se_diff elpd_loo p_loo looic
model1 0.0 0.0 11.2 7.2 -22.4
model3 -0.2 1.4 11.0 8.4 -22.0
model2 -0.9 3.1 10.3 11.3 -20.6
model4 -1.5 3.5 9.7 12.7 -19.4
In addition, I produced the same analysis with the MCMCglmm package and compared these models with each other using the DIC criterion: the best model corresponds to the worst model with the BRMS package (model1) whereas the best model here (model4) corresponds to the worst model with the MCMCglmm package. I don’t really understand how this is possible? Could it be due to the difference in the selection criteria?
Thank you in advance for your feedback