Class SemStartValues

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

public final class SemStartValues extends Object
Random starting values for a SEM's free parameters that respect the scale of the sample covariance. The optimizers used to draw every start from a fixed box -- Powell variances on (0, 1) and coefficients on (-1, 1), EM variances on (0, 3) and coefficients on (-2, 2) -- which is fine for simulated data with unit variances and hopeless for a grade file whose variances run from 370 to 1700: the discrepancy at such a start was 10,000 on the chemistry data, the EM optimizer returned after one step, and the SEM estimator handed back what were essentially its starting values, with implied variances of 2 to 5 against sample variances in the hundreds, and nothing said so. Powell from the same kind of start found a poor local optimum.

Here a measured variable's error variance starts at a random fraction, between 0.3 and 0.8, of its sample variance; a loading from a latent to a measured variable starts at the positive square root of a random fraction of the sample variance, so that loadings of one factor agree in sign; a latent's variance starts near 1; a coefficient between two measured variables, or between two latents, starts small and scale-free, a random value on (-0.5, 0.5) times the ratio of the standard deviations; and an error covariance starts at zero. With this start, Powell on the chemistry model reaches a fit that reproduces every variance in two seconds.

Author:
josephramsey
  • Method Details

    • draw

      public static double[] draw(SemIm semIm, List<Parameter> freeParameters)
      Draws scale-aware random starting values for the given free parameters.
      Parameters:
      semIm - the model, carrying the sample covariance (if it carries none, the fixed-box draws of the past are used, since there is no scale to respect).
      freeParameters - the free parameters, in the order the values are to be returned.
      Returns:
      one value per parameter.