Search in sources :

Example 1 with GaussianPower

use of edu.cmu.tetrad.util.dist.GaussianPower in project tetrad by cmu-phil.

the class Ling method makeDataSet.

private void makeDataSet(GraphWithParameters graphWP) {
    // define the "Gaussian-squared" distribution
    Distribution gp2 = new GaussianPower(2);
    // the coefficients of the error terms  (here, all 1s)
    TetradVector errorCoefficients = getErrorCoeffsIdentity(graphWP.getGraph().getNumNodes());
    // generate data from the SEM
    TetradMatrix inVectors = simulateCyclic(graphWP, errorCoefficients, numSamples, gp2);
    // reformat it
    dataSet = ColtDataSet.makeContinuousData(graphWP.getGraph().getNodes(), new TetradMatrix(inVectors.transpose().toArray()));
}
Also used : TetradVector(edu.cmu.tetrad.util.TetradVector) Distribution(edu.cmu.tetrad.util.dist.Distribution) GaussianPower(edu.cmu.tetrad.util.dist.GaussianPower) TetradMatrix(edu.cmu.tetrad.util.TetradMatrix)

Aggregations

TetradMatrix (edu.cmu.tetrad.util.TetradMatrix)1 TetradVector (edu.cmu.tetrad.util.TetradVector)1 Distribution (edu.cmu.tetrad.util.dist.Distribution)1 GaussianPower (edu.cmu.tetrad.util.dist.GaussianPower)1