Programmer Guide/Command Reference/EVAL/median: Difference between revisions

From STX Wiki
Jump to navigationJump to search
(initial import)
 
m (1 revision: Initial import)
(No difference)

Revision as of 17:31, 18 November 2010

median

Calculate the median of the vector x.

Usage:

median(x)

median(x,q)

Parameters:
x
The data vector.
q
The cut point (0 < q < 1) or a vector of cut points. If no cut point is specified, 0.5 is used. If q is a vector, each element q[i] must be in the range 0 to 1.
Return Type:

scalar

Result:

The value xq with sum(h(x <= xq)) = q

If q is a vector the result is a vector xq with nrow(q) elements with: h(x | x<=xq[i]) = q[i]

Navigation menu

Personal tools