Learn R Programming

NetworkToolbox (version 1.4.2)

gain.functions: MFCF Gain Functions

Description

These functions maximize a gain criterion for adding a node to a clique (and the larger network). The flexibility of MFCF allows for any multivariate function to be used as a scoring function.

  • "logLik"

    The log determinant of the matrix restricted to the separator minus the log determinant of the matrix restricted to the clique.

  • "logLik.val"

    "logLik" with a further validation based on the likelihood ratio. If the increase in gain is not significant the routine stops adding nodes to the separator.

  • "rSquared.val"

    The R squared from the regression of the node against the clique. Only the clique nodes with a regression coefficient significantly different from zero are added to the separator / new clique. The gain is different from zero only if the F-values is significant, It assumed that the data matrix is a dataset of realizations (i.e., p variables and n observations).

Usage

"logLik"
gfcnv_logdet(data, clique_id, cl, excl_nodes, ctreeControl)

"logLik.val" gfcnv_logdet_val(data, clique_id, cl, excl_nodes, ctreeControl)

"rSquared.val" gdcnv_lmfit(data, clique_id, cl, excl_nodes, ctreeControl)

Arguments

data

Matrix or data frame. Can be a dataset or a correlation matrix

clique_id

Numeric. Number corresponding to clique to add another node to

cl

List. List of cliques already assembled in the network

excl_nodes

Numeric vector. A vector of numbers corresponding to nodes not already included in the network

ctreeControl

List (length = 5). A list containing several parameters for controlling the clique tree sizes:

  • min_size Numeric. Minimum number of nodes allowed per clique. Defaults to 1

  • 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. Defaults to .05

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

  • drop_sep Boolean. This parameter influences the MFCF only. If TRUE any separator can be used only once, as in the TMFG.

  • use_returns Boolean. Only used in rSquared.val. If set to TRUE the regression is performed on log-returns. Defaults to FALSE

Value

Returns the value with the maximum gain

References

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