fitADMG | R Documentation |
Fit discrete data to the Markov structure implied by an acyclic directed mixed graph or summary graph.
fitADMG(
dat,
graph,
r = TRUE,
tol = sqrt(.Machine$double.eps),
SEs = TRUE,
sparse = FALSE,
quietly = TRUE,
use_optim = TRUE
)
dat |
The data, as an array of counts or a data frame whose final column contains the counts. |
graph |
An ADMG (or summary graph), as an object of class |
r |
Logical indicating whether or not recursive factorizations should be used. |
tol |
Numeric; if log-likelihood increases by less that |
SEs |
logical: should standard errors be calculated? |
sparse |
Should sparse matrices be used? Requires package
|
quietly |
Logical indicating whether output should be suppressed. |
use_optim |
should |
Fits data using coordinate-wise block descent algorithm, with an Armijo line search. Details in Evans and Richardson (2010).
Recursive factorizations allow for modelling of Verma-constraints. See Richardson et al (2012).
An object of class mixed_fit
. This is a list containing
(amongst other things):
params |
An object of class |
ll |
Value of the log-likelihood at the maximum. |
For the algorithm to be guaranteed to work correctly, all counts for marginal tables consisting of districts and their parents should be positive. A warning will be produced if this is not so.
Robin Evans, Ilya Shpitser
Evans, R.J. and Richardson, T.S. (2010) - Fitting acyclic directed mixed graphs to binary data. UAI-10.
Richardson, T.S., Robins, J.M., Shpitser, I., Evans, R.J. (2012) -
summary.mixed_fit
autoFit
data(gss_small)
data(gr1, package="MixedGraphs")
out = fitADMG(gss_small, gr1)
summary(out)
# not a good fit!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.