The record counting process \(\{N_1,\ldots,N_T\}\) is defined by
the number of records up to time \(t\), and can be expressed in terms of
the record indicator random variables I.record
by
$$N_t = I_1 + I_2 + \ldots + I_t.$$
If X
is a matrix with \(M > 1\) columns, each column is treated
as a vector and Nmean.record
calculates for each \(t\),
$$\bar N_t = \frac{N_{t1}+ \ldots + N_{tM}}{M}.$$
In summary:
$$\code{N.record}: \code{X} = \left(
\begin{array}{cccc}
X_{1,1} & X_{1,2} & \cdots & X_{1,M} \\
X_{2,1} & X_{2,2} & \cdots & X_{2,M} \\
\vdots & \vdots & & \vdots \\
X_{T,1} & X_{T,2} & \cdots & X_{T,M} \\
\end{array} \right)
\longrightarrow
\left(
\begin{array}{cccc}
N_{1,1} & N_{1,2} & \cdots & N_{1,M} \\
N_{2,1} & N_{2,2} & \cdots & N_{2,M} \\
\vdots & \vdots & & \vdots \\
N_{T,1} & N_{T,2} & \cdots & N_{T,M} \\
\end{array} \right)$$
and
$$\code{Nmean.record}: \code{X}
\longrightarrow
\big( \bar{N}_1, \bar{N}_2, \cdots, \bar{N}_T \big).$$
Number and mean number of records for both upper and lower records can be
calculated.