CI.test {gRapHD}R Documentation

Test of conditional independence.

Description

Test of conditional independence.

Usage

  CI.test(x,y,S,dataset,homog=TRUE)

Arguments

x one of the variables.
y the other variable.
S separator (possibly NULL).
dataset matrix or data frame (nrow(dataset) observations and ncol(dataset) variables).
homog TRUE for homogeneous covariance structure, FALSE for heterogeneous. This is only meaningful with mixed models. Default is homogeneous (TRUE).

Details

Performs a test of conditional independence of x and y given a set of variables S. The variables are specified as column numbers of the dataset. Under the alternative the variables are assumed to follow an unrestricted (mixed) graphical model. If x and y are discrete, S must also be discrete. Note that the model dimension returned by the fit function assumes that all parameters are estimable, which may not be the case for high-dimensional sparse data. However, here and in the search functions we use the adjusted degrees of freedom, which need no such assumptions and are believed to be correct.

Value

A list with the deviance (deviance) and the adjusted degrees of freedom (numP).

Author(s)

Gabriel Coelho Goncalves de Abreu (Gabriel.Abreu@agrsci.dk)
Rodrigo Labouriau (Rodrigo.Labouriau@agrsci.dk)
David Edwards (David.Edwards@agrsci.dk)

References

Lauritzen, S.L. (1996) Graphical Models, Oxford University Press.
Edwards, D. (2000) Introduction to Graphical Modelling, Springer-Verlag New York Inc.

Examples

  data(dsCont)
  m1 <- minForest(dsCont,homog=TRUE,forbEdges=NULL,stat="BIC")
  CI.test(20,29,c(9,11),dsCont)
#$deviance
#[1] 0.7617515263220724

#$numP
#[1] 1


[Package gRapHD version 0.1.0 Index]