Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

MFCF

Maximally Filtered Clique Forest


Description

Applies the Maximally Filtered Clique Forest (MFCF) filtering method (Please see and cite Massara & Aste).

Usage

MFCF(
  data,
  cases = NULL,
  na.data = c("pairwise", "listwise", "fiml", "none"),
  time.series = FALSE,
  gain.fxn = c("logLik", "logLik.val", "rSquared.val"),
  min_size = 0,
  max_size = 8,
  pval = 0.05,
  pen = 0,
  drop_sep = FALSE,
  use_returns = FALSE
)

Arguments

data

Matrix (n x n or p x n) or data frame. Can be a dataset or a correlation matrix

cases

Numeric. If data is a (partial) correlation matrix, then number of cases must be input. Defaults to NULL

na.data

Character. How should missing data be handled?

  • "listwise" Removes case if any missing data exists. Applies na.omit

  • "pairwise" Estimates correlations using the available data for each variable

  • "fiml" Estimates correlations using the Full Information Maximum Likelihood. Recommended and most robust but time consuming

  • "none" Default. No missing data or missing data has been handled by the user

time.series

Boolean. Is data a time-series dataset? Defaults to FALSE. Set to TRUE to handle time-series data (n x p)

gain.fxn

Character. Gain function to be used for inclusion of nodes in cliques. There are several options available (see gain.functions for more details): "logLik", "logLik.val", "rSquared.val". Defaults to "rSquared.val"

min_size

Numeric. Minimum number of nodes allowed per clique. Defaults to 0

max_size

Numeric. Maximum number of nodes allowed per clique. Defaults to 8

pval

Numeric. p-value used to determine cut-offs for nodes to include in a clique

pen

Numeric. Multiplies the number of edges added to penalise complex models. Similar to the penalty term in AIC

drop_sep

Boolean. This parameter influences the MFCF only. Defaults to FALSE. If TRUE, then any separator can be used only once (similar to the TMFG)

use_returns

Boolean. Only used in "gain.fxn = rSquared.val". If set to TRUE the regression is performed on log-returns. Defaults to FALSE

Value

Returns a list containing:

A

MFCF filtered partial correlation network (adjacency matrix)

J

MFCF filtered inverse covariance matrix (precision matrix)

cliques

Cliques in the network (output for LoGo)

separators

Separators in the network (output for LoGo)

Author(s)

Guido Previde Massara <gprevide@gmail.com> and Alexander Christensen <alexpaulchristensen@gmail.com>

References

Massara, G. P. & Aste, T. (2019). Learning clique forests. ArXiv.

Examples

# Load data
data <- neoOpen

## Not run:  
# Use polychoric correlations and R-squared method
MFCF.net <- MFCF(qgraph::cor_auto(data), cases = nrow(neoOpen))$A


## End(Not run)

NetworkToolbox

Methods and Measures for Brain, Cognitive, and Psychometric Network Analysis

v1.4.1
GPL (>= 3.0)
Authors
Alexander Christensen [aut, cre] (<https://orcid.org/0000-0002-9798-7037>), Guido Previde Massara [ctb] (<https://orcid.org/0000-0003-0502-2789>)
Initial release
2020-12-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.