@rmedian |

Row median of group.

Medians for each row of the group.

Syntax: @rmedian(x)

x: group

Return: series

For each observation corresponding to a row in the group of series, compute the median of the values for the observation.

When is odd, the median is the middle ordered-observation and when is even, the median is the average of the two middle ordered-observations. The median may be written as

where the order statistics represent the data for observation ordered from low to high.

Examples

show @rmedian(g

returns a linked series of the medians in the rows of group g.

Cross-references

See also
@rmean and
@rquantile.