fitUG: Fit data to an undirected graphical model

View source: R/fitADMG.R

fitUGR Documentation

Fit data to an undirected graphical model

Description

Fit discrete data to the Markov structure implied by an undirected graph.

Usage

fitUG(dat, graph, tol = sqrt(.Machine$double.eps), SEs = TRUE, quietly = TRUE)

Arguments

dat

The data, as an array of counts or a data frame whose final column contains the counts.

graph

An ADMG, as an object of class graph.

tol

Numeric; if log-likelihood increases by less that tol in one step, procedure stops.

SEs

logical: should standard errors be calculated?

quietly

Logical indicating whether output should be suppressed.

Value

An object of class u_fit. This is a list containing (amongst other things):

ll

Value of the log-likelihood at the maximum.

Warning

For the algorithm to be guaranteed to work correctly, all counts for marginal tables consisting of cliques and their parents should be positive. A warning will be produced if this is not so.

Author(s)

Robin Evans

References

Lauritzen (1996), Graphical Models, OUP.


rje42/ADMGs2 documentation built on Sept. 3, 2024, 7:39 p.m.