MMED returns the Monthly median value for a specified variable
SYNTAX:
MMED(Cx, optional Time Increment)
where :
Cx is a conditional variable x
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 result is stored based on target variables frequency:
EXAMPLE 1: Return the Monthly median from a variable
Source variable (70) is set to Daily and Target variable (111) is also set to Daily. Because both the Source and Target variables are the same (Daily), the time increment BYDAY will be used.
V111 = MMED(C70)
Variable 111 will contain the Monthly median value of all data points in variable 70, on the last day of the month.
EXAMPLE 2: Return the Monthly median from an Hourly variable into a Daily Calculation.
Source variable (70) is set to Hourly and Target variable (111) is set to Daily.
V70 - Is a hourly parameter
V111 - Is a daily calculation
V111 = MMED(V70,BYHOUR)
Note: You MUST specify the Time Increment (BYHOUR) that matches the source variables frequency (IE the source variable V70 is Hourly, therefore we specify BYHOUR) in order for the function to return the correct value.
See: Working with Daily Detail Variables in Calculations.
Example with MDL Rules:
V = MMED(C5261) and V = MMED(C5261)
On calculated variables, it is possible to elect to cascade MDL rules or not. Below is an example of cascading MOST frequent MDL symbol, ALL MDL symbols, and NONE or no MDL symbols. This example shows all the possible combinations with two values.
V9562 - Most Frequent MDL Symbol
V9581 - All MDL Symbols
V9582 - No MDL Symbols