Open DeirdreLoughnan opened 9 months ago
@lizzieinvancouver Even though I think the above suggests that the issue was the priors, for interests sake I am still did the additional tests:
These results do tell a similar story in the sense that there is still an interaction between transect and latitude and the cue relationships are pretty similar.
mean X2.5. X25. X50. X75. X97.5.
b_tranE 1.8575176 1.2519812 1.6434767 1.8570050 2.06573026 2.470343
b_tranlat 1.4019006 0.9360087 1.2465819 1.3996010 1.55772055 1.863095
muForceSp -8.0936370 -13.3566281 -9.9815798 -8.0095984 -6.28133208 -2.881793
muChillSp -11.5519968 -18.3020704 -13.9502212 -11.5086216 -9.20356778 -5.025360
muPhotoSp -6.5765055 -10.4410879 -7.8565668 -6.5591979 -5.32960313 -2.778176
muPhenoSp 27.0104783 24.2052445 26.0565377 27.0004840 27.93281422 29.964245
betaTraitxForce -0.3815066 -1.6963016 -0.8312392 -0.3937763 0.06974534 0.906565
betaTraitxChill -0.3465777 -1.9511025 -0.9013413 -0.3475574 0.21160049 1.188138
betaTraitxPhoto 0.7907074 -0.1628205 0.4819119 0.7849496 1.11460923 1.748954
sigma_traity 1.6327036 1.5716594 1.6116687 1.6321344 1.65357435 1.695721
sigma_sp 0.9838541 0.7748140 0.8995156 0.9761239 1.05831078 1.237590
sigmaForceSp 5.2003506 3.9819366 4.7297559 5.1451815 5.63511078 6.630324
sigmaChillSp 9.4864517 7.2808759 8.6319178 9.3898808 10.24624099 12.157182
sigmaPhotoSp 2.2839195 1.3770702 1.9468371 2.2692136 2.59452660 3.342477
sigmaPhenoSp 9.7391284 7.9235980 9.0130217 9.6607321 10.36192445 12.022227
sigmapheno_y 9.4986960 9.2791861 9.4260397 9.4984315 9.57233219 9.716015
Similarly as above the wider prior for the betaTraitxCue of (0,25), changed the estimates for these three parameters (and the cue parameters a little bit. But widening the priors further (e.g (0, 50) or (0,100), the model is able to make consistent estimates.
When the height data is adjusted to be on a similar scale as the LMA data (by dividing it by 100), you do get issues with the prior informing the posterior, exactly like what we saw with the LMA mdl.
Collectively, this suggests to me that there is an issue with both the scaling and the prior being too narrow.
Next I will try running the SSD and C:N data with z-scoring and a wider prior and see if this fixes their modelling issues as well.
@DeirdreLoughnan Sounds promising!
While the model seems to run fine for height and DBH, models for SSD, LMA, and C:N (which have much smaller trait values) seem to have some issues in estimating the betaTraitxCue parameters.
In the model code, these are the parameters that link the trait part of the model to the phenology part of the model:
To try to test whether it simply a scaling issue, I have tried several approaches: 1. z-score everything (using 2 sd, given that I am z-scoring a 0/1 dummy variable, 2. Multiply LMA by 100, so it is on the same scale as models that seem to be working (like height), 3. Running the height model on a smaller scale, if scaling really is the issue then small values of the height model should cause the same issue.
Generally speaking, I think the model was constrained by the priors. I didn't have an intuitive sense of what a reasonable values for the betaTraitxCue parameter should be, so I was relying on what we did for the traitors model, but perhaps this was too short sighted. Really big priors seem to fix the issue.
1b. Running the z-scored model with a huge prior for the betaTraitCue parameters (0,25). This produced very different estimates for the betaTraitCue parameters, but fairly similar estimates for everything else:
But the posteriors no longer appear totally informed by the prior:![betaTraitxCue_z2AllParam_0_25](https://github.com/DeirdreLoughnan/Treetraits/assets/16216421/64352bc0-f4d1-4676-8a6c-d8f8eeb7123a)
1c. I tried running it again with an even wider prior (0,100) and the values are pretty similar.
.....more updates to come