Description Usage Arguments Details Value Author(s) See Also Examples
Specification of log–linear (graphical) model. The 'd' in the name
dmod
refers to that it is a (graphical) model for 'd'iscrete
variables
1 2 |
formula |
Model specification in one of the following forms: 1) a right-hand sided formula, 2) as a list of generators, 3) an undirected graph (represented either as a graphNEL object or as an adjacency matrix). Notice that there are certain model specification shortcuts, see Section 'details' below. |
data |
Either a table or a dataframe. In the latter case, the dataframe will be coerced to a table. See 'details' below. |
marginal |
Should only a subset of the variables be used in connection with the model specification shortcuts |
interactions |
A number given the highest order interactions in the model, see Section 'details' below. |
fit |
Should the model be fitted. |
details |
Control the amount of output; for debugging purposes. |
... |
Additional arguments; currently no used. |
The independence model can be specified as ~.^1
and the
saturated model as ~.^.
. Setting e.g. interactions=3
implies that there will be at most three factor interactions in the
model.
Data can be specified as a table of counts or as a dataframe. If data is a
dataframe then it will be converted to a table (using xtabs()
). This
means that if the dataframe contains numeric values then the you can get a
very sparse and high dimensional table. When a dataframe contains numeric
values it may be worthwhile to discretize data using the cut()
function.
The marginal
argument can be used for specifying the independence or
saturated models for only a subset of the variables. When marginal
is
given the corresponding marginal table of data is formed and used in the
analysis (notice that this is different from the behaviour of
loglin()
which uses the full table.
The triangulate()
method for discrete models (dModel objects) will
for a model look at the dependence graph for the model.
An object of class dModel
.
Søren Højsgaard, sorenh@math.aau.dk
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.