Learn R Programming

EGAnet (version 0.9.6)

cmi: Conditional Mutual Information

Description

Computes the conditional mutual information metric using a modification of the matrix of partial correlations (see Zhao, Zhou,Zhang, & Chen, 2016). If the raw data is provided, the correlation matrix will be computed using the cor_auto function of the qgraph package.

Usage

cmi(data, network = FALSE, EGA = TRUE, steps = 4)

Arguments

data

A dataframe with the variables to be used in the analysis or a correlation matrix.

network

Logical. If TRUE, returns a plot of the conditional mutual information network. Defaults to FALSE.

EGA

Logical. If TRUE, exploratory graph analysis is performed using the conditional mutual information network.

steps

Number of steps to be used in cluster_walktrap algorithm (necessary only if the EGA argument is set to TRUE). Defaults to 4.

References

Zhao, J., Zhou, Y., Zhang, X., & Chen, L. (2016). Part mutual information for quantifying direct associations in networks. Proceedings of the National Academy of Sciences, 113, 5130-5135. doi: 10.1073/pnas.1522586113

See Also

bootEGA to investigate the stability of EGA's estimation via bootstrap and EGA to apply the exploratory graph analysis technique.

Examples

Run this code
# NOT RUN {
wmt <- wmt2[,7:24]

# }
# NOT RUN {
#estimate EGA
ega.wmt <- EGA(data = wmt, model = "glasso", plot.EGA = TRUE)


#estimate EGAtmfg
ega.wmt <- EGA(data = wmt, model = "TMFG", plot.EGA = TRUE)

#summary statistics
summary(ega.wmt)

#plot
plot(ega.wmt)

#estimate EGA
ega.intel <- EGA(data = intelligenceBattery[,8:66], model = "glasso", plot.EGA = TRUE)

#summary statistics
summary(ega.intel)

#plot
plot(ega.intel)
# }

Run the code above in your browser using DataLab