Greetings:
Is there a simple solution to calculate mean difference? That is, if I have series, say, X = x1, ..., xn. I can calculate difference of two values defining a new variable as:
d_X = dif(X);
What if I want to calculate the difference of each observation from the mean of the series? Is there a simple way to do this instead of calculating the mean and then subtracting it from each observation? That is, say,:
d_mX = (X - mean(X));
I am sure there is one, I just cannot find the command. (By the way, "meandif" is not a valid command for this.)
I appreciate your help.
Best,
Mitu
Message was edited by: ashraf
... View more