JMSLTM Numerical Library 5.0.1

com.imsl.stat
Class ANOVA

java.lang.Object
  extended by com.imsl.stat.ANOVA
All Implemented Interfaces:
Serializable, Cloneable

public class ANOVA
extends Object
implements Serializable, Cloneable

Analysis of Variance table and related statistics.

See Also:
Example, Serialized Form

Constructor Summary
ANOVA(double[][] y)
          Analyzes a one-way classification model.
ANOVA(double dfr, double ssr, double dfe, double sse, double gmean)
          Construct an analysis of variance table and related statistics.
 
Method Summary
 double getAdjustedRSquared()
          Returns the adjusted R-squared (in percent).
 double[] getArray()
          Returns the ANOVA values as an array.
 double getCoefficientOfVariation()
          Returns the coefficient of variation (in percent).
 double getDegreesOfFreedomForError()
          Returns the degrees of freedom for error.
 double getDegreesOfFreedomForModel()
          Returns the degrees of freedom for model.
 double getDunnSidak(int i, int j)
          Computes the confidence interval of i-th mean - j-th mean, using the Dunn-Sidak method.
 double getErrorMeanSquare()
          Returns the error mean square.
 double getF()
          Returns the F statistic.
 double[][] getGroupInformation()
          Returns information concerning the groups.
 double getMeanOfY()
          Returns the mean of the response (dependent variable).
 double getModelErrorStdev()
          Returns the estimated standard deviation of the model error.
 double getModelMeanSquare()
          Returns the model mean square.
 double getP()
          Returns the p-value.
 double getRSquared()
          Returns the R-squared (in percent).
 double getSumOfSquaresForError()
          Returns the sum of squares for error.
 double getSumOfSquaresForModel()
          Returns the sum of squares for model.
 double getTotalDegreesOfFreedom()
          Returns the total degrees of freedom.
 int getTotalMissing()
          Returns the total number of missing values.
 double getTotalSumOfSquares()
          Returns the total sum of squares.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ANOVA

public ANOVA(double[][] y)
Analyzes a one-way classification model.

Parameters:
y - is a two-dimension double array containing the responses. The rows in y correspond to observation groups. Each row of y can contain a different number of observations.

ANOVA

public ANOVA(double dfr,
             double ssr,
             double dfe,
             double sse,
             double gmean)
Construct an analysis of variance table and related statistics. Intended for use by the LinearRegression class.

Parameters:
dfr - a double scalar value representing the degrees of freedom for model
ssr - a double scalar value representing the sum of squares for model
dfe - a double scalar value representing the degrees of freedom for error
sse - a double scalar value representing the sum of squares for error
gmean - a double scalar value representing the grand mean. If the grand mean is not known it may be set to not-a-number.
Method Detail

getAdjustedRSquared

public double getAdjustedRSquared()
Returns the adjusted R-squared (in percent).

Returns:
a double scalar value representing the adjusted R-squared (in percent)

getArray

public double[] getArray()
Returns the ANOVA values as an array.

Returns:
a double[15] array containing the following values:

index Value
0 Degrees of freedom for model
1 Degrees of freedom for error
2 Total degrees of freedom
3 Sum of squares for model
4 Sum of squares for error
5 Total sum of squares
6 Model mean square
7 Error mean square
8 F statistic
9 p-value
10 R-squared (in percent)
11 Adjusted R-squared (in percent)
12 Estimated standard deviation of the model error
13 Mean of the response (dependent variable)
14 Coefficient of variation (in percent)


getCoefficientOfVariation

public double getCoefficientOfVariation()
Returns the coefficient of variation (in percent).

Returns:
a double scalar value representing the coefficient of variation (in percent)

getDegreesOfFreedomForError

public double getDegreesOfFreedomForError()
Returns the degrees of freedom for error.

Returns:
a double scalar value representing the degrees of freedom for error

getDegreesOfFreedomForModel

public double getDegreesOfFreedomForModel()
Returns the degrees of freedom for model.

Returns:
a double scalar value representing the degrees of freedom for model

getDunnSidak

public double getDunnSidak(int i,
                           int j)
Computes the confidence interval of i-th mean - j-th mean, using the Dunn-Sidak method.

Parameters:
i - is a int indicating the i-th member of the pair, mu_i
j - is a int indicating the j-th member of the pair, mu_j
Returns:
the confidence intervals of i-th mean - j-th mean using the Dunn-Sidak method

getErrorMeanSquare

public double getErrorMeanSquare()
Returns the error mean square.

Returns:
a double scalar value representing the error mean square

getF

public double getF()
Returns the F statistic.

Returns:
a double scalar value representing the F statistic

getGroupInformation

public double[][] getGroupInformation()
Returns information concerning the groups.

Returns:
a two-dimension double array containing information concerning the groups. Row i contains information pertaining to the i-th group. The information in the columns is as follows:

Column Information
0 Group Number
1 Number of nonmissing observations
2 Group Mean
3 Group Standard Deviation


getMeanOfY

public double getMeanOfY()
Returns the mean of the response (dependent variable).

Returns:
a double scalar value representing the mean of the response (dependent variable)

getModelErrorStdev

public double getModelErrorStdev()
Returns the estimated standard deviation of the model error.

Returns:
a double scalar value representing the estimated standard deviation of the model error

getModelMeanSquare

public double getModelMeanSquare()
Returns the model mean square.

Returns:
a double scalar value representing the model mean square

getP

public double getP()
Returns the p-value.

Returns:
a double scalar value representing the p-value

getRSquared

public double getRSquared()
Returns the R-squared (in percent).

Returns:
a double scalar value representing the R-squared (in percent)

getSumOfSquaresForError

public double getSumOfSquaresForError()
Returns the sum of squares for error.

Returns:
a double scalar value representing the sum of squares for error

getSumOfSquaresForModel

public double getSumOfSquaresForModel()
Returns the sum of squares for model.

Returns:
a double scalar value representing the sum of squares for model

getTotalDegreesOfFreedom

public double getTotalDegreesOfFreedom()
Returns the total degrees of freedom.

Returns:
a double scalar value representing the total degrees of freedom

getTotalMissing

public int getTotalMissing()
Returns the total number of missing values.

Returns:
an int scalar value representing the total number of missing values (NaN) in input Y. Elements of Y containing NaN (not a number) are omitted from the computations.

getTotalSumOfSquares

public double getTotalSumOfSquares()
Returns the total sum of squares.

Returns:
a double scalar value representing the total sum of squares

JMSLTM Numerical Library 5.0.1

Copyright © 1970-2008 Visual Numerics, Inc.
Built July 8 2008.