isIndep {dlsem}R Documentation

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

Note

Conditional independence is checked statically, that is the whole history of conditioning variables is supposed to be known.

The result is unchanged if arguments var1 and var2 are switched.

Dependence is a necessary but not sufficient condition for causation: see the discussion in Pearl (2000).

References

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

See Also

dlsem.

Examples

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"))

[Package dlsem version 2.4.6 Index]