|
|||||||||
| 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 | |
|---|---|
java.lang.Object[] |
validDataSorted
|
| Fields inherited from class JavaGrinders.Variable |
|---|
allData, autoExtracted, df, itsDescriptives, 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 |
absolute()
set the value to its absolute value |
NumberDescriptives |
copyNumberDescriptives()
returns descriptive Statistic for the variable using the currently selected set of rows |
NumberVariable |
distance(double theScalar)
the absolute value after subtracting the constant from each value of the variable |
void |
doCorrelationAnalysis(NumberVariable theOtherYVariable)
fills the regression statistics for the variable with control over th intercept |
NumberVariable |
doLinRegressionAnalysis(NumberVariable theXVariable)
fills the regression statistics for the variable with control over the intercept |
void |
fillCompleteTerms(VariableOrganizer aXOrganizer,
ANOVAResults theResults)
fills the n-way interaction terms for the ANOVA |
void |
fillDescriptives(java.lang.Double hypMean)
fills the descriptive circular statistics for the angle variable with a comparison to an external mean |
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 |
CorrelationResults |
getAutoCorrelationResults()
obtains the Autocorrelation statistics for the variable |
CorrelationResults |
getCorrelationResults(NumberVariable theOtherYVariable)
fills the regression statistics for the variable with control over th intercept |
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 the intercept |
ANOVAResults |
getManWhitneyUResults(Variable theXVar,
double hypAngle)
returns the results from an analysis of differences in mean angle distance from a hypothetical direction |
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 |
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 |
NumberVariable |
getRanks()
return the ranks for the values in this array of the currently selected subset |
double |
getSDValue()
returns the average for values stored in the Vector as a double |
NumberVariable |
getSignedRank(double CenterVal)
returns the signed ranks of distances to the specified value |
double |
getSignedRankW(double CenterVal,
boolean plus)
fills the one-tailed sum of signed ranks |
double |
getSignedRankWProbability(double W)
returns the one-tailed robability of obtaining this Signed Rank W or greater |
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)
obtains the t-Test results for the variable |
double |
gettValue(double hypMean)
returns the average for values stored in the Vector as a double |
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 |
listCorrelationResults(NumberVariable theOtherYVariable)
fills the regression statistics for the variable with control over th intercept |
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 the intercept |
void |
listMultLinRegressionResults(VariableOrganizer theXVariableOrganizer)
fills the regression statistics for the variable with control over the intercept |
void |
makeNewDescriptives()
create a new set of descriptives for the variable the object |
NumberVariable |
multiply(double theScalar)
multiplies the constant with each value of the variable |
NumberVariable |
multiply(NumberVariable theVar)
multiplies the variable with the corresponding value of the other variable |
NumberVariable |
rank(boolean selectedOnly)
rank the values in this array |
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 |
setContinuousType()
sets the variable to type CONTINUOUS |
NumberVariable |
sign()
returns the sign for each value of the variable |
NumberVariable |
subtract(double theScalar)
subtracts the constant from each value of the variable |
| Methods inherited from class java.util.Vector |
|---|
add, add, addAll, addAll, addElement, capacity, clear, 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 |
| Field Detail |
|---|
public java.lang.Object[] validDataSorted
| 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 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 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 double gettValue(double hypMean)
throws java.lang.Exception
java.lang.Exception
public NumberVariable getDistancesToMean()
throws java.lang.Exception
java.lang.Exception
public NumberVariable getzTransform()
throws java.lang.Exception
java.lang.Exception
public NumberVariable getRanks()
throws java.lang.Exception
java.lang.Exception
public NumberVariable subtract(double theScalar)
throws java.lang.Exception
theScalar - the number to subtract
java.lang.Exception
public NumberVariable multiply(double theScalar)
throws java.lang.Exception
theScalar - the number to multiply
java.lang.Exception
public NumberVariable multiply(NumberVariable theVar)
throws java.lang.Exception
theVar - the numbers to multiply
java.lang.Exception
public NumberVariable distance(double theScalar)
throws java.lang.Exception
theScalar - the number to subtract
java.lang.Exception
public NumberVariable sign()
throws java.lang.Exception
java.lang.Exception
public NumberVariable absolute()
throws java.lang.Exception
java.lang.Exception
public NumberVariable rank(boolean selectedOnly)
throws java.lang.Exception
selectedOnly - only use the selected values of the sample, the others will be set to missing
java.lang.Exceptionpublic void makeNewDescriptives()
makeNewDescriptives in class Variable
public NumberDescriptives getNumberDescriptives()
throws java.lang.Exception
java.lang.Exception
public NumberDescriptives copyNumberDescriptives()
throws java.lang.Exception
java.lang.Exceptionpublic void invalidDescriptives()
invalidDescriptives in class Variable
public void fillDescriptives(java.lang.Double hypMean)
throws java.lang.Exception
fillDescriptives in class VariablehypMean - the value of the a-priori hypothesis mean
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 getSignedRank(double CenterVal)
throws java.lang.Exception
CenterVal - the median/center of the sample
java.lang.Exception
public double getSignedRankW(double CenterVal,
boolean plus)
throws java.lang.Exception
CenterVal - the mean/median of the sampleplus - the positive tail of the distribution
java.lang.Exception
public double getSignedRankWProbability(double W)
throws java.lang.Exception
W - Wilcoxon's Signed Rank Statistic W
java.lang.Exception
public void doCorrelationAnalysis(NumberVariable theOtherYVariable)
throws java.lang.Exception
theOtherYVariable - the independent NumberVariable
java.lang.Exception
public CorrelationResults getCorrelationResults(NumberVariable theOtherYVariable)
throws java.lang.Exception
theOtherYVariable - the independent NumberVariable
java.lang.Exceptionpublic void listCorrelationResults(NumberVariable theOtherYVariable)
theOtherYVariable - the independent NumberVariable
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 CorrelationResults getAutoCorrelationResults()
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
public ANOVAResults getManWhitneyUResults(Variable theXVar,
double hypAngle)
throws java.lang.Exception
theXVar - variable that contains information on group assignment
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||