Join us for
RADAR: AI Edition

dlsem (version 2.4.6)

isIndep: Conditional independence check

Description

Conditional independence between two variables is checked using the d-separation criterion (Pearl, 2000, page 16 and following).

Usage

isIndep(x, var1 = NULL, var2 = NULL, given = NULL, conf = 0.95, use.ns = FALSE)

Arguments

x

An object of class dlsem.

var1

The name of the first variable.

var2

The name of the second variable.

given

A vector containing the names of conditioning variables. If NULL, marginal independence is checked.

conf

The confidence level for each edge: only edges with statistically significant causal effect at such confidence are considered. Default is 0.95.

use.ns

A logical value indicating whether edges without statistically significant causal effect (at level conf) should be considered or not. If FALSE (the default), they will be ignored.

Value

Logical

References

J. Pearl (2000). Causality: Models, Reasoning, and Inference. Cambridge University Press. Cambridge, UK. ISBN: 978-0-521-89560-6

See Also

dlsem.

Examples

Run this code
# NOT RUN {
data(industry)
indus.code <- list(
  Consum~ecq(Job,0,5),
  Pollution~ecq(Job,1,8)+ecq(Consum,1,7)
  )
indus.mod <- dlsem(indus.code,group="Region",exogenous=c("Population","GDP"),data=industry,
  log=TRUE)
isIndep(indus.mod,"Job","Pollution",given=c("Consum"))
# }

Run the code above in your browser using DataLab