MSDn calculates the moving standard deviation of a specified variable.
SYNTAX:
MSDn(Cx, optional Time Increment)
where :
Cx is a conditional variable x
n specifies the number of days to calculate for. If daily detail variables are used returns the n "slot" moving standard deviation (ie for an hourly variable would specify the number of hours, for a 15 minute variable the number of 15 minute slots.
Time Increment Optional - specifies the source variables (Cx) Frequency when the Source Variable (CX) and target variable's (i.e. the variable being calculated) frequencies do not match.
NOTES:
The data points do not need to be on consecutive days/data slots.
Calculates every day that it can find n values, searching up to one year (366 days) backward
Does not calculate if n values are not available
Calculates the "Sample Standard Deviation" (not the population Standard Deviation), i.e. uses the formula:
Where n is the number of samples, and x bar is the mean.
SEE ALSO: LSDn
EXAMPLE 1: Get the Standard Deviation of the last 7 days.
Source variable (1) is set to Daily and Target variable (9) is also set to Daily. Because both the Source and Target variables are the same (Daily), the time increment BYDAY will be used.
V9= MSD7(C1)
Variable 9 will be the standard deviation of the last 7 days values of variable 1:
EXAMPLE 2: Moving 4 hour Standard Deviation
Source variable (2) is set to Hourly and Target variable (62) is also set to Hourly.
V62= MSD4(C2)
Variable 9 will be the standard deviation of the last 7 days values of variable 1: