pcMI | R Documentation |
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 )
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. |
An object of class "pcAlgo" (see pcAlgo) containing an estimate of the equivalence class of the underlying DAG.
See pcalg::pc()
for more details.
This is a modified function of pcalg::pc()
from the package 'pcalg' (Kalisch et al., 2012;
http://www.jstatsoft.org/v47/i11/).
Original code by Markus Kalisch, Martin Maechler, and Diego Colombo. Modifications by Ronja Foraita.
daten <- mice::ampute(windspeed)$amp ## Impute missing values imp <- mice(daten) pcMI(data = imp, label = colnames(imp$data), alpha = 0.01)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.