Package edu.cmu.tetrad.sem
Class SemPm
java.lang.Object
edu.cmu.tetrad.sem.SemPm
- All Implemented Interfaces:
- Pm,- TetradSerializable,- Serializable
Parametric model for Structural Equation Models.
 
Note: Could not get a copy constructor to work properly, so to copy SemPm objects, use object serialization--e.g. java.rmu.MarshalledObject.
- Version:
- $Id: $Id
- Author:
- Donald Crimbchin, josephramsey
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidfixLatentErrorVariances.voidfixOneLoadingPerLatent.getCoefficientParameter(Node nodeA, Node nodeB) getCoefficientParameter.getCovarianceParameter(Node nodeA, Node nodeB) getCovarianceParameter.intgetDof()getDof.getFreeParameters.getGraph()Getter for the fieldgraph.getLatentNodes.getMeanParameter(Node node) getMeanParameter.getMeasuredNodes.String[]getMeasuredVarNames.getParamComparison.getParameter(Node nodeA, Node nodeB) getParameter.getParameter(String name) getParameter.Getter for the fieldparameters.Getter for the fieldvariableNodes.getVarianceParameter(Node node) Return the parameter for the variance of the error term for the given node, which is the variance of the node if the node is an error term, and the variance of the node's error term if not.static SemPmGenerates a simple exemplar of this class to test serialization.voidsetParamComparison(Parameter a, Parameter b, ParamComparison comparison) Sets the comparison of parameter a to parameter b.toString()toString.
- 
Constructor Details- 
SemPmConstructs a BayesPm from the given Graph, which must be convertible first into a ProtoSemGraph and then into a SemGraph.- Parameters:
- graph- a- Graphobject
 
- 
SemPmConstructs a new SemPm from the given SemGraph.- Parameters:
- graph- a- SemGraphobject
 
- 
SemPmCopy constructor.- Parameters:
- semPm- a- SemPmobject
 
 
- 
- 
Method Details- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.- Returns:
- a SemPmobject
 
- 
fixLatentErrorVariancespublic void fixLatentErrorVariances()fixLatentErrorVariances. 
- 
fixOneLoadingPerLatentpublic void fixOneLoadingPerLatent()fixOneLoadingPerLatent. 
- 
getGraphGetter for the field graph.- Returns:
- the structural model graph this SEM PM is using.
 
- 
getParametersGetter for the field parameters.- Returns:
- a list of all the freeParameters, including variance, covariance, coefficient, and mean freeParameters.
 
- 
getVariableNodesGetter for the field variableNodes.- Returns:
- the list of variable nodes--that is, node that are not error nodes.
 
- 
getMeasuredNodesgetMeasuredNodes. - Returns:
- the list of measured variableNodes.
 
- 
getLatentNodesgetLatentNodes. - Returns:
- the list of latent variableNodes.
 
- 
getParametergetParameter. - Parameters:
- name- a- Stringobject
- Returns:
- the first parameter encountered with the given name, or null if there is no such parameter.
 
- 
getParametergetParameter. 
- 
getVarianceParameterReturn the parameter for the variance of the error term for the given node, which is the variance of the node if the node is an error term, and the variance of the node's error term if not.
- 
getCovarianceParametergetCovarianceParameter. 
- 
getCoefficientParametergetCoefficientParameter. 
- 
getMeanParametergetMeanParameter. 
- 
getMeasuredVarNamesgetMeasuredVarNames. - Returns:
- the list of measured variable names in the order in which they appear in the list of nodes. (This order is fixed.)
 
- 
getParamComparisongetParamComparison. 
- 
setParamComparisonSets the comparison of parameter a to parameter b.- Parameters:
- a- a- Parameterobject
- b- a- Parameterobject
- comparison- a- ParamComparisonobject
 
- 
getFreeParametersgetFreeParameters. - Returns:
- a Listobject
 
- 
getDofpublic int getDof()getDof. - Returns:
- the degrees of freedom for the model.
 
- 
toStringtoString. 
 
-