This function is a modification of pcalg::pc()
to be used for multiple imputation.
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
)
See pcalg::pc()
for more details.
An object of type mids, which stands for 'multiply imputed data set', typically created by a call to function mice()
Significance level (number in (0,1) for the conditional independence tests
(Optional) character vector of variable (or "node") names. Typically preferred to specifying p.
(Optional) number of variables (or nodes). May be specified if labels are not, in which case labels is set to 1:p.
A logical matrix of dimension p*p. If entry [i,j]
or [j,i]
(or both) are TRUE, the edge i-j is removed before starting
the algorithm. Therefore, this edge is guaranteed to be
absent in the resulting graph.
A logical matrix of dimension p*p. If entry [i,j]
or [j,i]
(or both) are TRUE, the edge i-j is never considered for
removal. Therefore, this edge is guaranteed to be present
in the resulting graph
If indepTest returns NA and this option is TRUE, the corresponding edge is deleted. If this option is FALSE, the edge is not deleted.
Maximal size of the conditioning sets that are considered in the conditional independence tests.
String specifying the method for dealing with conflicting information when trying to orient edges (see details below).
Character string specifying method; the default, "stable"
provides an order-independent skeleton, see
pcalg::skeleton()
for details.
Logical indicating if the conservative PC is used. See
pcalg::pc()
for details.
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
pcalg::pc()
.
See pcalg::pc()
for more details.
If TRUE, detailed output is provided.
Original code by Markus Kalisch, Martin Maechler, and Diego Colombo. Modifications by Ronja Foraita.
An object of class "pcAlgo" (see pcAlgo) containing an estimate of the equivalence class of the underlying DAG.
daten <- mice::ampute(windspeed)$amp
## Impute missing values
imp <- mice(daten)
pcMI(data = imp, label = colnames(imp$data), alpha = 0.01)
Run the code above in your browser using DataLab