TPC (tpc)

Module name

bips_tpc

Package

tpc

Version

137e18b

Language

R

Docs

here

Paper

Andrews et al.[1]

Graph type

CPDAG, MPDAG, TMPDAG

MCMC

No

Edge constraints

Yes

Data type

C, D, M

Data missingness

MAR, MNAR, MCAR

Intervention type

Docker

bpimages/bips_tpc:137e18be

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.

FP/P vs. TP/P tPC example

Fig. 52 FP/P vs. TP/P. for pattern graphs

FP/P vs. TP/P tPC example

Fig. 53 FP/P vs. TP/P. for skeletons

Some fields described

  • edgeConstraints Name of the JSON file containing Edge constraints

  • indepTest flexCItwd, flexMItest, gaussCItest, binCItest, disCItest, gaussCItwd, disCItwd, mixCItwd, gaussMItest, mixMItest, disMItest

  • input_algorithm_id When 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
  }
]