lizzieinvancouver / ospree

Budbreak review paper database
3 stars 0 forks source link

misc to do in phylo #455

Open lizzieinvancouver opened 1 year ago

lizzieinvancouver commented 1 year ago

@MoralesCastilla I can work on the following in the next few days ...

You need to ....

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.

\section{Stan code}
\begin{verbatim}
\end{verbatim}
lizzieinvancouver commented 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

lizzieinvancouver commented 1 year ago

@MoralesCastilla Did my tasks as best possible, see commit a157206bb032059d50a90e171e784056b198efa7

MoralesCastilla commented 1 year ago

@lizzieinvancouver I have made some progress with my tasks. A few still remaining for which I have doubts:

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

lizzieinvancouver commented 1 year ago

@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.

lizzieinvancouver commented 1 year ago

@MoralesCastilla I did a few things, including:

  1. I think I fixed your cross ref issue: do not add main- or supp- ... not needed for cross-ref. And since I deleted it from your preamble to fix before, you definitely do not want it now.
  2. small stuff (campestre not campestris spelling throughout -- please check figures on this; credible interval -> uncertainty interval; you cannot use \degree without a certain package so I switched to \circ)
  3. Read and tweaked main text
  4. Added line numbers, but we can remove if you want!

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:

MoralesCastilla commented 1 year ago

@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.

lizzieinvancouver commented 1 year ago

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.

lizzieinvancouver commented 1 year ago

@MoralesCastilla I am happy to make these changes today if you suggest a good time.

lizzieinvancouver commented 1 year ago

@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 ....