JMSLTM Numerical Library 6.1

com.imsl.stat
Class TableMultiWay.BalancedTable

java.lang.Object
  extended by com.imsl.stat.TableMultiWay.BalancedTable
Enclosing class:
TableMultiWay

public class TableMultiWay.BalancedTable
extends Object

Tallies the number of unique values of each variable.


Method Summary
 int[] getNvalues()
          Returns an array of length nKeys containing in its i-th element (i=0,1,...nKeys-1), the number of levels or categories of the i-th classification variable (column).
 double[] getTable()
          Returns an array containing the frequencies for each variable.
 double[] getValues()
          Returns the values of the classification variables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNvalues

public int[] getNvalues()
Returns an array of length nKeys containing in its i-th element (i=0,1,...nKeys-1), the number of levels or categories of the i-th classification variable (column).

Returns:
an int array containing the number of levels or for each variable (column) in x.

getTable

public double[] getTable()

Returns an array containing the frequencies for each variable. The array is of length nValues[0] x nValues[1] x ... x nValues[nKeys] containing the frequencies in the cells of the table to be fit, where nValues contains the result from getNValues.

Empty cells are included in table, and each element of table is nonnegative. The cells of table are sequenced so that the first variable cycles through its nValues[0] categories one time, the second variable cycles through its nValues[1] categories nValues[0] times, the third variable cycles through its nValues[2] categories nValues[0] * nValues[1] times, etc., up to the nKeys-th variable, which cycles through its nValues[nKeys - 1] categories nValues[0] * nValues[1] * ... * nValues[nKeys - 2] times.

Returns:
a double array containing the frequencies for each variable in x.

getValues

public double[] getValues()
Returns the values of the classification variables. getValues returns an array of length nValues[0] + nValues[1] + ... + nValues[nKeys - 1] The first nValues[0] elements contain the values for the first classification variable. The next nValues[1] contain the values for the second variable. The last nValues[nKeys - 1] positions contain the values for the last classification variable, where nValues contains the result from getNValues.

Returns:
a double array containing the values of the classification variables.

JMSLTM Numerical Library 6.1

Copyright © 1970-2010 Visual Numerics, Inc.
Built July 30 2010.