public class StudyDesignContext extends WizardContext
Constructor and Description |
---|
StudyDesignContext()
Create a new context with an empty study design object
|
Modifier and Type | Method and Description |
---|---|
void |
addBetaScale(WizardStepPanel panel,
double betaScale)
Add a beta scale value to the study design
|
void |
addBetweenParticipantFactor(WizardStepPanel panel,
String predictorName)
Add a between participant factor to the StudyDesign
|
void |
addBetweenParticipantFactorCategory(WizardStepPanel panel,
String predictorName,
String categoryName)
Add a category to a between participant factor in the StudyDesign
|
void |
addClusteringNode(WizardStepPanel panel,
ClusterNode clusteringNode)
Add a clustering node
|
void |
addConfidenceIntervalOptions(WizardStepPanel panel)
Add an empty power confidence interval description to the context
|
void |
addHypothesisBetweenParticipantFactor(WizardStepPanel panel,
BetweenParticipantFactor factor)
Add a between participant factor to the hypothesis object
|
void |
addHypothesisRepeatedMeasuresFactor(WizardStepPanel panel,
RepeatedMeasuresNode factor)
Add a repeated measures factor to the hypothesis object
|
void |
addNominalPower(WizardStepPanel panel,
double power)
Add a nominal power value to the study design
|
void |
addPerGroupSampleSize(WizardStepPanel panel,
int sampleSize)
Add a per group sample size value to the study design
|
void |
addPowerCurveDataSeries(WizardStepPanel panel,
PowerCurveDataSeries series)
Add a data series to the power curve description
|
void |
addPowerMethod(WizardStepPanel panel,
PowerMethodEnum powerMethod)
Add a power method to the study design
|
void |
addQuantile(WizardStepPanel panel,
double quantile)
Add a quantile value to the study design
|
void |
addRepeatedMeasuresNode(WizardStepPanel panel,
RepeatedMeasuresNode rmNode)
Add a repeated measures node
|
void |
addResponseVariable(WizardStepPanel panel,
String variable)
Add a response variable to the study design
|
void |
addSigmaScale(WizardStepPanel panel,
double sigmaScale)
Add a sigma scale value to the study design
|
void |
addStatisticalTest(WizardStepPanel panel,
StatisticalTestTypeEnum test)
Add the statistical test to the study design
|
void |
addTypeIErrorRate(WizardStepPanel panel,
double alpha)
Add a Type I error rate to the study design
|
boolean |
betaIsValid()
Returns true if the beta matrix is valid
|
void |
checkComplete()
Checks if the study design is complete
|
void |
clearClustering(WizardStepPanel panel)
Clear all clustering information from the study design
|
void |
clearCovariance(WizardStepPanel panel)
Add covariance information in the study design.
|
void |
clearCovarianceRepeatedMeasures(WizardStepPanel panel)
Clear all repeated measures from the covariance set
|
void |
clearHypothesisFactors(WizardStepPanel panel)
Clear the factors associated with the current hypothesis
|
void |
clearPowerCurveDataSeries(WizardStepPanel panel)
Clear the data series in the power curve description
|
void |
clearRepeatedMeasures(WizardStepPanel panel)
Clear all repeated measures information from the study design
|
boolean |
covariateCovarianceIsValid()
Returns true if the sigmaG matrix is valid
|
boolean |
covariateOutcomesCovarianceIsValid()
Returns true if the sigmaG matrix is valid
|
void |
deleteBetaScale(WizardStepPanel panel,
double betaScale,
int index)
Delete the specified beta scale value
|
void |
deleteBetweenParticipantFactor(WizardStepPanel panel,
String predictorName)
Delete a between participant factor to the StudyDesign
|
void |
deleteBetweenParticipantFactorCategory(WizardStepPanel panel,
String predictorName,
String categoryName)
Remove a category from a between participant factor in the StudyDesign
|
void |
deleteClusteringNode(WizardStepPanel panel,
int index)
Delete a clustering node
|
void |
deleteConfidenceIntervalOptions(WizardStepPanel panel)
Store the power confidence interval description to the context
|
void |
deleteHypothesisBetweenParticipantFactor(WizardStepPanel panel,
BetweenParticipantFactor factor)
Delete a between participant factor from the hypothesis object
|
void |
deleteHypothesisRepeatedMeasuresFactor(WizardStepPanel panel,
RepeatedMeasuresNode factor)
Delete a repeated measures factor from the hypothesis object
|
void |
deleteNominalPower(WizardStepPanel panel,
double power,
int index)
Delete the specified nominal power value
|
void |
deletePerGroupSampleSize(WizardStepPanel panel,
int sampleSize,
int index)
Delete the specified quantile from the study design
|
void |
deletePowerCurveDataSeries(WizardStepPanel panel,
int index)
Delete the specified data series from the power curve description
|
void |
deletePowerMethod(WizardStepPanel panel,
PowerMethodEnum powerMethod)
Delete the specified power method from the study design
|
void |
deleteQuantile(WizardStepPanel panel,
double quantile,
int index)
Delete the specified quantile from the study design
|
void |
deleteRepeatedMeasuresNode(WizardStepPanel panel,
int index)
Delete a repeated measures node
|
void |
deleteResponseVariable(WizardStepPanel panel,
String variable,
int index)
Delete the specified response variable from the study design
|
void |
deleteSigmaScale(WizardStepPanel panel,
double sigmaScale,
int index)
Delete the specified sigma scale value
|
void |
deleteStatisticalTest(WizardStepPanel panel,
StatisticalTestTypeEnum test)
Remove the statistical test from the study design
|
void |
deleteTypeIErrorRate(WizardStepPanel panel,
double alpha,
int index)
Delete the specified type I error rate
|
double |
getBetaValue(int row,
int column)
Get the value in the beta matrix at the specified row and column
|
BetweenParticipantFactor |
getBetweenParticipantFactor(String factorName)
Get the specified between participant factor by name
|
int |
getBetweenParticipantFactorIndex(BetweenParticipantFactor factor)
Get the index of the specified between participant factor
|
Covariance |
getCovarianceByName(String covarianceName)
Get the specified covariance object
|
double |
getCovariateOutcomesCovarianceValue(int row,
int column)
Get the value in the sigmaYG matrix at the specified row and column.
|
double |
getGaussianCovariateStandardDeviation()
Get the value in the sigmaG matrix
|
FactorTable |
getParticipantGroups()
Get a table with all possible combinations of
between participant factors.
|
Hypothesis |
getPrimaryHypothesis()
Get the primary hypothesis (or null if not set)
|
RepeatedMeasuresNode |
getRepeatedMeasuresNode(String nodeName)
Get the specified repeated measures factor by name
|
int |
getRepeatedMeasuresNodeIndex(RepeatedMeasuresNode node)
Get the specified repeated measures factor by name
|
StudyDesign |
getStudyDesign()
Get the study design object associated with this context
|
int |
getValidBetweenParticipantFactorCount()
Get the number of between participant factors with 2 or
more categories.
|
int |
getValidRepeatedMeasuresFactorCount()
Get the number of valid repeated measures factors.
|
int |
getValidResponseVariableCount()
Get the number of valid response variables
|
int |
getValidTotalResponsesCount()
Counts the total number of responses in the design.
|
void |
loadStudyDesign(StudyDesign design)
Load the context from an existing StudyDesign object.
|
void |
setBeta(WizardStepPanel panel,
NamedMatrix fixed,
NamedMatrix random)
Store the beta matrix to the StudyDesign.
|
void |
setBetaValue(WizardStepPanel panel,
int row,
int column,
double value)
Set the value in the beta matrix at the specified row and column
|
void |
setBetweenParticipantContrast(WizardStepPanel panel,
NamedMatrix fixed,
NamedMatrix random)
Store the between participant contrast matrix to the StudyDesign.
|
void |
setCovariance(WizardStepPanel panel,
Covariance covariance)
Add covariance information in the study design.
|
void |
setCovarianceLearParameters(WizardStepPanel panel,
String covarianceName,
double baseCorrelation,
double decayRate)
Update the LEAR parameters (Simpson 2010)
|
void |
setCovarianceStandardDeviationValue(WizardStepPanel panel,
String covarianceName,
int index,
double value)
Set a standard deviation value for the named covariance object
|
void |
setCovarianceType(WizardStepPanel panel,
String covarianceName,
CovarianceTypeEnum type)
Set the type of the named covariance structure
|
void |
setCovarianceValue(WizardStepPanel panel,
String covarianceName,
int row,
int column,
double value)
Set the specified cell value in the named covariance structure
|
void |
setCovariate(WizardStepPanel panel,
boolean hasCovariate)
Store the covariate information in the StudyDesign object.
|
void |
setCovariateOutcomesCovarianceValue(WizardStepPanel panel,
int row,
int column,
double value)
Set the value in the sigmaYG matrix at the specified row and column
|
void |
setDesignEssenceMatrix(WizardStepPanel panel,
NamedMatrix designFixed,
NamedMatrix designRandom)
Store the design essence matrix to the StudyDesign.
|
void |
setGaussianCovariateStandardDeviation(WizardStepPanel panel,
double value)
Set the standard deviation (really the variance) in the sigmaG matrix
|
void |
setHypothesisType(WizardStepPanel panel,
HypothesisTypeEnum type)
Update the type of hypothesis
|
void |
setPowerCurveDescription(WizardStepPanel panel,
boolean includePowerCurve)
Toggle the power curve description in the studyDesign
|
void |
setPowerCurveXAxisType(WizardStepPanel panel,
HorizontalAxisLabelEnum axisType)
Set the X-axis type in the power curve description
|
void |
setRelativeGroupSizeValue(WizardStepPanel panel,
int value,
int index)
Store the relative group size information to the StudyDesign.
|
void |
setSigmaCovariate(WizardStepPanel panel,
NamedMatrix sigmaCovariate)
Store the covariance matrix for the Gaussian covariate to the StudyDesign.
|
void |
setSigmaError(WizardStepPanel panel,
NamedMatrix sigmaError)
Store the covariance matrix for errors to the StudyDesign.
|
void |
setSigmaOutcomes(WizardStepPanel panel,
NamedMatrix sigmaY)
Store the covariance matrix of outcomes to the StudyDesign (for GLMM(F,g) designs).
|
void |
setSigmaOutcomesCovariate(WizardStepPanel panel,
NamedMatrix sigmaYG)
Store the covariance matrix of the Gaussian covariate and outcomes to the StudyDesign.
|
void |
setSolutionType(WizardStepPanel panel,
SolutionTypeEnum solutionType)
Update the StudyDesign with the solution type (i.e.
|
void |
setThetaNull(WizardStepPanel panel,
NamedMatrix thetaNull)
Store the null hypothesis matrix to the StudyDesign.
|
void |
setWithinParticipantContrast(WizardStepPanel panel,
NamedMatrix withinParticipantContrast)
Store the within participant contrast matrix to the StudyDesign.
|
void |
updateClusteringNode(WizardStepPanel panel,
int index,
String clusterName,
int clusterSize,
double icc)
Update the value of a clustering node
|
void |
updateConfidenceIntervalOptions(WizardStepPanel panel,
boolean betaFixed,
boolean sigmaFixed,
double lowerTailProbability,
double upperTailProbability,
int sampleSize,
int rankOfDesignMatrix)
Store the power confidence interval description to the context
|
void |
updateHypothesisBetweenParticipantFactorTrend(WizardStepPanel panel,
BetweenParticipantFactor factor,
HypothesisTrendTypeEnum trendType)
Update the trend information for a between participant factor in the hypothesis object
|
void |
updateHypothesisRepeatedMeasuresFactorTrend(WizardStepPanel panel,
RepeatedMeasuresNode factor,
HypothesisTrendTypeEnum trendType)
Update the trend information for a repeated measures factor in the hypothesis object
|
void |
updateHypothesisThetaNullValue(WizardStepPanel panel,
int row,
int column,
double value)
Update the value in the theta null matrix
|
void |
updateRepeatedMeasuresNode(WizardStepPanel panel,
int index,
String dimension,
RepeatedMeasuresDimensionType rmDimensionType,
int numberOfMeasurements,
List<Spacing> spacingList)
Update the value of a repeated measures node
|
addContextListener, isComplete
public StudyDesignContext()
public StudyDesign getStudyDesign()
public void loadStudyDesign(StudyDesign design)
design
- StudyDesign objectpublic FactorTable getParticipantGroups()
public int getValidBetweenParticipantFactorCount()
public int getValidResponseVariableCount()
public int getValidTotalResponsesCount()
public int getValidRepeatedMeasuresFactorCount()
public void addTypeIErrorRate(WizardStepPanel panel, double alpha)
panel
- panel initiating the changealpha
- the Type I error ratepublic void deleteTypeIErrorRate(WizardStepPanel panel, double alpha, int index)
panel
- panel initiating the changealpha
- the Type I error ratethe
- index in the listpublic void addBetaScale(WizardStepPanel panel, double betaScale)
panel
- the panel initiating the changebetaScale
- the beta scale valuepublic void deleteBetaScale(WizardStepPanel panel, double betaScale, int index)
panel
- the panel initiating the changebetaScale
- the beta scale valueindex
- the index of the value in the listpublic void addSigmaScale(WizardStepPanel panel, double sigmaScale)
panel
- the panel initiating the changesigmaScale
- the sigma scale valuepublic void deleteSigmaScale(WizardStepPanel panel, double sigmaScale, int index)
panel
- the panel initiating the changesigmaScale
- the sigma scale valueindex
- the index of the value in the listpublic void addNominalPower(WizardStepPanel panel, double power)
panel
- the panel initiating the changepower
- the nominal power valuepublic void deleteNominalPower(WizardStepPanel panel, double power, int index)
panel
- the panel initiating the changepower
- the nominal power valueindex
- the index of the value in the listpublic void addPowerMethod(WizardStepPanel panel, PowerMethodEnum powerMethod)
panel
- the panel initiating the changepowerMethod
- the nominal power valuepublic void deletePowerMethod(WizardStepPanel panel, PowerMethodEnum powerMethod)
panel
- the panel initiating the changepowerMethod
- the power methodindex
- the index of the value in the listpublic void addQuantile(WizardStepPanel panel, double quantile)
panel
- the panel initiating the changequantile
- the quantile valuepublic void deleteQuantile(WizardStepPanel panel, double quantile, int index)
panel
- the panel initiating the changequantile
- the quantile valueindex
- the index of the value in the listpublic void addPerGroupSampleSize(WizardStepPanel panel, int sampleSize)
panel
- the panel initiating the changeperGroupSampleSize
- the quantile valuepublic void deletePerGroupSampleSize(WizardStepPanel panel, int sampleSize, int index)
panel
- the panel initiating the changequantile
- the quantile valueindex
- the index of the value in the listpublic void addStatisticalTest(WizardStepPanel panel, StatisticalTestTypeEnum test)
panel
- the panel initiating the changetest
- the statistical testpublic void deleteStatisticalTest(WizardStepPanel panel, StatisticalTestTypeEnum test)
panel
- the panel initiating the changetest
- the statistical testpublic void setSolutionType(WizardStepPanel panel, SolutionTypeEnum solutionType)
panel
- wizard panel initiating the changesolutionType
- indicates if the user is solving for power or sample sizepublic void setCovariate(WizardStepPanel panel, boolean hasCovariate)
panel
- wizard panel initiating the changehasCovariate
- indicates if the design controls for a Gaussian covariatepublic void setDesignEssenceMatrix(WizardStepPanel panel, NamedMatrix designFixed, NamedMatrix designRandom)
panel
- wizard panel initiating the changedesignFixed
- the fixed sub-matrix of the design essence matrixdesignRandom
- for GLMM(F,g) designs, specifies the random
portion of the design essence matrixpublic void setBetweenParticipantContrast(WizardStepPanel panel, NamedMatrix fixed, NamedMatrix random)
panel
- wizard panel initiating the changefixed
- the fixed sub-matrix of the contrastrandom
- for GLMM(F,g) designs, specifies the random
portion of the contrastpublic void setWithinParticipantContrast(WizardStepPanel panel, NamedMatrix withinParticipantContrast)
panel
- wizard panel initiating the changewithinParticipantContrast
- the contrast matrixpublic boolean betaIsValid()
public double getBetaValue(int row, int column)
row
- rowcolumn
- columnpublic void setBetaValue(WizardStepPanel panel, int row, int column, double value)
panel
- row
- column
- value
- public void setBeta(WizardStepPanel panel, NamedMatrix fixed, NamedMatrix random)
panel
- wizard panel initiating the changefixed
- the fixed sub-matrix of the beta matrixrandom
- for GLMM(F,g) designs, specifies the random
portion of the beta matrixpublic void setSigmaCovariate(WizardStepPanel panel, NamedMatrix sigmaCovariate)
panel
- wizard panel initiating the changesigmaCovariate
- the covariance matrix of the Gaussian covariate (1x1)public void setSigmaError(WizardStepPanel panel, NamedMatrix sigmaError)
panel
- wizard panel initiating the changesigmaCovariate
- the covariance matrix of errorspublic void setSigmaOutcomesCovariate(WizardStepPanel panel, NamedMatrix sigmaYG)
panel
- wizard panel initiating the changesigmaYG
- the covariance matrix of the Gaussian covariate and outcomespublic void setSigmaOutcomes(WizardStepPanel panel, NamedMatrix sigmaY)
panel
- wizard panel initiating the changesigmaYG
- the covariance matrix of the outcomespublic void setThetaNull(WizardStepPanel panel, NamedMatrix thetaNull)
panel
- wizard panel initiating the changethetaNull
- the null hypothesis matrixpublic void addClusteringNode(WizardStepPanel panel, ClusterNode clusteringNode)
panel
- clusteringNode
- public void deleteClusteringNode(WizardStepPanel panel, int index)
panel
- index
- public void clearClustering(WizardStepPanel panel)
panel
- panel initiating the changepublic void updateClusteringNode(WizardStepPanel panel, int index, String clusterName, int clusterSize, double icc)
panel
- index
- clusterName
- clusterSize
- icc
- public void addRepeatedMeasuresNode(WizardStepPanel panel, RepeatedMeasuresNode rmNode)
panel
- the panel initiating the changermNode
- the repeated measures nodepublic void deleteRepeatedMeasuresNode(WizardStepPanel panel, int index)
panel
- the panel initiating the changeindex
- the repeated measures depthpublic void clearRepeatedMeasures(WizardStepPanel panel)
panel
- panel initiating the changepublic void updateRepeatedMeasuresNode(WizardStepPanel panel, int index, String dimension, RepeatedMeasuresDimensionType rmDimensionType, int numberOfMeasurements, List<Spacing> spacingList)
panel
- index
- clusterName
- clusterSize
- icc
- public void addBetweenParticipantFactor(WizardStepPanel panel, String predictorName)
panel
- wizard panel initiating the changepredictorName
- the name of the new predictorpublic void deleteBetweenParticipantFactor(WizardStepPanel panel, String predictorName)
panel
- wizard panel initiating the changepredictorName
- the name of the predictorpublic BetweenParticipantFactor getBetweenParticipantFactor(String factorName)
factorName
- name of the factorpublic int getBetweenParticipantFactorIndex(BetweenParticipantFactor factor)
factorName
- name of the factorpublic RepeatedMeasuresNode getRepeatedMeasuresNode(String nodeName)
factorName
- name of the factorpublic int getRepeatedMeasuresNodeIndex(RepeatedMeasuresNode node)
factorName
- name of the factorpublic void addBetweenParticipantFactorCategory(WizardStepPanel panel, String predictorName, String categoryName)
panel
- wizard panel initiating the changepredictorName
- the name of the predictorcategoryName
- the name of the new categorypublic void deleteBetweenParticipantFactorCategory(WizardStepPanel panel, String predictorName, String categoryName)
panel
- wizard panel initiating the changepredictorName
- the name of the predictorcategoryName
- the name of the new categorypublic void setRelativeGroupSizeValue(WizardStepPanel panel, int value, int index)
panel
- wizard panel initiating the changerelativeGroupSizeList
- list of relative group sizespublic void addResponseVariable(WizardStepPanel panel, String variable)
panel
- the panel initiating the changevariable
- the response variablepublic void deleteResponseVariable(WizardStepPanel panel, String variable, int index)
panel
- the panel initiating the changevariable
- the response variableindex
- the index of the value in the listpublic Hypothesis getPrimaryHypothesis()
public void clearHypothesisFactors(WizardStepPanel panel)
panel
- public void setHypothesisType(WizardStepPanel panel, HypothesisTypeEnum type)
panel
- type
- public void addHypothesisBetweenParticipantFactor(WizardStepPanel panel, BetweenParticipantFactor factor)
panel
- panel initiating the changename
- name of the factorpublic void deleteHypothesisBetweenParticipantFactor(WizardStepPanel panel, BetweenParticipantFactor factor)
panel
- panel initiating the changename
- name of the factorpublic void updateHypothesisBetweenParticipantFactorTrend(WizardStepPanel panel, BetweenParticipantFactor factor, HypothesisTrendTypeEnum trendType)
panel
- panel initiating the changename
- name of the factortrendType
- trend type for the factorpublic void addHypothesisRepeatedMeasuresFactor(WizardStepPanel panel, RepeatedMeasuresNode factor)
panel
- panel initiating the changename
- name of the factorpublic void deleteHypothesisRepeatedMeasuresFactor(WizardStepPanel panel, RepeatedMeasuresNode factor)
panel
- panel initiating the changename
- name of the factorpublic void updateHypothesisRepeatedMeasuresFactorTrend(WizardStepPanel panel, RepeatedMeasuresNode factor, HypothesisTrendTypeEnum trendType)
panel
- panel initiating the changename
- name of the factortrendType
- trend type for the factorpublic void updateHypothesisThetaNullValue(WizardStepPanel panel, int row, int column, double value)
panel
- panel initiating the changerow
- cell rowcolumn
- cell columnvalue
- new cell valuepublic boolean covariateCovarianceIsValid()
public boolean covariateOutcomesCovarianceIsValid()
public double getGaussianCovariateStandardDeviation()
public void setGaussianCovariateStandardDeviation(WizardStepPanel panel, double value)
panel
- value
- public double getCovariateOutcomesCovarianceValue(int row, int column)
row
- rowcolumn
- columnpublic void setCovariateOutcomesCovarianceValue(WizardStepPanel panel, int row, int column, double value)
panel
- row
- column
- value
- public void clearCovarianceRepeatedMeasures(WizardStepPanel panel)
public void setCovarianceType(WizardStepPanel panel, String covarianceName, CovarianceTypeEnum type)
panel
- panel initiating the changetype
- new typepublic void setCovarianceLearParameters(WizardStepPanel panel, String covarianceName, double baseCorrelation, double decayRate)
panel
- covarianceName
- baseCorrelation
- decayRate
- public void setCovarianceValue(WizardStepPanel panel, String covarianceName, int row, int column, double value)
panel
- covarianceName
- row
- column
- value
- public Covariance getCovarianceByName(String covarianceName)
covarianceName
- public void setCovarianceStandardDeviationValue(WizardStepPanel panel, String covarianceName, int index, double value)
panel
- covarianceName
- index
- value
- public void clearCovariance(WizardStepPanel panel)
panel
- wizard panel initiating the changecovariance
- covariance for a single dimensionpublic void setCovariance(WizardStepPanel panel, Covariance covariance)
panel
- wizard panel initiating the changecovariance
- covariance for a single dimensionpublic void addConfidenceIntervalOptions(WizardStepPanel panel)
panel
- wizard panel initiating the changeconfidenceIntervalDescription
- confidence interval descriptionpublic void deleteConfidenceIntervalOptions(WizardStepPanel panel)
panel
- wizard panel initiating the changeconfidenceIntervalDescription
- confidence interval descriptionpublic void updateConfidenceIntervalOptions(WizardStepPanel panel, boolean betaFixed, boolean sigmaFixed, double lowerTailProbability, double upperTailProbability, int sampleSize, int rankOfDesignMatrix)
panel
- wizard panel initiating the changeconfidenceIntervalDescription
- confidence interval descriptionpublic void setPowerCurveDescription(WizardStepPanel panel, boolean includePowerCurve)
panel
- wizard panel initiating the changeincludePowerCurve
- power curve descriptionpublic void setPowerCurveXAxisType(WizardStepPanel panel, HorizontalAxisLabelEnum axisType)
panel
- panel initiating the changeaxisType
- public void clearPowerCurveDataSeries(WizardStepPanel panel)
panel
- public void addPowerCurveDataSeries(WizardStepPanel panel, PowerCurveDataSeries series)
panel
- panel initiating the changeseries
- the data seriespublic void deletePowerCurveDataSeries(WizardStepPanel panel, int index)
panel
- panel initiating the changeindex
- index of the data series in the list of seriespublic void checkComplete()
checkComplete
in class WizardContext
University of Colorado Denver, Department of Biostatistics and Informatics