Learn R Programming

ParallelPC (version 1.2)

smczf: The sequential Monte Carlo permutation test for Gaussian conditional independence test.

Description

The sequential Monte Carlo permutation test for Gaussian conditional independence test. See the smc-zf function in the bnlearn package for more details.

Usage

smczf(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 data matrix 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

Run this code
##########################################
## Using smczf
##########################################
library(bnlearn)
library(pcalg)
data("gmG")
suffStat<-gmG$x
smczf(1,2,3,suffStat)

Run the code above in your browser using DataLab