JavaGrinders
Class InteractionTable

java.lang.Object
  extended by JavaGrinders.ContingencyTable
      extended by JavaGrinders.InteractionTable

public class InteractionTable
extends ContingencyTable

contains a crosstabulation table of interactions between individuals and performs a variety of statistics on it, including dominance measures, reciprocity, etc.


Field Summary
 
Fields inherited from class JavaGrinders.ContingencyTable
diagonal, iterated, itsTotalSum, MatrixCols, MatrixRows, NUM_MAXITERATOR, PRECISIONMULT
 
Constructor Summary
InteractionTable(ContingencyTable aTable)
          standard constructor for the InteractionTable class
InteractionTable(int MatrixSize)
          standard constructor for the InteractionTable class
InteractionTable(int MatrixSize, double[][] inMatrix)
          standard constructor for the InteractionTable class
 
Method Summary
 double[] getBBSRanks()
          calculates a cardinal rank (BBS method) for each individual
 double[] getBoydSilkRanks()
          calculates a cardinal ranks for stochastic transitivity Boyd and Silk (1983) for each individual
 double[] getDominanceActivityIndex()
          calculates a dominance activity index for each individual
 double[] getDominanceIndex()
          calculates a dominance index for each individual
 double[] getOrdinalRanks()
          returns individual ordinal ranks from matrix of interactions between entities.
 void listLinearityResults()
          lists results from a Test for Linearity.
 void listRanks()
          list ranks for each individual
 
Methods inherited from class JavaGrinders.ContingencyTable
as2DdoubleArray, as2DStringArray, asJAMAMatrix, calcContingencyResults, calcGoodnessOfFitResults, checkForColumnPs, checkMatchingMatrixDimensions, checkMatchingRows, checkMatrix, checkSquare, clearColumnPs, clearPs, clearSums, clearTable, clearTablePs, clone, colToString, DoWilliamsCorr, fillPerms, fillSums, fold, getCellValue, getColLabel, getColLabels, getColSum, getColSums, getColumnPs, getContingencyTableResults, getContingencyTableResults, getdf, getDifferenceTable, getDominanceMatrix, getExpectedMatrix, getExpectedMatrix, getExpMatrixDia, getExpMatrixFromProbabilities, getExpMatrixNoDia, getFTukeyDeviates, getGoodnessOfFitResults, getMantelP, getMantelZ, getMatrixSize, getName, getNCells, getNCols, getNoZeroCellMatrix, getNRows, getPermutedTable, getpropMatrixDia, getpropMatrixNoDia, getRowLabel, getRowLabels, getRowSum, getRowSums, getTablePs, getTableSubSet, getTauKr, getTauKrP, getTotalsMatrix, getTotalSum, getZeroCells, howManyPossiblePermutations, incrementCellValue, invertTable, isMatchingMatrix, isSquare, listContingencyResults, listExpectedTable, listFTukeyDeviates, listGoodnessOfFitResults, listMantelZResults, listTable, listTable, listTauKrResults, noSumsToString, rowToString, set2DArray, setCellValue, setColLabel, setColLabels, setColLabels, setColumnPs, setDefaultRowColLabels, setDiagonal, setMatrixDimensions, setMatrixSize, setName, setRowColLabels, setRowColLabels, setRowLabel, setRowLabels, setRowLabels, setTablePs, TauKr, toFile, toString, transpose, unfold, unfoldUpperTriangle
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractionTable

public InteractionTable(int MatrixSize)
standard constructor for the InteractionTable class

Parameters:
MatrixSize - number of rows and columns in the table

InteractionTable

public InteractionTable(ContingencyTable aTable)
                 throws java.lang.Exception
standard constructor for the InteractionTable class

Parameters:
aTable - the data to use
Throws:
java.lang.Exception

InteractionTable

public InteractionTable(int MatrixSize,
                        double[][] inMatrix)
standard constructor for the InteractionTable class

Parameters:
MatrixSize - number of rows and columns in the table
inMatrix - 2D array of doubles to fill the table
Method Detail

getOrdinalRanks

public double[] getOrdinalRanks()
                         throws java.lang.Exception
returns individual ordinal ranks from matrix of interactions between entities.

Throws:
java.lang.Exception

getBoydSilkRanks

public double[] getBoydSilkRanks()
                          throws java.lang.Exception
calculates a cardinal ranks for stochastic transitivity Boyd and Silk (1983) for each individual

Throws:
java.lang.Exception

getBBSRanks

public double[] getBBSRanks()
                     throws java.lang.Exception
calculates a cardinal rank (BBS method) for each individual

Throws:
java.lang.Exception

getDominanceIndex

public double[] getDominanceIndex()
                           throws java.lang.Exception
calculates a dominance index for each individual

Throws:
java.lang.Exception

getDominanceActivityIndex

public double[] getDominanceActivityIndex()
                                   throws java.lang.Exception
calculates a dominance activity index for each individual

Throws:
java.lang.Exception

listRanks

public void listRanks()
list ranks for each individual


listLinearityResults

public void listLinearityResults()
lists results from a Test for Linearity. Reported are the number of circular triads, Landau's h and Kendall's tau.