groupcount: Generate 2D count table for two integer-valued vectors.
Description
Similar to 'table' function, this function builts a contingency table of the counts at each combination of all possible values from two integer-valued input vectors.
Usage
groupcount(g1, g2, n1, n2)
Arguments
g1
The first integer-valued input vector. The max value in g1 is n1.
g2
The second integer-valued input vector. The max value in g1 is n2.
n1
The maximum value in g1.
n2
The maximum value in g2.
Value
The count table.
Details
This is implemented as an utility function to build a 2D histogram count table. For efficiency, it does not check if the maximum values in input vectors exceed the maximum values specified.