Code for analyzing dependent variable over time at certain threshold of independent variable

Hi Ramon!

This sounds like an interesting subject and there are a number of ways to approach a research question like this. However, I'm not sure what luck you will have in getting an answer from this forum which is dedicated to R related questions, not research or statistics. I would suggest you first discuss this with your supervisor.

I would also, in the kindest manner, suggest your read this forums Homework Policy FAQ: Homework Policy which says:

Keep in mind Community.rstudio.com is a discussion forum for R, RStudio and the Tidyverse. It may not be the best place to get help with your specific problem. The community is more inclined to help lead you toward your solution, rather than explicitly solve it. Do not expect anyone here to do your work for you.

When you have a clearer reserach question and some data to try on you are welcome to post a question about the R code itself and you will discover how helpful people here can be.

Good luck!