fitCovGraph: Fitting of Gaussian covariance graph models

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

Description

Fits a Gaussian covariance graph model by maximum likelihood.

Usage

1
fitCovGraph(amat, S,n ,alg = "icf", dual.alg = 2, start.icf = NULL, tol = 1e-06)

Arguments

amat

A symmetric Booloean matrix with dimnames representing the adjacency matrix of an UG.

S

A symmetric positive definite matrix with dimnames, the sample covariance matrix.

n

A positive integer, the sample size.

alg

A character string, the algorithm used. If alg="icf" (the default) the algorithm is based on iterative conditional fitting (see Drton and Richardson, 2003). In this case the ML estimates are returned. If alg="dual" the algorithm is based on the dual likelihood (see Kauermann, 1996). The fitted values are an approximation of the ML estimates.

dual.alg

And integer equal to 1 or 2. It is used if alg="dual". In this case a concentration graph model is fitted to the inverse of the sample covariance matrix, and dual.alg is passed to fitConGraph to specify the algorithm used in fitConGraph.

start.icf

A symmetric matrix used as starting value of the algorithm. If start=NULL the starting value is a diagonal matrix with diagonal entries equal to sample variances.

tol

A small positive number indicating the tolerance used in convergence tests.

Details

A covariance graph is an undirected graph in which the variables associated to two non-adjacent nodes are marginally independent. The edges of these models are represented by bi-directed edges (Drton and Richardson, 2003) or by dashed lines (Cox and Wermuth, 1996).

By default, this function gives the ML estimates in the covariance graph model, by iterative conditional fitting (Drton and Richardson, 2003). Otherwise, the estimates from a “dual likelihood” estimator can be obtained (Kauermann, 1996; Edwards, 2000, section 7.4).

Value

Shat

the fitted covariance matrix.

dev

the ‘deviance’ of the model.

df

the degrees of freedom.

it

the iterations.

Author(s)

Mathias Drton

References

Cox, D. R. and Wermuth, N. (1996). Multivariate dependencies. London: Chapman \& Hall.

Drton, M. and Richardson, T. S. (2003). A new algorithm for maximum likelihood estimation in Gaussian graphical models for marginal independence. Proceedings of the Nineteenth Conference on Uncertainty in Artificial Intelligence, 184–191.

Kauermann, G. (1996). On a dualization of graphical Gaussian models. Scandinavian Journal of Statistics. 23, 105–116.

See Also

fitConGraph, icf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Correlations among four strategies to cope with stress for 
## 72 students. Cox & Wermuth (1996), p. 73.

data(stress)

## A chordless 4-cycle covariance graph
G <- UG(~ Y*X + X*U + U*V + V*Y)

fitCovGraph(G, S = stress, n=72)
fitCovGraph(G, S = stress, n=72, alg="dual")

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

$Shat
           Y          V          X          U
Y  0.9995028 -0.2038079  0.4610985  0.0000000
V -0.2038079  1.0020514  0.0000000  0.4717660
X  0.4610985  0.0000000  1.0015117 -0.1536671
U  0.0000000  0.4717660 -0.1536671  0.9996165

$dev
[1] 0.007675671

$df
[1] 2

$it
[1] 7

$Shat
           Y          V          X          U
Y  0.9994039 -0.2037920  0.4610611  0.0000000
V -0.2037920  1.0020263  0.0000000  0.4717259
X  0.4610611  0.0000000  1.0014904 -0.1536580
U  0.0000000  0.4717259 -0.1536580  0.9995170

$dev
[1] 0.007676413

$df
[1] 2

$it
[1] 4

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

Related to fitCovGraph in ggm...