TPC (tpc)
Module name |
|
Package |
|
Version |
137e18b |
Language |
|
Docs |
|
Paper |
Andrews et al.[1] |
Graph type |
|
MCMC |
No |
Edge constraints |
|
Data type |
C, D, M |
Data missingness |
|
Intervention type |
|
Docker |
Temporal PC
This package implements the tPC algorithm for causal discovery. The ‘t’ stands for ‘temporal’ or ‘tiers’ and indicates that background knowledge in the form of a partial node/variable ordering is available. The implementation is a modified version of pc from the pcalg package (Kalisch et al. 2012) with more Edge constraints supported and the ability to handle missing values. It supports continuous, discrete and mixed data. Two options for handling missing values are available: 1) gaussCItwd, disCItwd and mixCItwd perform test-wise deletion, where missing observations are deleted as necessary on a test-by-test basis; 2) gaussMItest, disMItest and mixMItest perform conditional independence tests on MICE (mice) imputed data.
Example
Config file: bips_tpc.json
Command:
snakemake --cores all --use-singularity --configfile workflow/rules/structure_learning_algorithms/bips_tpc/bips_tpc.json
Fig. 52 and Fig. 53 show FP/P vs. TP/P for pattern graphs and skeletons based on 3 datsets corresponding to 3 realisations of a 20-variables random Gaussian SEM, with an average indegree of 4. Each dataset contains 10000 samples and has values that are missing not at random (MNAR), sampled using mvpc_gen_data.
Fig. 52 FP/P vs. TP/P. for pattern graphs
Fig. 53 FP/P vs. TP/P. for skeletons
Some fields described
edgeConstraintsName of the JSON file containing Edge constraintsindepTestflexCItwd, flexMItest, gaussCItest, binCItest, disCItest, gaussCItwd, disCItwd, mixCItwd, gaussMItest, mixMItest, disMItestinput_algorithm_idWhen using multiple imputation (MI) i.e. when indepTest is set to gaussMItest, mixMItest, or disMItest, this should be and id of the mice module. It is a workaround to get imputed data.
Example JSON
[
{
"id": "tpc",
"alpha": [
0.001,
0.01,
0.05,
0.1
],
"mmax": "Inf",
"conservative": false,
"majrule": true,
"numCores": 1,
"cl_type": "PSOCK",
"verbose": false,
"indepTest": "gaussCItwd",
"input_algorithm_id": null,
"timeout": null,
"edgeConstraints": null
}
]