sparse_or_dense {easybgm}R Documentation

Test for sparse against dense topologies

Description

The function tests if a network is sparse (i.e., few edges in between nodes) or dense (i.e., a lot of edges between nodes). It estimates the network model of a given data set under the hypothesis that it is sparse and that it is dense, and computes th Bayes factor.

Usage

sparse_or_dense(x, type, ...)

Arguments

x

An n x p matrix or dataframe containing the variables for n independent observations on p variables.

type

What is the data type? Options: currently only binary and ordinal are supported

...

additional arguments of the bgms function

Value

List containing results of the analysis:

Examples


library(easybgm)
library(bgms)

data <- na.omit(Wenchuan)

# Fitting the Wenchuan PTSD data

fit <- sparse_or_dense(data, type = "ordinal",
                iter = 1000 # for demonstration only (> 5e4 recommended)
                )
  
             

[Package easybgm version 0.2.1 Index]