Package edu.cmu.tetrad.sem
Class DagScorer
java.lang.Object
edu.cmu.tetrad.sem.DagScorer
- All Implemented Interfaces:
- Scorer,- TetradSerializable,- Serializable
Estimates a SemIm given a CovarianceMatrix and a SemPm. (A DataSet may be substituted for the CovarianceMatrix.) Uses
 regression to do the estimation, so this is only for DAG models. But the DAG model may be reset on the fly and the
 estimation redone. Variables whose parents have not changed will not be reestimated. Intended to speed up estimation
 for algorithm that require repeated estimation of DAG models over the same variables. Assumes all variables are
 measured.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a new SemEstimator that uses the specified optimizer.DagScorer(ICovarianceMatrix covMatrix) Constructs a new SemEstimator that uses the specified optimizer.
- 
Method SummaryModifier and TypeMethodDescriptiondoublegetBicScore.doublegetChiSquare.Getter for the fieldcovMatrix.Getter for the fielddataSet.intgetDof()getDof.Getter for the fieldedgeCoef.Getter for the fielderrorCovar.getEstSem.doublegetFml()The value of the maximum likelihood function for the getModel the model (Bollen 107).getMeasuredNodes.intgetNumFreeParams.doublegetPValue.Getter for the fieldsampleCovar.intgetSampleSize.Getter for the fieldvariables.doubleScores the given DAG using the implemented algorithm.static ScorerGenerates a simple exemplar of this class to test serialization.toString()toString.
- 
Constructor Details- 
DagScorerConstructs a new SemEstimator that uses the specified optimizer.- Parameters:
- dataSet- a DataSet, all of whose variables are contained in the given SemPm. (They are identified by name.)
 
- 
DagScorerConstructs a new SemEstimator that uses the specified optimizer.- Parameters:
- covMatrix- a covariance matrix, all of whose variables are contained in the given SemPm. (They are identified by name.)
 
 
- 
- 
Method Details- 
serializableInstance
- 
score
- 
getCovMatrixGetter for the field covMatrix.- Specified by:
- getCovMatrixin interface- Scorer
- Returns:
- a ICovarianceMatrixobject
 
- 
toString
- 
getFml
- 
getBicScorepublic double getBicScore()getBicScore. - Specified by:
- getBicScorein interface- Scorer
- Returns:
- BIC score, calculated as chisq - dof. This is equal to getFullBicScore() up to a constant.
 
- 
getChiSquarepublic double getChiSquare()getChiSquare. - Specified by:
- getChiSquarein interface- Scorer
- Returns:
- the chi square value for the model.
 
- 
getPValue
- 
getDataSetGetter for the field dataSet.- Specified by:
- getDataSetin interface- Scorer
- Returns:
- a DataSetobject
 
- 
getNumFreeParamspublic int getNumFreeParams()getNumFreeParams. - Specified by:
- getNumFreeParamsin interface- Scorer
- Returns:
- a int
 
- 
getDof
- 
getSampleSizepublic int getSampleSize()getSampleSize. - Specified by:
- getSampleSizein interface- Scorer
- Returns:
- a int
 
- 
getMeasuredNodesgetMeasuredNodes. - Specified by:
- getMeasuredNodesin interface- Scorer
- Returns:
- a Listobject
 
- 
getSampleCovarGetter for the field sampleCovar.- Specified by:
- getSampleCovarin interface- Scorer
- Returns:
- a Matrixobject
 
- 
getEdgeCoefGetter for the field edgeCoef.- Specified by:
- getEdgeCoefin interface- Scorer
- Returns:
- a Matrixobject
 
- 
getErrorCovarGetter for the field errorCovar.- Specified by:
- getErrorCovarin interface- Scorer
- Returns:
- a Matrixobject
 
- 
getVariablesGetter for the field variables.- Specified by:
- getVariablesin interface- Scorer
- Returns:
- a Listobject
 
- 
getEstSem
 
-