pcMI {micd} | R Documentation |
Estimate the Equivalence Class of a DAG Using the PC-MI Algorithm for Multiple Imputed Data Sets
Description
This function is a modification of pcalg::pc()
to be used for multiple imputation.
Usage
pcMI(
data,
alpha,
labels,
p,
fixedGaps = NULL,
fixedEdges = NULL,
NAdelete = TRUE,
m.max = Inf,
u2pd = c("relaxed", "rand", "retry"),
skel.method = c("stable", "original"),
conservative = FALSE,
maj.rule = FALSE,
solve.confl = FALSE,
verbose = FALSE
)
Arguments
data |
An object of type mids, which stands for 'multiply imputed data set', typically created by a call to function mice() |
alpha |
Significance level (number in (0,1) for the conditional independence tests |
labels |
(Optional) character vector of variable (or "node") names. Typically preferred to specifying p. |
p |
(Optional) number of variables (or nodes). May be specified if labels are not, in which case labels is set to 1:p. |
fixedGaps |
A logical matrix of dimension p*p. If entry |
fixedEdges |
A logical matrix of dimension p*p. If entry |
NAdelete |
If indepTest returns NA and this option is TRUE, the corresponding edge is deleted. If this option is FALSE, the edge is not deleted. |
m.max |
Maximal size of the conditioning sets that are considered in the conditional independence tests. |
u2pd |
String specifying the method for dealing with conflicting information when trying to orient edges (see details below). |
skel.method |
Character string specifying method; the default, "stable"
provides an order-independent skeleton, see
|
conservative |
Logical indicating if the conservative PC is used. See
|
maj.rule |
Logical indicating that the triples shall be checked for
ambiguity using a majority rule idea, which is less strict
than the conservative PC algorithm. For more information, see
|
solve.confl |
See |
verbose |
If TRUE, detailed output is provided. |
Details
An object of class "pcAlgo" (see pcAlgo) containing an estimate of the equivalence class of the underlying DAG.
Value
See pcalg::pc()
for more details.
Note
This is a modified function of pcalg::pc()
from the package 'pcalg' (Kalisch et al., 2012;
http://www.jstatsoft.org/v47/i11/).
Author(s)
Original code by Markus Kalisch, Martin Maechler, and Diego Colombo. Modifications by Ronja Foraita.
Examples
daten <- mice::ampute(windspeed)$amp
## Impute missing values
imp <- mice(daten)
pcMI(data = imp, label = colnames(imp$data), alpha = 0.01)