networkAnalysis: Estimate network structures

Usage Arguments Value Author(s) Examples

Usage

1
networkAnalysis(x, methods = c("cor", "pcor", "alpcor", "plspcor", "pc", "pcskel", "BDbest", "BDpost", "BDavg", "bn.gs", "bnboot.gs", "bn.iamb", "bnboot.iamb", "bn.hc", "bnboot.hc", "bn.tabu", "bnboot.tabu", "bn.mmhc", "bnboot.mmhc", "bn.rsmax2", "bnboot.rsmax2", "bn.mmpc", "bnboot.mmpc", "bn.si.hiton.pc", "bnboot.si.hiton.pc", "bn.chow.liu", "bnboot.chow.liu", "bn.aracne", "bnboot.aracne", "IsingFit"), scale, nonparanormal = FALSE, ask = FALSE, titles = TRUE, citations = TRUE, layout = "spring", layoutToFirst = TRUE, pcAlpha = 0.05, BDargs = list(), bnlearnArgs = list(), bnbootArgs = list(R = 200), parallelEdge = TRUE, labels = TRUE, verbose = TRUE, pcNoDicho = FALSE, adaptDF = TRUE, graphArgs = list(), IsingFitArgs = list(), ...)

Arguments

x

A dataset with rows indicating measures and columns indicating variables. All variables must be of the same scale: dichotomous, ordinal or continous.

methods

A vector of strings indicating which networks to estimate. The function will estimate all graphs and plot them after each other (e.g., so that pdf() will create a page for each plot) with layout based on the first graph (rearainging the order of this argument causes the layout to be based on a different graph). Currently supported are: "cor", "pcor", "alpcor", "plspcor", "IsingFit", "pc", "pcskel", "BDbest", "BDpost", "BDavg", "bn.gs", "bnboot.gs", "bn.iamb", "bnboot.iamb", "bn.hc", "bnboot.hc", "bn.tabu", "bnboot.tabu", "bn.mmhc", "bnboot.mmhc", "bn.rsmax2", "bnboot.rsmax2", "bn.mmpc", "bnboot.mmpc", "bn.si.hiton.pc", "bnboot.si.hiton.pc", "bn.chow.liu", "bnboot.chow.liu", "bn.aracne" and "bnboot.aracne"

scale

"dichotomous", "ordinal" or "continuous". Is otherwise detected.

nonparanormal

Should the nonparanormal transfromation from huge.npn be used on the data?

ask

Logical indicating if R should ask to go to the next plot.

titles

Logical indicating if titles should be added.

citations

Logical indicating if citations should be added.

layout

Layout to be used in all graphs

layoutToFirst

Equate layout to the layout of the first plot?

pcAlpha

Alpha used in pcalg functions

BDargs

List of arguments used in bdgraph

bnlearnArgs

List of arguments used in bn

bnbootArgs

List of arguments used in bn.boot

parallelEdge

Same as in qgraph

labels

Same as in qgraph

verbose

Should messages be printed to the console indicating what is happening?

pcNoDicho

Logical. If TRUE pcalg for dichotomous data will be run on tetrachoric correlations and not the discrete version. Seems to have more power.

adaptDF

Argument used in pcalg

graphArgs

Named list with qgraph args that can be used to specify specific arguments. E.g., list(alpcor = list(fade = FALSE))

IsingFitArgs

Arguments used in IsingFit

...

Arguments sent to qgraph

Value

A named list with for each estimated graph:

graph

The weights matrix of the graph

output

Output of the method

qgraph

The qgraph object

method

A string indicating the method used

Author(s)

Sacha Epskamp <mail@sachaepskamp.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Load smoking dataset:
data(smoking)

# Estimate three networks:
Res <- networkAnalysis(smoking, methods = c( "pc", "IsingFit" , "bn.gs"), ask = FALSE)

# Centrality measures:
centralityPlot(Res)

# Clustering:
centralityPlot(Res)

SachaEpskamp/psynet documentation built on May 9, 2019, 12:09 p.m.