lizzieinvancouver / ospree

Budbreak review paper database
3 stars 0 forks source link

Are cues correlated? #404

Closed DeirdreLoughnan closed 3 years ago

DeirdreLoughnan commented 3 years ago

We need to test for correlations between forcing, photoperiod, and chilling, as the assumption that they do underlies some of our current trait hypotheses.

@lizzieinvancouver could you find where the code that does this is? I am also happy to run it if you do not have time.

Thanks!

lizzieinvancouver commented 3 years ago

@DeirdreLoughnan

Okay! New plots committed (938f79f92bef2f99cac211d6ccaa3fc248dcbd63)

So there is code to do this, but it is rather hacky. It would definitely be worth making up a nicer version just for the traits data to live in the traits folder. For now, what I did ...

You need Stan model output, so I think having that for the traits species would be eventual step 1. But I just ran the default in models_stan.R in bb_analysis for now. Then open models_stan_plotting. And run the top of the code through the three lines of source code (lime 106) ...

Then scroll down to

# Cue by cue plots And run these snippets ...

load("stan/output/m2lni_spcompexprampfputah_z.Rda") # m2l.ni
# load("stan/output/m2lni_spcompexprampfpcp_nonz.Rda") # m2l.ni
sumer.ni <- summary(m2l.ni)$summary

colz = c("brown", "blue3")
spp <- sort(unique(bb.stan$complex.wname))

Then run line 417 onward (ylimhere <- c(-20, 5) and onward).

The short answer -- these cues are not strongly correlated, but that might not be the case for the data subset you end up with so best to check again!