Package edu.cmu.tetrad.search.utils
Class LgMnarDataSimulator
java.lang.Object
edu.cmu.tetrad.search.utils.LgMnarDataSimulator
The MNARDataSimulator class provides functionality to simulate Missing Not at Random (MNAR) data.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull DataSetgetMnarData(Graph graph, int numVariablesWithMissing, int numExtraInfluences, double threshold, int numRows) Generates a dataset with Missing Not At a Random (MNAR) data mechanism applied to specific variables in a graph.static voidThe entry point for the application.
-
Method Details
-
getMnarData
@NotNull public static @NotNull DataSet getMnarData(Graph graph, int numVariablesWithMissing, int numExtraInfluences, double threshold, int numRows) Generates a dataset with Missing Not At a Random (MNAR) data mechanism applied to specific variables in a graph. The method modifies the input graph to include missingness indicators and simulates data based on the modified graph. Certain data entries are set to missing based on their corresponding indicators.- Parameters:
graph- The input graph defining the relationships between variables.numVariablesWithMissing- The number of variables to have missing values.numExtraInfluences- The number of additional edges influencing missingness.threshold- The threshold value to determine missingness, used to produce binary indicators.numRows- The number of rows to simulate in the generated dataset.- Returns:
- A DataSet object with simulated data, including MNAR modification.
-
main
The entry point for the application. This method generates a random graph, applies a Missing Not At Random (MNAR) mechanism to introduce missing data into a dataset, and displays the dataset along with the associated graph.- Parameters:
args- Command-line arguments (not used for this program).
-