FrederikBaumgarten / PhaenoFlex_clean

0 stars 0 forks source link

Getting posteriors from a model #5

Open FrederikBaumgarten opened 1 week ago

FrederikBaumgarten commented 1 week ago

@lizzieinvancouver : Here is an update on my current state of work on extracting and plotting posteriors:

In this r file I roughly clean the data, fit a simple model to compare treatment levels (all the ones around the summer solstice) x species and extract the posteriors. From them I add up all the effects and plot the outcome here

I did the same also to compare defoliation and drought treatments only (without separating the effect of timing) here with this output

To be sure I added up posteriors correctly I made a test dataset, run the same model and plotted the posteriors here. This looks perfect to me (matches the values initially set).

FrederikBaumgarten commented 1 week ago

Some questions: I am not sure how to extract the effects of each treatment separately. You once wrote on a sheet that one can simply substract the control. But in the simple model I used every treatment is anyway compared to the control - hence already substracted.

plotting: Do you prefer also dots when you plot these posteriors? at least the colours on the bars help identifying the treatments... boxplots could be a nice alternative for the raw data.

lizzieinvancouver commented 1 week ago

@FrederikBaumgarten That's great progress!

I find the plots really hard to visualize as barplots, however. Can you please remake them as symbols (circles are fine for now) with the variance shown as lines (not lines with the extra bits at the end, as these are distracting)?

As for the control, you can subtract it -- then the y axis becomes the difference from control and things that overlap 0 (you could make a dashed horizontal line at 0) will be obvious. Could you try that?