lizzieinvancouver / ospree

Budbreak review paper database
3 stars 0 forks source link

Traitor conceptual fig + slopes vs bb #444

Open DeirdreLoughnan opened 1 year ago

DeirdreLoughnan commented 1 year ago

@lizzieinvancouver below is a quick explanation of what we were attempting to show with these three conceptual figures

Screen Shot 2022-09-05 at 8 30 40 PM

a. If variation in the traits follow our predictions for species with conservative (shown in dark purple) and acquisitive traits (shown in darker green), there will be a stronger cue response and greater advance in budburst date with increasing environmental cues. This is illustrated by the steeper slope of the darker lines in comparison to the lighter lines for which the trait effect is set to 0. Species with acquisitive traits are predicted to budburst earlier than species with more conservative traits.

b. If functional traits have no relation to budburst phenology, then the trait effect will be estimated as or close to zero and we would see no difference in the slopes of the full model and that cue only model.

c. If the estimated trait effect is positive, we predict the full model will have a weaker budburst response to increasing environmental cues, leading to later budburst dates than estimated using the cue only model in which trait effects are zero. We may also expect to see later budburst dates of species with traits associated with acquisitive growth if our estimates do not support our predicted gradients in growth strategies.

The current legend in this figure is confusing, which is why I think using a dashed line instead of the pale colours would help differentiate the two lines.

lizzieinvancouver commented 1 year ago

@DeirdreLoughnan Oh, this is great! I think I still like this figure to help explain the models, so can help edit the text some on the next go round (which I will hopefully do soon).

BTW, I have no internet right now so am doing minimal stuff online. Git works better than my email so letting you know via git just now (no WL reply yet either, but it is early in the day and week!).

lizzieinvancouver commented 1 year ago

@DeirdreLoughnan Oh, this is great! I think I still like this figure to help explain the models, so can help edit the text some on the next go round (which I will hopefully do soon).

BTW, I have no internet right now so am doing minimal stuff online. Git works better than my email so letting you know via git just now (no WL reply yet either, but it is early in the day and week!).

DeirdreLoughnan commented 1 year ago

@lizzieinvancouver great! I added a revised version of the above text to the caption for the cueslope figure (fig. 3).

I have also addressed your other comments and am sending this back to your for edits. I re-ran the LNC model to double check the model output and I think the figure is right based on the new priors that Faith worked on before leaving. I have revised the text accordingly.

lizzieinvancouver commented 1 year ago

@DeirdreLoughnan Thanks! I will aim to look at Traitors again very soon.

lizzieinvancouver commented 1 year ago

@DeirdreLoughnan I agree we could refine the figure, but for it to be useful I think we also need to label the top panels. I think these are correct (but check):

(left): Acquisitive traits show earlier budburst (middle): No relationship between budburst and traits (right): Conservative traits show earlier budburst

I am fairly sure the middle image is tricky -- it shows acquisitive traits with earlier budburst on the y axis, but no effect of our model; readers might do better with the lines closer, but I guess it is okay.

Also, any chance you can match up predictions to each panel for each cue? Or at least we could give an example in the methods section or caption.

lizzieinvancouver commented 1 year ago

@DeirdreLoughnan I thought I would keep notes here .... I put these also in Rnw but you can delete them there:

I think this figure has much to offer, but still does not connect to the text much ... So I was thinking we try to make this figure tie better to the hypotheses or methods -- if it connected to the methods it would be with the model and I do currently cite it there. But I think it might be better with the intro and predictions. Could we possibly reference a-c at all in the intro with predictions? And then we REALLY need to slim the caption text and explain it a little better there.

So, some quick thoughts -- we probably have to cut stuff that is hard to interpret, such as 'Comparisons of estimated cue responses of a representative species with a trait value associated with acquisitive growth strategies, shown in green, or conservative growth strategies, shown in purple.' or 'represent a conceptual framework for interpreting trait responses.' -- this adds too many words without enough meaning.

So then we would replace with something that launches into the ideas of the intro. Maybe call it 'How functional traits may impact phenological cues.' And again, give some examples from predictions (perhaps the ones that show up in d-i). So:

"a) If species with traits associated with conservative (shown in dark purple) and acquisitive growth (shown in darker green) have stronger cue responses and greater advances in budburst date with increasing environmental cues, this will produce a steeper response (or slope) of the full model in comparison to the cue only (trait effect = 0) model. Furthermore, species with acquisitive traits are predicted to budburst earlier than species with more conservative traits."

could become something like:

We predict a) some traits associated with conservative (e.g. high LNC or something) and acquisitive growth will lead to advances in day of budburst (y axis) due to stronger responses to environmental cues (x axis), while b) other traits may have no relationship (e.g., XX) and c) .... [This is much shorter and clearer.] And maybe something that explains next the models and defines the colors etc.

I am still not sure the conceptual figure is correct -- can the green ever be above the purple the way it is in (c)? I might suggest you write out what you want to show then draw the lines that actually go with it....

DeirdreLoughnan commented 1 year ago

@lizzieinvancouver @legault @FaithJones here is my attempt at a more exhaustive conceptual figure, followed by my logic and rational:

Screen Shot 2022-10-24 at 5 10 07 PM
  1. Species differ in budburst, but there is no effect of cues or traits
  2. The effect of trait is 0, but greater cues lead to earlier bb.
  3. There is an effect of trait on cue responses, producing earlier budburst in response to increases in a cue. Species with trait values associated with acquisitive growth are budbursting earlier overall.
  4. There is an effect of trait on cue responses, but it causes delays in budburst in response to increases in a cue. Species with trait values associated with acquisitive growth are budbursting earlier overall.
  5. Species with trait values are not as we predicted, with species with traits associated with faster/acquisitive growth actually budbursting later. The effect of trait is still to produce earlier budburst in response to greater cues.

@lizzieinvancouver I am curious why you don't think 5. could occur. Are there other possible outcomes I am not thinking of?

DeirdreLoughnan commented 1 year ago

I also took another run at the figure caption, but in doing so, I am starting to think we might need a fourth conceptual panel that reflects scenario 4 above.

DeirdreLoughnan commented 1 year ago

A slight revision would be to add a 6th scenario:

Screen Shot 2022-10-24 at 5 59 50 PM

  1. The effect of trait on cue responses produces earlier budburst in response to increases in a cue, but this results in species with conservative traits having earlier budburst dates at very high cue values.
lizzieinvancouver commented 1 year ago

I am curious why you don't think 5. could occur.

@DeirdreLoughnan I was knee-jerk wondering how the math works and based on the math, if some scenarios cannot happen. But I have not thought this through or sat down with pencil and paper. Though I similarly wonder if we really allow what is shown in 1-2 to happen and think we should double-check the math. Though we write 'Species differ in budburst, but there is no effect of cues or traits' and 'The effect of trait is 0, but greater cues lead to earlier bb.' I think what is shown is something where the trait could affect the intercept (green is high or lower than purple) .... but our model does not allow that right?

Are you making these figures in R using simulated x data and the basic math of the model? If so, then I am likely wrong about my knee jerk math thoughts. If not, you should try that. Just simulate a cue, then add in the way we calculate the total cues (y axis) and play around with different betatrait values.

Thanks for working on this!

DeirdreLoughnan commented 1 year ago

@lizzieinvancouver @legault @FaithJones I have been working some more on this and I think that I have been able to recreate some of the conceptual figures we had before using simulated values from our code:

Screen Shot 2022-11-07 at 2 10 33 PM

But I would love to get a second opinion in case I am missing something or approaching this the wrong way. The basic code I used is in the concept_fig.R file.

In the code lines 56-78 try to explain my logic for how I approached the simulation and lines 120 -163 are how I generate the above plots

lizzieinvancouver commented 1 year ago

@DeirdreLoughnan I only took a quick look -- reviewing lines 56 to 120 and it makes sense to me, but I did not yet sit down with the code. All the logic works for me.... Can you tell me what is purple versus green here (and I assume based on the middle panel the lighter colors are with trait effect set to 0)?

FaithJones commented 1 year ago

@DeirdreLoughnan I have had a look at your code, and I have some comments.

Figure 1 legend in the manuscript is, I think, wrong. AT the moment is reads that the light green line is the full model, and the light purple is the trait = 0. It should be a black line for full model and a grey one for trait = 0.

I liked how you laid out your code, there was great annotation and your loop was easy to follow and very tidy. However, I\m not sure you pushed all the code to make the plots above. It only makes the lower purple lines in the left hand plot. I followed your logic so far, but I think you need to make some changes to the extra code I haven't seen yet. The issue is that the green and purple slopes should be different in plot A and C. For example, our expectation is that more conservative (purple) species will be more reactive to cues, so they should have a steeper slope than the more acquisitive green species. Your figure has the same slope for green and purple species in panel A, which is not our expectation. In panel C, you have slopes changing direction with and without the trait affect, which is also more extreme than we initially discussed. In panel C of our original conceptual diagram, the slopes with trait affect = 0 should be steeper than the full model, but they should in general still be negative slopes.

Of course, these are not issues if the purpose of this exercise was just to sanity check the direction of slopes can change if we change the parameters. SO take as much or as little feedback as is appropriate.

DeirdreLoughnan commented 1 year ago

Thanks @lizzieinvancouver & @FaithJones for the replies!

The lighter colours are the trait effect = 0, and the Green and purple are "acquisitive" vs "conservative" species.

You are right Faith that I did not take this as far as it needs to. But I did not want to waste too much time if this was not the kind of simulation we had in mind.

Thanks for confirming I am on the right path. I can make the needed changes to fully replicate the conceptual figure we want to use in the MS, or if you have time @FaithJones to work on it, that would be great too!

lizzieinvancouver commented 1 year ago

Thank you @FaithJones and @DeirdreLoughnan ... I think we're on the right path here, especially if @FaithJones agrees so I suggest we scale up to make the ms figure we want. I think it's safer to simulate it so we know we're doing it correctly and accurately with the model and it seems like we're close.

DeirdreLoughnan commented 1 year ago

@FaithJones @lizzieinvancouver @legault

I worked a bit more on this and could improve the code to make it more concise, but for now I have pushed code that generates the below figure.

This raises the question again of whether we think there are other possible scenarios that we should include in this conceptual figure. What are others thoughts on this?

Screen Shot 2022-11-10 at 6 19 06 PM

lizzieinvancouver commented 1 year ago

@DeirdreLoughnan Thanks for this! Can you remind me what the short form 'take-home scenario' is from left to right? I think I have three queries also:

  1. In the real model I think we have some where the slope is much steeper for one type of traits (cons vs. acq.), right?
  2. But maybe that is always true based on the math?
  3. It looks to be happening on right and left but reversed ... ?
DeirdreLoughnan commented 1 year ago

@lizzieinvancouver for sure!

Left fig: Accounting for traits leads to a stronger cue response and greater advance in budburst date with increasing environmental cues. This is illustrated by the steeper slope of the darker lines in comparison to the lighter lines for which the trait effect is set to 0. The Conservative sp. has a larger trait value (ie taller) so the change in slope is greater than that experienced by the acquisitive sp. with a smaller trait value. This is in line with our predictions for height and chilling for example.

Middle fig: The effect of trait is 0, so both lines are the same, but greater cues lead to earlier bb regardless of trait effects. The Conservative sp. has later bb overall.

Right fig: If the estimated trait effect is positive, we predict the full model will have a weaker budburst response to increasing environmental cues, leading to later budburst dates than estimated using the cue only model in which trait effects are zero. I modelled this figures after what I would expect for SLA, where the acquisitive species has the larger trait value and therefore the change in its slopes is greatest as an artifact of the math. Again in this figure the conservative trait species has later budburst than the acquisitive.

To try and answer your queries:

  1. My understanding was the only assumption we made was that the cues would all lead to earlier bb. But I think you are right that the math of the model does mean that larger trait values will inherently produce larger values of betaTraitxCue and through multiplication produce larger values of betaChillSp (ie steeper slopes).

betaForceSp[isp] = alphaForceSp[isp] + betaTraitxForce * (mu_grand_sp[isp]);

  1. I think it is an artifact of the math, which is why we are careful not to over interpret the magnitude of the change in slope, but focus on the direction (positive or negative).

  2. Perhaps it would be less confusing to focus on a single trait, like height or SLA instead of mixing height on the left and SLA on the right. I was trying to illustrate that the conservative vs acquisitive species could both experience larger changes in slope - which is due to their having a larger trait value.

The primary plot I think we are missing is there one where our predictions are just fully wrong regarding the acquisitive and conservative being late vs early, and for this the conservative spp (tall in the case of height) in the left plot would have earlier budburst. None of our results diverged from our predictions in this sense, but it could have been possible if the traits were doing something completely unexpected.

I am happy to arrange a meeting where we discuss this in more detail and definitively decide how many conceptual figures we need.

DeirdreLoughnan commented 3 days ago

@lizzieinvancouver I have added the revised version of our new conceptual figure for the trait ms.

The pdf version can be found here. I think it looks great, but let me know if you see any other edits that should be made!

lizzieinvancouver commented 2 days ago

@DeirdreLoughnan I like it in general in MANY ways! But I think it emphasizes a false dichotomy between acquisitive and conservative because they are in boxes (and really it's a gradient, which is how we show it in the rest of the paper). I think we should remove the boxes and the lines between the boxes should move down and be below the rest of the images (so they likely need to be longer). Maybe @ngoj1 could help with this?

ngoj1 commented 2 days ago

Hope you can forgive the shabby diagram since I'm on my phone right now, but is something like this what you had in mind? The coloured bars below are going to be the gradient bars for things like day of year, frost risk, etc. And now also the gradient between acquisitive and conservative growth. Screenshot_20240705_132830_com google android keep

DeirdreLoughnan commented 2 days ago

@ngoj1 @lizzieinvancouver Yes, I think so. For documentation, here is the original rough draft of the figure: image001