Open DeirdreLoughnan opened 1 year ago
But I guess I did not think we wanted the interactions between pop and spp, would the comparable model to the one produced by Cat's code not be...
@DeirdreLoughnan Ah, good catch! We do have a fully crossed design so we should not nest population within species. Your syntax looks promising to me but I don't actually know lmer syntax that well so cannot confirm. You'd have to look it up somewhere.
@lizzieinvancouver I have been working on this analysis and tried writing a simple model from scratch and testing it using test data. The results, all of which can be found in the associated pdf are different from the above and do show species level differences.
For example here are the posterior estimates for SLA, with data combined across years.
I would be happy to chat more about the results (LDMC is a little odd) and next steps with the analysis.
@DeirdreLoughnan Wow! I am very impressed you got the crossed Stan code to work. That's great. And the results look semi-sensical to me. Could you update the associated PDF with figure captions (which trait -- what you think the take home message is from the figure's results) and then hopefully we can try to find time to chat.
@lizzieinvancouver I added some text to each trait section.
My schedule is very flexible, so I would be happy to chat at a time that works well for you!
@DeirdreLoughnan Thanks! I will try to think on this more before Thursday (busy week, so we'll see). In the meanwhile, am I correct that LDMC is the only trait with pop > sp variation? If so, why do you think that is?
@DeirdreLoughnan Just following up with some more notes having revisited the PDF file you made.
On my above query about LDMC I realized the models just look wrong to me. Those population values clustered at 300 do not make sense -- if all the populations cluster there then the value should have ended up on mu_grand. I suggest you check your model. I would start by checking priors for mu_grand. Let me know how it goes.
@lizzieinvancouver I re-ran the trait model using rstanarm, but the syntax we disucssed:
ldmcMdl <- stan_glmer(LDMC ~ (1|sppFact/popFact), data = ldmcFull)
The rstan model runs fine and very quickly and interestingly it does produce species differences! Below is the plot of the posterior estimates for LDMC.
All trait plots of the posterior estimates can be found in here, docs/traitsCGRstanarm.pdf
But I guess I did not think we wanted the interactions between pop and spp, would the comparable model to the one produced by Cat's code not be:
ldmcMdl <- stan_glmer(LDMC ~ (1|sppFact) + (1|popFact), data = ldmcFull)