|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.statcato.statistics.inferential.TwoWayANOVA
public class TwoWayANOVA
Two-way analysis of variance (two-factor ANOVA). Performs computations for two-way ANOVA given all the observations and their corresponding row and column indices.
Constructor Summary | |
---|---|
TwoWayANOVA(int a,
int b)
Constructor, given the number of levels in factor A and B. |
Method Summary | |
---|---|
void |
addObservation(int i,
int j,
double data)
Adds the given data to row i and column j. |
double |
colSum(int j)
Returns the column sum B_j = Sum_{i=1...a} {cell sum of y[i][j]}. |
int |
DOFA()
Returns the degrees of freedom for factor A = a - 1. |
int |
DOFAB()
Returns the degrees of freedom for interaction AB. |
int |
DOFB()
Returns the degrees of freedom for factor B = b - 1. |
int |
DOFE()
Returns the degrees of freedom for the error. |
int |
DOFTotal()
Returns the total degrees of freedom. |
double |
FA()
Returns the F test statistics for factor A. |
double |
FAB()
Returns the F test statistics for interaction AB. |
double |
FB()
Returns the F test statistics for factor B. |
void |
findCM()
Computes the correction of the mean, (sum of all observations)^2 / N. |
boolean |
isValidData()
Checks if the data is valid for two-way ANOVA. |
double |
MSA()
Returns the mean of squares of factor A = SSA / DOFA. |
double |
MSAB()
Returns the mean of squares of interaction AB = SSAB / DOFAB. |
double |
MSB()
Returns the mean of squares of factor B = SSB / DOFB. |
double |
MSE()
Returns the mean of squares of error = SSE / DOFE. |
double |
PValueA()
Returns the p-Value corresponding to the F test statistic for factor A. |
double |
PValueAB()
Returns the p-Value corresponding to the F test statistic for interaction AB. |
double |
PValueB()
Returns the p-Value corresponding to the F test statistic for factor B. |
double |
rowSum(int i)
Returns the row sum A_i = Sum_{j=1...b} {cell sum of y[i][j]}. |
double |
SSA()
Returns the sum of squares for factor A, (Sum_{i=1..a} A_i^2) / (b*n) - CM. |
double |
SSAB()
Returns the sum of squares for interaction AB, (Sum (cell sum)^2) / n - CM - SSA - SSB. |
double |
SSB()
Returns the sum of squares for factor B, (Sum_{j=1..b} B_j^2) / (a*n) - CM. |
double |
SSE()
Returns sum of squares of error, SSTotal - SSA - SSB - SSAB. |
double |
SSTotal()
Returns the total sum of squares, Sum (observation)^2 - CM. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TwoWayANOVA(int a, int b)
a
- number of levels in factor Ab
- number of levels in factor BMethod Detail |
---|
public void addObservation(int i, int j, double data)
i
- row indexj
- column indexdata
- double arraypublic boolean isValidData()
public double rowSum(int i)
public double colSum(int j)
public void findCM()
public double SSA()
public double SSB()
public double SSAB()
public double SSTotal()
public double SSE()
public double MSA()
public double MSB()
public double MSAB()
public double MSE()
public int DOFA()
public int DOFB()
public int DOFAB()
public int DOFE()
public int DOFTotal()
public double FA()
public double FB()
public double FAB()
public double PValueA()
public double PValueB()
public double PValueAB()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |