Hi everyone
Not sure if I am getting old but imagine I have a data set of individuals i and time points j and a variable x like this:
What's the best way to calculate the range of x within individuals i, like:
Sorry if this is trivial and thanks for your consideration
Not sure if I am getting old but imagine I have a data set of individuals i and time points j and a variable x like this:
Code:
clear input i j x 1 1 -1 1 2 0 1 3 1 2 1 1 2 2 1 2 3 1 end
Code:
clear input i j x x_range 1 1 0 2 1 2 -1 2 1 3 1 2 2 1 1 0 2 2 1 0 2 3 1 0 end

Comment