Open lizzieinvancouver opened 1 year ago
@MoralesCastilla Can you confirm where the code is for each ms plot? Here's the main text ones ...
Fig1_phylo_muplots191.pdf
Fig2_lambdas_sigmas.pdf
Fig3_correlations_lambestvslamb0.pdf
@MoralesCastilla Did my tasks as best possible, see commit a157206bb032059d50a90e171e784056b198efa7
@lizzieinvancouver I have made some progress with my tasks. A few still remaining for which I have doubts:
[x] think on what else is missing from supp I added a supp figure for model accuracy (comparing bayes R2) to substantiate the end of the paragraph in line170 of the main text. We'll probably come with new things to add to the supp
[x] track down ? in PDF and fix ... @lizzieinvancouver thinks they are do to a lack of named tables in the supp. So should be easy to fix now that she got cross-referencing to fix. I have made changes accordingly, but cannot check if they work as still having compile issues (working on that), please compile the files to see if-how this works.
[x] Finish methods on forecasting figure that @lizzieinvancouver started in supp. To do
[ ] When possible, move the code for numbers into phylo_ospree_compact4_angiogymno_updateprior.R
and cite directly in text using \Sexpr
. @lizzieinvancouver did this when I could, but some numbers are still in the plotting file.
To do
About code for each ms plots (Fig1_phylo_muplots191.pdf; Fig2_lambdas_sigmas.pdf;Fig3_correlations_lambestvslamb0.pdf), it is still in phylo_ospree_plots.R, but I'm passing it to phylo_ospree_compact4.R
@MoralesCastilla This is great progress! I was actually think an R2 could be nice.
Though sorry to hear about the compiling issues. Once you have cross referencing you have to compile the supp so an an aux file exists for the main text to read, maybe that is part of the issue?
I got the code to compile but it crashed more than I recall before it actually worked ... I got the following errors for the main text:
! LaTeX Error: \begin{document} ended by \end{comment}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.279 \end{comment}
? (U+0013)
I suggest deleting that \end{comment}
. That ? (U+0013)
can happen when you pasted in text from somewhere else and unwittingly added in a special character that can be impossible to see.
There are a lot of supp errors -- some seem to be due to missing cross referencing so I set that up now -- you'll need a supp aux file to compile the main text and a main text aux file to compile the supp now. But there are a lot in the log file, so we may need to tackle more of them.
@MoralesCastilla I did a few things, including:
We need to fix these things before sending around:
Issue below is: Can you tell me what you mean by this?
7.2\% and 3.7\%, I'm using \Sexpr with bzfchange and bzcchange in lines 418-420 from phylo_ospree_compact4_angi... the previous values (7.2, 3.7, come from lines 616-618 in phylo_ospree_plots.R, but they measure departure from the 1-1 PMM-HMM relation so, not quite what we want here.
What PMM-HMM relation? Do you mean for mean species point estimates or such? I don't understand ...
But if we leave in the current other values we need to change the text. I am pasting in my idea here just so we have it:
Our approach, which partially pooled species responses based on their shared evolutionary history, estimated lower average responses to temperature (model slopes for forcing and chilling decreased by \Sexpr{bzfchange}\% and \Sexpr{bzcchange}\%, respectively; Fig. \ref{fig:correls_angio}) alongside substantially higher variation across species compared with more widely used hierarchical models.
And before we submit we should:
@lizzieinvancouver I'm replying to the "issue below":
The 1:1 PMM-HMM relation referred to how the slope of the linear relationship (i.e. lm(cueforce \~cueforce0)) differed from one. This is, the 7.2% value was computed as the percent departure from a slope of one (it was 1.072 for lm(cueforce \~cueforce0)). I originally computed these values as a way to quantify bias in the relationship between PMM and HMM across species based on figure S2: if the slope was 1, then there would be no difference between PMM and HMM, but there is a slight difference in the slope. However, I think it may make more sense to compute these species-level differences as now done. If this explanation makes sense, I'd agree to change the text to your suggestion above.
The 1:1 PMM-HMM relation referred to how the slope of the linear relationship (i.e. lm(cueforce ~cueforce0)) differed from one.
@MoralesCastilla Got it! Now that I understand (and am less tired), I think that I agree. The new values are the average (mu) values so, we could actually edit the text a little more to explain this discrepancy. The discrepancy being that we're saying species are more variable, but then saying slopes decrease ... how is that possible? Well the range also decreases:
> range(cueforce0)
[1] -18.791788 1.898548
> range(cueforce)
[1] -17.780254 2.906553
Basically this means in the previous model, species with wild responses were allowed more at the same time that most species were pulled way in -- resulting in a higher value on average. I am not sure how much we want to get into this, but perhaps easiest is to move this all around. So ...
Updated paragraph:
Our results highlight that species-level variability can be extremely high---when properly estimated. Our approach, which partially pooled species responses based on their shared evolutionary history, estimated substantially higher variation across species compared with more widely used hierarchical models. This was especially noticeable in temperature responses (for chilling variance across species means, $var(\beta_{chill,j})$ in eqn. \ref{modelmu}, was estimated as \Sexpr{varpmmchill} in the phylogenetic model, versus \Sexpr{varhmmchill} in the non-phylogenetic model; variance across means of $var(\beta_{force,j})$: \Sexpr{varpmmforce} compared to \Sexpr{varhmmforce}) while photoperiod, which had low phylogenetic structure, was more similar across approaches (variance across means of $var(\beta_{photo,j})$: \Sexpr{varpmmphoto} compared to \Sexpr{varhmmphoto}).
End of first paragraph in R&D:
We estimated lower average responses to temperature compared to a model without phylogeny (model slopes for forcing and chilling decreased by \Sexpr{bzfchange}\% and \Sexpr{bzcchange}\%, respectively; Fig. \ref{fig:correls_angio}); responses to chilling and forcing were also more similar when including phylogeny (though chilling was still greater: \Sexor{chillsens} vs. \Sexpr{forcesens} per standard unit), which contrasts with previous results suggesting chilling responses are much greater than forcing \citep{Laube:2014a,ettinger2020}.
Edited second paragraph of R&D:
These average estimates, however, fail to capture the large differences in species' responses to both chilling and forcing (Fig. \ref{fig:muplot_all}, Supporting Table \ref{tab:tablesupp3}). By allowing species responses to vary based on a model including their shared evolutionary history, we found species differences dwarfed the mean differences between cues, especially temperature cues (Fig. \ref{fig:muplot_all}). The largest in magnitude cue---chilling---varied 25-fold between species, while variation to forcing varied 6-fold. This variation in chilling across species means large differences between chilling and forcing, as previously reported \citep{Laube:2014a,ettinger2020}, occur at the species-level and not across species. These results highlight why robust phenological forecasts must account for both the complexity of multiple cues and species-level variation in responses to them.
@MoralesCastilla I am happy to make these changes today if you suggest a good time.
@MoralesCastilla Supp reviewed and I added the changes mentioned above ('issue below') -- I think I also put back some of my edits you accidentally deleted in the merge, but if not I will hopefully catch them another day.
I found more xr issues (again, do not add that main- or supp- thing ... this is how I am fixing these). HTH and looks good to me!
One last tweak ....
@MoralesCastilla I can work on the following in the next few days ...
phylo_ospree_plots_final.R
.")%
for this line in supp:%\externaldocument{PhenoPhylo_ms}
)You need to ....
analyses/phylogeny/burstmodels/phylo_simulate_fit_uber_threeslopeintercept_simdelta.R
phylo_ospree_compact4_angiogymno_updateprior.R
and cite directly in text using\Sexpr
. @lizzieinvancouver did this when I could, but some numbers are still in the plotting file.For the stan code I added a placeholder to the supp. I think the verbatim environment will work. Be sure to include the priors within the Stan code.