I’m fairly new with stats and using glmmTMB and glmer, so bare with my explanation.
I’m analyzing data that is looking to see how different socioeconomic variables interact with each other and predict area of greenspace (continuous data) in a 3 way interaction. My socioeconomic data is scaled. I have 26 Sites and those Sites fall under 5 Classifications. Only one site can be under one classification. A classification can have many unique sites.
I have the following code:
mod29 = glmmTMB(PLAND_GreenspaceSum ~ (0 + Education + Med.Household_Income + Population + Underrepresented_Minorities)^3 + (1 |Classification)+ (1/Site), data = dat_2kmplandsocio_scaled)
summary(mod29)
simulationOutput29 <- simulateResiduals(fittedModel = mod29, plot = F)
plot(simulationOutput29)
And it works great with diagnostic residuals looking good too.
enter image description here
My questions is, what is going on with the nested effects? When I have
(1 |Classification)+ (1/Site)
the code works. When I originally had
(1 |Classification)+ (1|Site)
the code worked, but i got less significant interactions, and my residuals don’t look great.enter image description here
So I’m curious what is going on when
(1/Site) vs (1|Site)
I’ve been trying to search for it, and also within glmmTMB manal, but I can’t find it. Anyone know what it means and the differences between a (|) and (/)?
Thank you so much
See questions and code above. I just need a way to defend my reasoning for the model I’m choosing and elements I have in it.