skeletonMI {micd}R Documentation

Estimate (Initial) Skeleton of a DAG using the PC Algorithm for Multiple Imputed Data Sets of Continuous Data

Description

This function is a modification of pcalg::skeleton() to be used for multiple imputation.

Usage

skeletonMI(
  data,
  alpha,
  labels,
  p,
  method = c("stable", "original"),
  m.max = Inf,
  fixedGaps = NULL,
  fixedEdges = NULL,
  NAdelete = TRUE,
  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

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.

method

Character string specifying method; the default, "stable" provides an order-independent skeleton, see pcalg::pc() for details.

m.max

Maximal size of the conditioning sets that are considered in the conditional independence tests.

fixedGaps

Logical symmetric matrix of dimension p*p. If entry [i,j] is true, the edge i-j is removed before starting the algorithm. Therefore, this edge is guaranteed to be absent in the resulting graph.

fixedEdges

A logical symmetric matrix of dimension p*p. If entry [i,j] is true, the edge i-j is never considered for removal. Therefore, this edge is guaranteed to be present in the resulting graph.

NAdelete

Logical needed for the case indepTest(*) returns NA. If it is true, the corresponding edge is deleted, otherwise not.

verbose

If TRUE, detailed output is provided.

Value

See pcalg::skeleton() for more details.

Note

This is a modified function of pcalg::skeleton() from the package 'pcalg' (Kalisch et al., 2012; http://www.jstatsoft.org/v47/i11/).

Author(s)

Original code by Markus Kalisch, Martin Maechler, Alain Hauser, and Diego Colombo. Modifications by Ronja Foraita.

Examples


data(gmG)
n <- nrow(gmG8$x)
V <- colnames(gmG8$x) # labels aka node names
## estimate Skeleton
data_mids <- mice(gmG8$x, printFlag = FALSE)
(skel.fit <- skeletonMI(data = data_mids, alpha = 0.01, labels = V, verbose = FALSE))

[Package micd version 1.1.1 Index]