Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot cortisol trajectory #9

Open
3 tasks
psokolhessner opened this issue Aug 20, 2024 · 5 comments
Open
3 tasks

Plot cortisol trajectory #9

psokolhessner opened this issue Aug 20, 2024 · 5 comments
Assignees
Labels
analysis Crunch some numbers visualization Make it look good

Comments

@psokolhessner
Copy link
Member

psokolhessner commented Aug 20, 2024

Overarching Goal

To plot the trajectories of cortisol values over time to assess sample change patterns and provide scaffolding for significance testing (across conditions and across samples).

For all plots below, use colors for stress and control that you plan to use in e.g., presentations.

Concrete Goal

Make three plots:

  • 1. Individuals' trajectories. A two-part plot; part 1 has all individuals' control trajectories plotted, part 2 has all individuals' stress trajectories plotted.

  • Will likely want to use transparency.

  • Would be nice to also include group average trajectory on this graph as a solid (not transparent) line. Depending on distribution, might make sense to use median instead? Be open to possibilities here.

  • May need to make two versions: one with everyone, and one without the extremely-high-value person.

Goal: to evaluate the individuals and allow us to note any irregularities or biases we might need to correct for.

  • 2. Condition x Day. A two-part plot: part 1 has the mean trajectory for day 1 stress and day 2 stress as two separate red lines; part 2 has the mean trajectory for day 1 control and day 2 control as two separate blue lines (or whatever colors you prefer, just be consistent).
  • This might work best as a loop that evaluates person by person, day by day, which condition a given trajectory belongs to, and then uses rbind to add their data to the correct (growing) 2D array (subjects x samples). Then those 2D arrays can be used to calculate means & SDs for the plot.
  • Would be good to include SDs on the graph; simplest is as lines, but nicest is as polygons (see: CGE's plotting; look in Slack channel for example).

Goal: to facilitate visual comparison of possible condition & day interactions.

  • 3. Stress vs. Control. A single plot: stress as a red line, control as a blue line (or whatever colors are in use in the presentation). This might be a final figure that is e.g. Figure 2 in the paper (Fig 1 being the design).
  • Might want two versions: one with all cort data, and one with only the cort data that we're keeping.

Why are we doing this?

A specific end goal for ALL THREE is specific related statistical tests that answer questions related to e.g. differences between samples (is 1 diff. from 2? 1 vs. 3? etc.) and between conditions (e.g., stress vs. control on sample 1) and between days (e.g., is stress trajectory different when it's on Day 2 vs. Day 1?).

The big picture of those statistical questions is to be able to tell the full story of how cortisol responded to the acute stressor, and to be able to move forward with a single difference score, per day, that characterizes how their cortisol levels changed after the water bath, whether stressor or control.

@psokolhessner psokolhessner added the analysis Crunch some numbers label Aug 20, 2024
@psokolhessner psokolhessner added the visualization Make it look good label Aug 20, 2024
@psokolhessner
Copy link
Member Author

Made some small edits to the issue above, @EvrimBaykal, mostly a) reorganizing, b) reformatting, and c) with the one addition of the "big picture" comment at the end.

@EvrimBaykal
Copy link
Collaborator

@psokolhessner A single difference score per day (condition) would make working with (and understanding the story of) the data a great deal more clear. This difference score can work well with other measures, too (i.e., trust, attitudes).

@psokolhessner
Copy link
Member Author

100% agree, @EvrimBaykal. It's the equivalent of boiling the IAT down to a d' score or something like that.

@psokolhessner
Copy link
Member Author

@EvrimBaykal just a thought that while the cort data is fresh in your mind, could be a good time to hammer this one home. We're very close on the 3rd to-do in the issue (control, stress), except that you will want a) the publication-ready version, b) the version with error bars, and c) the versions of a & b constructed only with the subjects who completed/we're keeping (i.e. the 39-person versions).

@EvrimBaykal
Copy link
Collaborator

@psokolhessner Good idea! I'll work on this today and reach out with questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis Crunch some numbers visualization Make it look good
Projects
None yet
Development

No branches or pull requests

2 participants