Learn R Programming

dlsem (version 1.3.2)

isIndep: Check conditional independence

Description

Check conditional independence between two variables using the d-separation criterion (Pearl, 2000).

Usage

isIndep(x, var1, var2, given = NULL, conf = 0.95)

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 edges in the object of class dlsem. Default is 0.95.

Value

References

J. Pearl (2000). Causality: Models, Reasoning, and Inference. Cambridge University Press. Cambridge, UK.

See Also

dlsem

Examples

Run this code
data(agres)
mycode <- list(
  GVA~quec(NPATENT,1,15),
  PPI~quec(NPATENT,0,13)+quec(GVA,0,14),
  ENTR_INCOME~quec(NPATENT,0,14)+quec(GVA,1,14)
  )
myfit <- dlsem(mycode,group="COUNTRY",exogenous=c("GDP","FARM_SIZE"),
  data=agres,uniroot.check=TRUE,imputation=FALSE,log=TRUE)
isIndep(myfit,"NPATENT","ENTR_INCOME",given=c("GVA","PPI"))

Run the code above in your browser using DataLab