I have a dataset consisting of x
and y
, both are relative numbers. I want to iterate over the slope within a certain interval (let's say n = 3) and retrieve the model parameters, r- and p-value in a list. So I basically want to find the slope within a given set of points, move further down the x-axis and repeat this, over and over.
Eventually, I can find out at what point the slope is no longer significant and then the corresponding x-value. Underneath is an illustration of my idea. Red indicates significant slopes, blue indicates insignificant slopes as it moves further on the x-axis.
Illustration of iterative slope (I cannot yet upload photos here).