mig: Mutual information test

Description Usage Arguments Value References Examples

Description

Mutual information test. See function mi-g in bnlearn package for more details.

Usage

1
mig(x, y, S, suffStat)

Arguments

x,y,S

It is tested, whether x and y are conditionally independent given the subset S of the remaining nodes. x, y, S all are integers, corresponding to variable or node numbers.

suffStat

The dataset in matrix format with rows are samples and columns are variables.

Value

The p-value of the test.

References

Marco Scutari (2010). Learning Bayesian Networks with the bnlearn R Package. Journal of Statistical Software, 35(3), 1-22.

Examples

1
2
3
4
5
6
7
8
##########################################
## Using mig
##########################################
library(bnlearn)
library(pcalg)
data("gmG")
suffStat<-gmG$x
mig(1,2,3,suffStat)

Example output

Attaching package: 'bnlearn'

The following object is masked from 'package:stats':

    sigma


Attaching package: 'pcalg'

The following objects are masked from 'package:bnlearn':

    dsep, pdag2dag, shd, skeleton

x= 1  y= 2  S= 3 pvalue= 1.321568e-88 
[1] 1.321568e-88

ParallelPC documentation built on May 2, 2019, 9:14 a.m.

Related to mig in ParallelPC...