Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.models.mixture.gibbssampling
Class VarianceRatioBurnInTest

    java.lang.Object
      de.jstacs.models.mixture.gibbssampling.BurnInTest
          de.jstacs.models.mixture.gibbssampling.AbstractBurnInTest
              de.jstacs.models.mixture.gibbssampling.VarianceRatioBurnInTest

All Implemented Interfaces:
  Storable, Cloneable

    public class VarianceRatioBurnInTest

extends AbstractBurnInTest

In this class the Variance-Ratio method of Gelman and Rubin is implemented to test the length of the burn-in phase of a multi-chain Gibbs Sampling (number of chains >2). The number of initial iterations is calculated by comparing the variances between the different chains with the variances within the chains. The method returns the same length of the burn-in for all sampled chains.

Author:
  Berit Haldemann

Field Summary

Fields inherited from class de.jstacs.models.mixture.gibbssampling.AbstractBurnInTest
`values`

Constructor Summary
`VarianceRatioBurnInTest(int starts)` Constructor for initialization of the `VarianceRatioBurnInTest` given a fixed threshold value of 1.2.
`VarianceRatioBurnInTest(int starts, double t)` Creates a new `VarianceRatioBurnInTest` instance.
`VarianceRatioBurnInTest(StringBuffer rep)` The standard constructor for the `Storable` interface.

Method Summary
`protected int` | `computeLengthOfBurnIn()` Computes and returns the length of the burn-in phase given by the Variance-Ratio burn-in test.
`protected StringBuffer` | `getFurtherInformation()` This method returns further information for the `AbstractBurnInTest`.
`String` | `getInstanceName()` Returns a short description of the burn-in test.
`protected String` | `getXMLTag()` This method returns the XML tag that is used in `AbstractBurnInTest.toXML()` and `AbstractBurnInTest.AbstractBurnInTest(StringBuffer)`.
`protected void` | `setFurtherInformation(StringBuffer xml)` This method sets further information for the `AbstractBurnInTest`.

Methods inherited from class de.jstacs.models.mixture.gibbssampling.AbstractBurnInTest
`getLengthOfBurnIn, resetAllValues, setCurrentSamplingIndex, setValue, toXML`

Methods inherited from class de.jstacs.models.mixture.gibbssampling.BurnInTest
`clone`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### VarianceRatioBurnInTest

    public VarianceRatioBurnInTest(int starts)

  Constructor for initialization of the `VarianceRatioBurnInTest` given a fixed threshold value of 1.2.

  Parameters:
    `starts` - the number of chains resulting from the number of starts of the Gibbs Sampler, must be greater than 2

### VarianceRatioBurnInTest

    public VarianceRatioBurnInTest(int starts,
                                   double t)

  Creates a new `VarianceRatioBurnInTest` instance.

  Parameters:
    `starts` - the number of chains resulting from the number of starts of the Gibbs Sampler, must be greater than 2
    `t` - the threshold value for testing the end of the burn-in phase with the Variance-Ratio burn-in test, the value has to be greater than 1 since the tested potential scale reduction factor R converges to 1
  See Also:
    `computeLengthOfBurnIn()`

### VarianceRatioBurnInTest

    public VarianceRatioBurnInTest(StringBuffer rep)
                            throws NonParsableException

  The standard constructor for the `Storable` interface. Creates a new `VarianceRatioBurnInTest` instance out of a `StringBuffer`.

  Parameters:
    `rep` - the `StringBuffer`
  Throws:
    `NonParsableException` - if the `StringBuffer` can not be parsed

Method Detail

### getXMLTag

    protected String getXMLTag()

  Description copied from class: `AbstractBurnInTest`
  This method returns the XML tag that is used in `AbstractBurnInTest.toXML()` and `AbstractBurnInTest.AbstractBurnInTest(StringBuffer)`.

  Specified by:
    `getXMLTag` in class `AbstractBurnInTest`
  Returns:
    the XML tag that is used in `AbstractBurnInTest.toXML()` and `AbstractBurnInTest.AbstractBurnInTest(StringBuffer)`

### getFurtherInformation

    protected StringBuffer getFurtherInformation()

  Description copied from class: `AbstractBurnInTest`
  This method returns further information for the `AbstractBurnInTest`. It enables to store test specific data via the method `AbstractBurnInTest.toXML()`.
  This method should only be used in `AbstractBurnInTest.toXML()`.

  Specified by:
    `getFurtherInformation` in class `AbstractBurnInTest`
  Returns:
    further information in XML format

### setFurtherInformation

    protected void setFurtherInformation(StringBuffer xml)
                                  throws NonParsableException

  Description copied from class: `AbstractBurnInTest`
  This method sets further information for the `AbstractBurnInTest`. It enables to load test specific data in the constructor `AbstractBurnInTest.AbstractBurnInTest(StringBuffer)`.
  This method should only be used in `AbstractBurnInTest.AbstractBurnInTest(StringBuffer)`.

  Specified by:
    `setFurtherInformation` in class `AbstractBurnInTest`
  Parameters:
    `xml` - contains further information in XML format
  Throws:
    `NonParsableException` - if the `StringBuffer` could not be parsed

### getInstanceName

    public String getInstanceName()

  Description copied from class: `BurnInTest`
  Returns a short description of the burn-in test.

  Specified by:
    `getInstanceName` in class `BurnInTest`
  Returns:
    a short description of the burn-in test.

### computeLengthOfBurnIn

    protected int computeLengthOfBurnIn()

  Computes and returns the length of the burn-in phase given by the Variance-Ratio burn-in test. To get an effective test the number of Gibbs iterations should be greater than 250. Fewer iterations may lead to inaccuracy in the calculation of the different required variances.

  Specified by:
    `computeLengthOfBurnIn` in class `AbstractBurnInTest`
  Returns:
    the length of the burn-in phase
  See Also:
    `AbstractBurnInTest.computeLengthOfBurnIn()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD