|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector
JavaGrinders.Variable
JavaGrinders.NumberVariable
public class NumberVariable
handles things that a general variable containing numbers should do or know about. Based on a more generic Variable it supports ways to select rows using a variety of criteria, and reports descriptive (parametric) statistics. All numbers are stored and handled as Doubles.
| Field Summary |
|---|
| Fields inherited from class JavaGrinders.Variable |
|---|
autoExtracted, df, doWarnings, itsHighlitedColor, itsLineColor, itsLocationColor, rand |
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
NumberVariable(java.lang.String varName,
VariableOrganizer theOwner)
Standard constructor for the root number Variable class using a VariableOrganizer |
|
NumberVariable(java.lang.String varName,
VariableOrganizer anOrganizer,
double[] theData)
Standard constructor for the NumberVariable class using a double array of data |
|
| Method Summary | |
|---|---|
NumberVariable |
doLinRegressionAnalysis(NumberVariable theXVariable)
fills the regression statistics for the variable with control over th intercept |
void |
fill(int nRows,
double aValue)
fills the variable with a constant |
void |
fill(int startRow,
double[] values)
fills the variable with a constant |
void |
fillCompleteTerms(VariableOrganizer aXOrganizer,
ANOVAResults theResults)
fills the n-way interaction terms for the ANOVA |
void |
fillDescriptives()
fills the descriptive statistics for the variable |
void |
fillWithFormula(java.lang.String aFormula)
fills the variable with individual datavalues created through a formula |
void |
fillWithGaussRandom(double theMean,
double theSD)
fills the variable with random values from a Gaussian Distribution |
void |
fillWithParser(DataFileParser aParser,
int varNum,
boolean firstRowAsLabels)
fills the variable with individual datavalues read from a textfile using a DataFileParser object |
void |
fillWithRandomFromDistribution(NumberVariable theDistribution)
fills the variable with random values from a Gaussian Distribution |
void |
fillWithRowNum()
fills the variable with individual datavalues created through a formula |
void |
fillWithUniformRandom()
fills the variable with random values from a uniform distribution between 0 and 1 |
ANOVAResults |
getANOVAResults(Variable theXVariable)
fills the ANOVA statistics for the variable |
ANOVAResults |
getANOVAResults(VariableOrganizer aXOrganizer)
fills the ANOVA statistics for a full factorial model |
NumberVariable |
getDistancesToMean()
returns a variable containing each values relative to its mean |
Descriptives[] |
getGroupDescriptives(Variable theXVariable)
returns the descriptives for the groups identified by X |
NumberVariable |
getLinRegressionResiduals(NumberVariable theXVariable)
fills the regression statistics for the variable with control over th intercept |
RegressionResults |
getLinRegressionResults(NumberVariable theXVariable)
fills the regression statistics for the variable with control over th intercept |
double |
getMaxValue()
returns the maximum value stored in the Vector as a double |
double |
getMeanValue()
returns the average for values stored in the Vector as a double |
double |
getMinValue()
returns the minimum value stored in the Vector as a double |
MultRegressionResults |
getMultLinRegressionResults(VariableOrganizer theXVariableOrganizer)
fills the regression statistics for the variable with control over the intercept |
double[] |
getNumberArray()
returns the values of selected rows into an array of doubles |
NumberDescriptives |
getNumberDescriptives()
fills the descriptive statistics for the variable and returns the results |
double |
getRange()
returns the minimum value stored in the Vector as a double |
double |
getSDValue()
returns the average for values stored in the Vector as a double |
SquaresCrossproducts |
getSSCP(NumberVariable theXVariable)
returns the sums of squares and crossproducts for the variable |
double |
getSumValue()
returns the average for values stored in the Vector as a double |
tTestResults |
gettTestResults(double mean)
fills the t-Test results for the variable |
double |
getVarianceValue()
returns the average for values stored in the Vector as a double |
NumberVariable |
getzTransform()
returns a variable containing each values relative to its mean |
void |
invalidDescriptives()
descriptive stats need to be updated |
void |
listBasicDescriptives()
lists the basic descriptive statistics for the variable |
void |
listDescriptives()
lists the descriptive statistics for the variable |
void |
listGroupDescriptives(Variable theXVariable)
lists the descriptives for the groups identified by X |
void |
listLinRegressionResults(NumberVariable theXVariable)
fills the regression statistics for the variable with control over th intercept |
void |
listMultLinRegressionResults(VariableOrganizer theXVariableOrganizer)
fills the regression statistics for the variable with control over the intercept |
void |
selectAbove(double cutoffValue,
boolean fromPrevSelected)
select all rows with a value greater than the one provided |
void |
selectAboveEqual(double cutoffValue,
boolean fromPrevSelected)
select all rows with a value greater or equal than the one provided |
void |
selectBelow(double cutoffValue,
boolean fromPrevSelected)
select all rows with a value less than the one provided |
void |
selectBelowEqual(double cutoffValue,
boolean fromPrevSelected)
select all rows with a value less or equal than the one provided |
void |
selectEqual(double aValue,
boolean fromPrevSelected)
select all rows with a value greater or equal than the one provided |
void |
selectRange(double lowValue,
double highValue,
boolean fromPrevSelected)
select all rows with a value between the lower and upper limits provided. |
void |
selectValue(java.lang.Object whichValue,
boolean fromPrevSelected)
selects rows that match a given object from the currently selected set of rows |
void |
setContinuousType()
sets the variable to type CONTINUOUS |
void |
sort(boolean ascending)
sorts the values for all rows |
| Methods inherited from class java.util.Vector |
|---|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
iterator, listIterator, listIterator |
| Constructor Detail |
|---|
public NumberVariable(java.lang.String varName,
VariableOrganizer theOwner)
throws java.lang.Exception
varName - assigns a name (String) to the variabletheOwner - an instance of VariableOrganizer
class coordinates a set of variables with respect to number of data points available
and the rows that are currently selected
java.lang.Exception
public NumberVariable(java.lang.String varName,
VariableOrganizer anOrganizer,
double[] theData)
throws java.lang.Exception
varName - assigns a name (String) to the variableanOrganizer - an instance of VariableOrganizer
class coordinates a set of variables with respect to number of data points available
and the rows that are currently selectedtheData - a double array of data
java.lang.Exception| Method Detail |
|---|
public void setContinuousType()
throws java.lang.Exception
java.lang.Exception
public void fill(int nRows,
double aValue)
throws java.lang.Exception
nRows - the number of rows to fillaValue - a double value
java.lang.Exception
public void fill(int startRow,
double[] values)
throws java.lang.Exception
startRow - the starting rows to fillvalues - the double values to use
java.lang.Exception
public void fillWithParser(DataFileParser aParser,
int varNum,
boolean firstRowAsLabels)
throws java.lang.Exception
fillWithParser in class VariableaParser - the DataFileParser that was used to
read data values from a text filevarNum - marks the number of the column to be filled into the variablefirstRowAsLabels - whether the first row contains a variable label
java.lang.Exception
public void fillWithUniformRandom()
throws java.lang.Exception
java.lang.Exception
public void fillWithGaussRandom(double theMean,
double theSD)
throws java.lang.Exception
theMean - the mean for the gaussian distributiontheSD - the standard devaiation for the gaussian distribution
java.lang.Exception
public void fillWithRandomFromDistribution(NumberVariable theDistribution)
throws java.lang.Exception
theDistribution - a distribution from which to sample random numbers
java.lang.Exception
public void fillWithFormula(java.lang.String aFormula)
throws java.lang.Exception
aFormula - the formula to use for filling the variable with values
java.lang.Exception
public void fillWithRowNum()
throws java.lang.Exception
java.lang.Exception
public void selectValue(java.lang.Object whichValue,
boolean fromPrevSelected)
throws java.lang.Exception
selectValue in class VariablewhichValue - the object to matchfromPrevSelected - notes whether the search should only be performed on
currently selected rows
java.lang.Exception
public void selectEqual(double aValue,
boolean fromPrevSelected)
throws java.lang.Exception
aValue - lists the comparison valuefromPrevSelected - notes whether the search should only be performed on
currently selected rows
java.lang.Exception
public void selectAboveEqual(double cutoffValue,
boolean fromPrevSelected)
throws java.lang.Exception
cutoffValue - lists the comparison valuefromPrevSelected - notes whether the search should only be performed on
currently selected rows
java.lang.Exception
public void selectAbove(double cutoffValue,
boolean fromPrevSelected)
throws java.lang.Exception
cutoffValue - lists the comparison valuefromPrevSelected - notes whether the search should only be performed on
currently selected rows
java.lang.Exception
public void selectBelowEqual(double cutoffValue,
boolean fromPrevSelected)
throws java.lang.Exception
cutoffValue - lists the comparison valuefromPrevSelected - notes whether the search should only be performed on
currently selected rows
java.lang.Exception
public void selectBelow(double cutoffValue,
boolean fromPrevSelected)
throws java.lang.Exception
cutoffValue - lists the comparison valuefromPrevSelected - notes whether the search should only be performed on
currently selected rows
java.lang.Exception
public void selectRange(double lowValue,
double highValue,
boolean fromPrevSelected)
throws java.lang.Exception
lowValue - the lower limithighValue - the upper limitfromPrevSelected - notes whether the search should only be performed on
currently selected rows
java.lang.Exception
public double getMaxValue()
throws java.lang.Exception
java.lang.Exception
public double getMinValue()
throws java.lang.Exception
java.lang.Exception
public double getRange()
throws java.lang.Exception
java.lang.Exception
public double getMeanValue()
throws java.lang.Exception
java.lang.Exception
public double getSumValue()
throws java.lang.Exception
java.lang.Exception
public double getVarianceValue()
throws java.lang.Exception
java.lang.Exception
public double getSDValue()
throws java.lang.Exception
java.lang.Exception
public void sort(boolean ascending)
throws java.lang.Exception
sort in class Variableascending - sort in ascending order?
java.lang.Exceptionpublic void invalidDescriptives()
invalidDescriptives in class Variable
public void fillDescriptives()
throws java.lang.Exception
java.lang.Exception
public NumberDescriptives getNumberDescriptives()
throws java.lang.Exception
java.lang.Exception
public void listBasicDescriptives()
throws java.lang.Exception
java.lang.Exception
public void listDescriptives()
throws java.lang.Exception
listDescriptives in class Variablejava.lang.Exception
public double[] getNumberArray()
throws java.lang.Exception
java.lang.Exception
public NumberVariable getzTransform()
throws java.lang.Exception
java.lang.Exception
public NumberVariable getDistancesToMean()
throws java.lang.Exception
java.lang.Exception
public Descriptives[] getGroupDescriptives(Variable theXVariable)
throws java.lang.Exception
theXVariable - the independent NumberVariable
java.lang.Exception
public void listGroupDescriptives(Variable theXVariable)
throws java.lang.Exception
listGroupDescriptives in class VariabletheXVariable - the independent NumberVariable
java.lang.Exception
public NumberVariable doLinRegressionAnalysis(NumberVariable theXVariable)
throws java.lang.Exception
theXVariable - the independent NumberVariable
java.lang.Exceptionpublic void listLinRegressionResults(NumberVariable theXVariable)
theXVariable - the independent NumberVariable
public RegressionResults getLinRegressionResults(NumberVariable theXVariable)
throws java.lang.Exception
theXVariable - the independent NumberVariable
java.lang.Exception
public NumberVariable getLinRegressionResiduals(NumberVariable theXVariable)
throws java.lang.Exception
theXVariable - the independent NumberVariable
java.lang.Exception
public MultRegressionResults getMultLinRegressionResults(VariableOrganizer theXVariableOrganizer)
throws java.lang.Exception
theXVariableOrganizer - the independent variables in a VariableOrganizer
java.lang.Exceptionpublic void listMultLinRegressionResults(VariableOrganizer theXVariableOrganizer)
theXVariableOrganizer - the independent variables in a VariableOrganizer
public void fillCompleteTerms(VariableOrganizer aXOrganizer,
ANOVAResults theResults)
throws java.lang.Exception
java.lang.Exception
public tTestResults gettTestResults(double mean)
throws java.lang.Exception
mean - the mean to compare to
java.lang.Exception
public ANOVAResults getANOVAResults(Variable theXVariable)
throws java.lang.Exception
theXVariable - the independent Variable
java.lang.Exception
public ANOVAResults getANOVAResults(VariableOrganizer aXOrganizer)
throws java.lang.Exception
aXOrganizer - the VariableOrganizer containing independent variables
java.lang.Exception
public SquaresCrossproducts getSSCP(NumberVariable theXVariable)
throws java.lang.Exception
theXVariable - the independent NumberVariable
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||