I have a data frame called CONSTRICT where I have the following variables:
(https://i.sstatic.net/ykapQXh0.png)
I have plotted the average pupillary constriction per eye, per field, per orientation, over time (0-2s), which is shown below:
(https://i.sstatic.net/UmP4BQME.png)
However, I want to extract where the the average maximum constriction is over every participant (for example, extract that everyone has a maximum constriction between 500 and 800 ms on average across all participants). I want to then add this to the plots shown above, so that the average pupillary change also shows the time series where participants have their maximum pupil change (as a rectangle shaded area or something).
I have tried so many things to get this maximum information and to plot it, but I just cant seem to do it. I hope this makes sense as I am really needing help!
Let me know if more information is required.
I have tried so many things, such as summarize however this only gives me a single value, which is what I don’t want of course. I want to get the max per participant (and find out when this max occurs per participant) and then plot this time series where everyone has their max (e.g. between 500 and 750 ms) on the plots.
Nicola Burns is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.