MVGMx returns a daily geometric mean of the values in a set of specified variables.
SYNTAX:
MVGMx(Cj, Cn:Cw, Cy, ...)
where :
Cx is a conditional variable x
x specifies the how the function behaves when zero (0) values are encountered. Possible values of x are 0-2 which have the following meanings:
0: Ignore Zero Values (0)
1: Convert all Zero Values (0) to a one (1) and include in the calculation
2: Add one to all values, including Zero Values (0), which includes them in the calculation
In all cases, BLANK values are ignored.
This function only works properly when all variables are the same frequency, i.e. all daily, all hourly, etc...
This function will handle up to 199 variables.
NOTES:
Our recommendation on State-Required calculations is to check with your state as to which form of the Geometric Mean calculation you should use.
Each variable must be specified as a Conditional Variable (use "C" instead of "V").
The variables may be referenced two different ways; single variables separated by commas or a range specified by a beginning variable, a colon, and an ending variable. These two methods can be combined. (i.e., C14:C22 will include all variables whose numbers fall between Variable 14 and Variable 22)
When specifying a range of variables, there can be gaps in the series of existing variables. For instance, if the specified range is C11:C17 and variable 14 does not exist, the function will calculate the remaining variables.
This function only works properly when all variables are the same frequency, i.e. all daily, all hourly, etc...
This function will handle up to 199 variables.
EXAMPLES:
The three examlpes below use the same data as input, this was done intentionally for output comparison:
Example 1: Ignore Zero Values (x=0)
V129 = MVGM0(C70, C71,C1001:C1004, C1011)
In this example, variable 129 is the geometric mean of the input variables, ignoring zero values:
Example 2: Convert Zeros to Ones
V129 = MVGM1(C70,C71,C1001:C1004, C1011)
In this example, variable 129 is the geometric mean of the input variables, converting zeros (0) to ones (1) before calculating:
Example 3: Add one to all values
V129 = MVGM2(C70,C71,C1001:C1004, C1011)
In this example, variable 129 is the geometric mean of the input variables; adding one (1) to all values, including zeros (0):
Example 4: Using Daily Detail (4 Hour) variables
V11379 = MVGM1(C11377,C11378)
where V11379,V11377, and V11378 are all 4-hour daily detail variables. Note, to calculate values must be in the same data slot, not necessarily the same time.