Applies the Maximally Filtered Clique Forest (MFCF) filtering method (Please see and cite Massara & Aste).
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
)
Matrix (n x
n or p x
n) or data frame.
Can be a dataset or a correlation matrix
Numeric. If data
is a (partial) correlation
matrix, then number of cases must be input.
Defaults to NULL
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
Boolean.
Is data
a time-series dataset?
Defaults to FALSE
.
Set to TRUE
to handle time-series data (n x
p)
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"
Numeric. Minimum number of nodes allowed per
clique. Defaults to 0
Numeric. Maximum number of nodes allowed per
clique. Defaults to 8
Numeric. p-value used to determine cut-offs for nodes to include in a clique
Numeric. Multiplies the number of edges added to penalise complex models. Similar to the penalty term in AIC
Boolean. This parameter influences the MFCF only.
Defaults to FALSE
.
If TRUE
, then any separator can be used only once (similar
to the TMFG
)
Boolean. Only used in "gain.fxn = rSquared.val"
.
If set to TRUE
the regression is
performed on log-returns.
Defaults to FALSE
Returns a list containing:
MFCF filtered partial correlation network (adjacency matrix)
MFCF filtered inverse covariance matrix (precision matrix)
Cliques in the network
(output for LoGo
)
Separators in the network
(output for LoGo
)
Massara, G. P. & Aste, T. (2019). Learning clique forests. ArXiv.
# NOT RUN {
# Load data
data <- neoOpen
# }
# NOT RUN {
# Use polychoric correlations and R-squared method
MFCF.net <- MFCF(qgraph::cor_auto(data), cases = nrow(neoOpen))$A
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab