lizzieinvancouver / decsens

0 stars 0 forks source link

one more PEP725 sensitivity calc #15

Closed lizzieinvancouver closed 4 years ago

lizzieinvancouver commented 4 years ago

@cchambe12 One more request! (I know, I know, I am sorry) Jonathan A. has done some more work and pointed out the log relationship is only appropriate for when you calculate the sensitivity to the leafout date (not over some window) ... in my sims, these come out pretty similar and the log works fine on either. But to be neat and thorough, I think we probably should show both.

So -- could you possibly add additional files or columns that give:

I only plan to update the main figure so I just need it for betpen 1950-1960 and 2000-2010. And I don't think I need the conf int or any of that -- just these slopes estimated by site. Thank you again!

cchambe12 commented 4 years ago

@lizzieinvancouver Done! I added the conf ints just in case you may need them but the relevant columns for now are "lomatslopelog" and "lomatslopelog_exp"

lizzieinvancouver commented 4 years ago

@cchambe12 Thank you! I added the basic lomatslope also. Can you check the calculation of meanmatlo, or point me to the code to check? My instinct is that the slopes should get less variable and potentially be higher as we have essentially made the x axis even more dependent on the y (by calculating the temp UNTIL leafout) but the results seem more variable:

plots.pdf

It gives the same answer as the temporal window, but I want to double check this as it goes against my reasoning. Thank you!

lizzieinvancouver commented 4 years ago

Wait, here's a figure you can see: plots

lizzieinvancouver commented 4 years ago

And here's the new full results you can also contrast this sim using the window with sim using the truncated temp

cchambe12 commented 4 years ago

@lizzieinvancouver I am messing around with this now and cannot think through why this is happening. I agree, I would imagine variation in slopes would decrease with meanmatlo but after rewriting and checking the code, it is still higher than using the meanmat as before.

But in the raw data, we see that variation is decreasing when we use meanmatlo versus the original mat: bp_matvsmatlo.pdf

fs_matvsmatlo.pdf

cchambe12 commented 4 years ago

@lizzieinvancouver The code is under pep_analyses/betpen_tempsensitivites.R and fagsyl_tempsensitivities.R

Relevant lines are 63-70

lizzieinvancouver commented 4 years ago

@cchambe12 Thanks! I agree the code for the regressions looks good. The only last thing to check would be the code that calculates the temp until leafout. (I can double-check it if you let me know where it is in.) It's definitely not critical -- we see the same decline, and it goes down with a log-log; it's just surprising to me, but we can call it soon and investigate further later!

cchambe12 commented 4 years ago

@lizzieinvancouver I just went through the temperature code and tested a few sites and years and it all looks good. I'll keep thinking about it and let you know if I come up with anything!

lizzieinvancouver commented 4 years ago

@cchambe12 Okay, thank you! I think it could be many things and is not critical to the paper, so I think it's good we checked the answer for this method and the code, and I am closing it. Thank you again for all your help!