|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSimulations.HypothesisTest
public class HypothesisTest
Class to do hypothesis testing using simulation to generate the null distribution.
Constructor Summary | |
---|---|
HypothesisTest(Model nullModel,
Model altModel,
Constrainer nullConstrainer,
Constrainer altConstrainer,
Optimizer o,
int reps)
Constructor for use when one or both of the null hypothesis and alternative hypothesis have constraints. |
|
HypothesisTest(Model nullModel,
Model altModel,
Optimizer o,
int reps)
Constructor for use when neither the null hypothesis and alternative hypothesis have constraints. |
Method Summary | |
---|---|
double |
test(Tree t,
Alignment a,
Alignment unobserved,
Parameters nullParams,
Parameters altParams)
Does a hpyothesis test on the given data and gives a p-value |
double |
test(Tree t,
Alignment a,
Alignment unobserved,
Parameters nullParams,
Parameters altParams,
java.util.Map<java.lang.String,java.lang.String> recode)
Does a hpyothesis test on the given data and gives a p-value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HypothesisTest(Model nullModel, Model altModel, Optimizer o, int reps)
nullModel
- The null modelaltModel
- The alternative modelo
- The optimizer to be usedreps
- The number of samples of the null distribution to generatepublic HypothesisTest(Model nullModel, Model altModel, Constrainer nullConstrainer, Constrainer altConstrainer, Optimizer o, int reps)
NoConstraints
should be used as input for the hypothesis that is unconstrained.
nullModel
- The null modelaltModel
- The alternative modelnullConstrainer
- The constrainer for the null hypothesisaltConstrainer
- The constrainer for the alternative hypothesiso
- The optimizer to be usedreps
- The number of samples of the null distribution to generateMethod Detail |
---|
public double test(Tree t, Alignment a, Alignment unobserved, Parameters nullParams, Parameters altParams) throws RateCategory.RateException, Model.ModelException, TreeException, Parameters.ParameterException, OutputException, AlignmentException, Simulate.SimulationException
t
- The treea
- The alignmentunobserved
- Any unobserved statesnullParams
- The paramters of the null modelaltParams
- The parameters of the alternative model
AlignmentException
- Thrown if there is a problem with the alignment
TreeException
- Thrown if the constrainer has a problem with the tree
Simulate.SimulationException
- Thrown if there is a problem
with the simulation (currently only if attempting to simulate for a site class
we don't have a model and / or constraints for)
RateCategory.RateException
- Thrown if there is an issue with
a rate category in the model (e.g. a badly formatted rate).
Model.ModelException
- Thrown if there is a problem with the
model (e.g. the rate categories differ in their states)
Parameters.ParameterException
- Thrown if there is a problem
with the parameters (e.g. a requied parameter is not present)
OutputException
- Should not currently be thrown as would only be thrown
when an optimizer try to write a checkpoint file and that isn't currently supported
in this class. Included as should be in a future version.public double test(Tree t, Alignment a, Alignment unobserved, Parameters nullParams, Parameters altParams, java.util.Map<java.lang.String,java.lang.String> recode) throws RateCategory.RateException, Model.ModelException, TreeException, Parameters.ParameterException, OutputException, AlignmentException, Simulate.SimulationException
t
- The treea
- The alignmentunobserved
- Any unobserved statesnullParams
- The paramters of the null modelaltParams
- The parameters of the alternative modelrecode
- The recoding to be passed to the simulator. See
Simulate.getAlignment(int, java.util.Map)
for while this is neccessary.
AlignmentException
- Thrown if there is a problem with the alignment
TreeException
- Thrown if the constrainer has a problem with the tree
Simulate.SimulationException
- Thrown if there is a problem
with the simulation (currently only if attempting to simulate for a site class
we don't have a model and / or constraints for)
RateCategory.RateException
- Thrown if there is an issue with
a rate category in the model (e.g. a badly formatted rate).
Model.ModelException
- Thrown if there is a problem with the
model (e.g. the rate categories differ in their states)
Parameters.ParameterException
- Thrown if there is a problem
with the parameters (e.g. a requied parameter is not present)
OutputException
- Should not currently be thrown as would only be thrown
when an optimizer try to write a checkpoint file and that isn't currently supported
in this class. Included as should be in a future version.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |