Class SemEstimatorGibbs

java.lang.Object
edu.cmu.tetrad.sem.SemEstimatorGibbs

public final class SemEstimatorGibbs extends Object
Implements the Gibbs sampler apporach to obtain samples of arbitrary size from the posterior distribution over the freeParameters of a SEM given a continuous dataset and a SemPm. Point estimates, standard deviations and interval estimates for the freeParameters can be computed from these samples. See "Bayesian Estimation and Testing of Structural Equation Models" by Scheines, Hoijtink and Boomsma, Psychometrika, v. 64, no. 1.
Author:
Frank Wimberly
  • Constructor Details

    • SemEstimatorGibbs

      public SemEstimatorGibbs(SemPm semPm, SemIm startIm, double[][] sampleCovars, boolean flatPrior, double stretch, int numIterations)
      Parameters:
      semPm - a SemPm specifying the graph and parameterization for the model.
      startIm - SemIm
      sampleCovars - sample covariance matrix
      flatPrior - whether or not the prior is informative
      stretch - scaling for the variance
      numIterations - number of times to iterate sampler
    • SemEstimatorGibbs

      public SemEstimatorGibbs(int numIterations, double stretch1, double stretch2, double tolerance, double priorVariance, SemPm semPm, SemIm startIm, boolean flatPrior)
  • Method Details

    • estimate

      public void estimate()
      Runs the estimator on the data and SemPm passed in through the constructor.
    • getEstimatedSem

      public SemIm getEstimatedSem()
      Returns:
      SemIm
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      a string representation of the Sem.
    • getSemPm

      public SemPm getSemPm()
    • getDataSet

      public Matrix getDataSet()