shipley.test: Test of all independencies implied by a given DAG

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Computes a simultaneous test of all independence relationships implied by a given Gaussian model defined according to a directed acyclic graph, based on the sample covariance matrix.

Usage

1
shipley.test(amat, S, n)

Arguments

amat

a square Boolean matrix, of the same dimension as S, representing the adjacency matrix of a DAG.

S

a symmetric positive definite matrix, the sample covariance matrix.

n

a positive integer, the sample size.

Details

The test statistic is C = -2 ∑ \ln p_j where p_j are the p-values of tests of conditional independence in the basis set computed by basiSet(A). The p-values are independent uniform variables on (0,1) and the statistic has exactly a chi square distribution on 2k degrees of freedom where k is the number of elements of the basis set. Shipley (2002) calls this test Fisher's C test.

Value

ctest

Test statistic C.

df

Degrees of freedom.

pvalue

The P-value of the test, assuming a two-sided alternative.

Author(s)

Giovanni M. Marchetti

References

Shipley, B. (2000). A new inferential test for path models based on directed acyclic graphs. Structural Equation Modeling, 7(2), 206–218.

See Also

basiSet, pcor.test

Examples

1
2
3
4
5
## A decomposable model for the mathematics marks data
data(marks)
dag <- DAG(mechanics ~ vectors+algebra, vectors ~ algebra, 
statistics ~ algebra+analysis, analysis ~ algebra)
shipley.test(dag, cov(marks), n=88)

Example output

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union


Attaching package: 'ggm'

The following object is masked from 'package:igraph':

    pa

$ctest
[1] 2.850461

$df
[1] 8

$pvalue
[1] 0.9433884

ggm documentation built on March 26, 2020, 7:49 p.m.

Related to shipley.test in ggm...