Click or drag to resize
TableTwoWay Class
Tallies observations into a two-way frequency table.
Inheritance Hierarchy
SystemObject
  Imsl.StatTableTwoWay

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
[SerializableAttribute]
public class TableTwoWay

The TableTwoWay type exposes the following members.

Constructors
  NameDescription
Public methodTableTwoWay
Constructor for TableTwoWay.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetFrequencyTable
Returns the two-way frequency table.
Public methodGetFrequencyTable(Double, Double, Double, Double)
Compute a two-way frequency table using intervals of equal length and user supplied upper and lower bounds, xLowerBound, xUpperBound, yLowerBound, yUpperBound.
Public methodGetFrequencyTableUsingClassmarks
Returns the two-way frequency table using class marks.
Public methodGetFrequencyTableUsingCutpoints
Returns the two-way frequency table using cutpoints.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyMaximumX
The maximum value of x.
Public propertyMaximumY
The maximum value of y.
Public propertyMinimumX
The minimum value of x.
Public propertyMinimumY
The minimum value of y.
Top
Remarks

Class TableTwoWay calculates a two-dimensional frequency table for a data array based upon two variables.

A two-way frequency table can be used to visualize the shape of the bivariate distribution and look for anomalies in the data. There are many approaches to constructing two-way frequency tables. Four approaches are implemented in this class:

  1. equal width class intervals based upon the smallest and largest observations,
  2. equal width class intervals based upon a user provided minimum and maximum,
  3. class intervals defined from user provided class midpoints, and
  4. class intervals defined from user provided class boundaries.

The TableTwoWay class implements the first two approaches by overloading the GetFrequencyTable method. If GetFrequencyTable() is used without input arguments, xIntervals intervals of equal length are formed between the minimum and maximum values in x, and similarly, yIntervals intervals are formed for y. The frequency table returned from this method contains tallies of the number of observations in each interval. The data minimum and maximum can be obtained using the MinimumX, MinimumY, MaximumX and MaximumY properties.

Instead of using the minimum and maximum to define the boundaries of the smallest and largest classes, specified boundaries can be used by calling GetFrequencyTable(xLowerBound, xUpperBound, yLowerBound, yUpperBound). This method tallies all data less than or equal to the xLowerBound and yLowerBound into the first class, and all data greater than or equal to xUpperBound and YUpperBround into the last class

The third approach is implemented using the GetFrequencyTableUsingClassmarks method. Equally spaced intervals can be defined using class marks. In this approach two double precision arrays of length xIntervals and yIntervals containing the class midpoints for x and y respectively are passed to the GetFrequencyTableUsingClassmarks(cx[], cy[]). The class marks, or midpoints, must be equally spaced.

Finally in those applications where unequal length intervals are preferred, the GetFrequencyTableUsingCutpoints(cx[], cy[]) method can be used. The double precision arrays cx and cy with lengths xIntervals-1 and yIntervals-1 respectively contain the class boundaries listed in ascending order. The first cut point defines the first class which is used to tally all data less than or equal to the first cut point value. The last cut point defines the last class which is used to tally all data greater than or equal to the last cut point value.

See Also

Reference

Other Resources