Command Reference : Function Reference : Function Reference: M
  
 
@mediansby
Medians for a series for each specified group defined by distinct values.
Syntax: @medians(x, y[y1, y2, ... yn, s])
x: series
y1...yn series, alpha, group
s: (optional) sample string or object
Return: series
Returns the median of x each group defined by distinct values of y, using the current or specified workfile sample.
Examples
show @mediansby(x, g1, g2)
produces a linked series of the by-group sample medians of the series x, where members of the same group have identical values for both g1 and g2.
Cross-references
See also @meansby and @quantilesby.