pc_rank_search: PC (rank) search

View source: R/causal_inference_helpers.R

pc_rank_searchR Documentation

PC (rank) search

Description

Runs PC (rank) algorithm given a dataset dat.

Usage

pc_rank_search(dat, alpha = 0.05)

Arguments

dat

Numeric matrix. Dataset matrix with n rows (observations) and p columns (variables).

alpha

Numeric — between 0 and 1. The significance level for the individual conditional independence tests. By default it is set to 0.05.

Details

The PC (rank) algorithm has been proposed by Harris, N., and Drton, M., http://jmlr.csail.mit.edu/papers/volume14/harris13a/harris13a.pdf

The function pcalg:pc() is called with the following arguments:

  • suffStat = list(C = 2 * sin(cor(dat, method = "spearman") * pi/6), n = nrow(dat)),

  • indepTest = gaussCItest,

  • u2pd = "retry" — this ensures that the produced CPDAG is extendible to a DAG,

  • skel.method = "stable".

Value

Square binary matrix (or NA in case of error). The CPDAG estimated from the data.


nicolagnecco/causalXtreme documentation built on July 19, 2023, 3:06 a.m.