|
JMSLTM Numerical Library 4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.imsl.stat.TableTwoWay
Tallies observations into a two-way frequency table.
Constructor Summary | |
TableTwoWay(double[] x,
int xIntervals,
double[] y,
int yIntervals)
Constructor for TableTwoWay . |
Method Summary | |
double[][] |
getFrequencyTable()
Returns the two-way frequency table. |
double[][] |
getFrequencyTable(double xLowerBound,
double xUpperBound,
double yLowerBound,
double yUpperBound)
Compute a two-way frequency table using intervals of equal length and user supplied upper and lower bounds, xLowerBound,
xUpperBound, yLowerBound, yUpperBound . |
double[][] |
getFrequencyTableUsingClassmarks(double[] cx,
double[] cy)
Returns the two-way frequency table using either cutpoints or class marks. |
double[][] |
getFrequencyTableUsingCutpoints(double[] cx,
double[] cy)
Returns the two-way frequency table using cutpoints. |
double |
getMaximumX()
Returns the maximum value of x. |
double |
getMaximumY()
Returns the maximum value of y. |
double |
getMinimumX()
Returns the minimum value of x. |
double |
getMinimumY()
Returns the minimum value of y. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TableTwoWay(double[] x, int xIntervals, double[] y, int yIntervals)
TableTwoWay
.
x
- A double
array containing
the data for the first variable.xIntervals
- An int
scalar containing the
number of intervals (bins) for variable x.y
- A double
array containing
the data for the second variable.yIntervals
- An int
scalar containing the
number of intervals (bins) for variable y.Method Detail |
public double[][] getFrequencyTable()
xmin
and xmax
be the
minimum and maximum values in x, respectively, with similiar
meanings for ymin
and ymax
.
Then, the first row of the output table is the tally of observations
with the x value less than or equal to
xmin + (xmax - xmin)/xIntervals
,
and the y value less than or equal to
ymin + (ymax - ymin)/yIntervals
.
double
array containing
the two-way frequency table.public double[][] getFrequencyTable(double xLowerBound, double xUpperBound, double yLowerBound, double yUpperBound)
xLowerBound,
xUpperBound, yLowerBound, yUpperBound
. The first and last
intervals for both variables are semi-infinite in length.
xIntervals
and yIntervals
must be
greater than or equal to 3.
xLowerBound
- double
specifies the right endpoint
for x
.xUpperBound
- double
specifies the left endpoint
for x
.yLowerBound
- double
specifies the right endpoint
for y
.yUpperBound
- double
specifies the left endpoint
for y
.
double
array containing
the two-way frequency table.public double[][] getFrequencyTableUsingClassmarks(double[] cx, double[] cy)
xIntervals
and
yIntervals
.
Equally spaced class marks in ascending order must be provided
in the arrays cx
and cy
. The class marks are
the midpoints of each interval. Each interval is taken to have length
cx[1] - cx[0]
in the x direction and
cy[1] - cy[0]
in the y direction.
The total number of elements in the output table may be less than the
number of observations of input data. Arguments xIntervals
and yIntervals
must be greater than or equal to 2 for this
option.
cx
- double
array containing either the cutpoints or
the class marks for x
.cy
- double
array containing either the cutpoints or
the class marks for y
.
double
array containing
the two-way frequency table.public double[][] getFrequencyTableUsingCutpoints(double[] cx, double[] cy)
cx
and cy
, of length (xIntervals-1
) and
(yIntervals-1
) respectively. The first row of the
output table is the tally of observations for which the x value
is less than or equal to cx[0]
, and the y value
is less than or equal to cy[0]
. This option
allows unequal interval lengths. Arguments cx
and cy
must be greater than or equal to 2.
cx
- double
array containing either the cutpoints or
the class marks for x
.cy
- double
array containing either the cutpoints or
the class marks for y
.
double
array containing
the two-way frequency table.public double getMaximumX()
double
containing the maximum
data bound for x.public double getMaximumY()
double
containing the maximum
data bound for y.public double getMinimumX()
double
containing the minimum
data bound for x.public double getMinimumY()
double
containing the minimum
data bound for y.
|
JMSLTM Numerical Library 4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |