autoFit | R Documentation |
Fit discrete data to the Markov structure implied by an acyclic directed mixed graph.
autoFit(
dat,
start = NULL,
criterion = "AIC",
quietly = FALSE,
r = TRUE,
search = "basic",
tol = 0.01
)
dat |
Either an object of class |
start |
Graph to start search procedure at; defaults to graph with no edges. |
criterion |
Criterion to minimize: either |
quietly |
Logical indicating whether to suppress output. |
r |
Logical indicating whether recursive factorizations should be used. |
search |
|
tol |
tolerance used to assess convergence in |
Given the current graph, the algorithm fits all graphs obtained by removing, adding or (in the case of the full search) replacing a single edge, and picks the graph which is optimal with respect to the chosen criterion (AIC or BIC). The algorithm terminates when no move results in an improvement.
The default starting graph has no edges.
An object of class mixed_fit
.
Note that this procedure is not guaranteed to find the best model fit for all ADMGs, but will find a 'local maximum' with respect to edge addition and removal.
Ilya Shpitser, Robin Evans
Evans and Richardson (2009) - Maximum likelihood fitting of acyclic directed mixed graphs to binary data.
fitADMG
.
data(gss.small)
## Not run: out = autoFit(gss.small)
## Not run: summary(out$graph)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.