I have the following data, plotted in R, depicting the angular rotation of an object vs. time. I would like to determine the time point at which the movement begins by calculating when the y-value significantly depart from the baseline (the start of the rise phase of the curve). I would love any ideas for how I should approach this problem using R.
Asked
Active
Viewed 27 times
0

user1554925
- 55
- 2
- 5
-
You can take the first derivative and look when the slope departs from zero. See this question on for suggestion on taking the derivative: https://stackoverflow.com/questions/75013143/how-can-i-calculate-the-second-order-derivative-of-a-vector-using-finite-differe/75013900#75013900 – Dave2e Jan 13 '23 at 22:13
-
If you can define "significantly departs from the baseline" in numerical terms then your problem becomes almost trivial, but I suspect the hardest part will be defining what you actually mean by "significantly departs from the baseline". Do you mean "moves at least 1 degree" or "moves at least 5 degrees" or "achieves an angular velocity of at least 1 radian per second"? These might all be reasonable definitions in a given scenario and are all easy to measure programmatically. However, this decision is domain-specific and not something we can answer for you I'm afraid. – Allan Cameron Jan 13 '23 at 22:20