d_netCorr: Dynamic networked correlations.

View source: R/netcoin.R

d_netCorrR Documentation

Dynamic networked correlations.

Description

netCorr produces a network object of dynamic correlations. Its input has to be at least one set of quantitative variables.

Usage

d_netCorr(variables, nodes = NULL, weight=NULL, 
        pairwise=FALSE, minimum=-Inf, maximum=Inf,
        frequency=FALSE, means=TRUE, 
        method=c("pearson", "kendall", "spearman"), criteria="value", Bonferroni=FALSE,
        minL=0, maxL=Inf,
        sortL=NULL, decreasingL=TRUE,
        factorial=c("null", "pc", "nf", "vf", "of"),
        components=TRUE, backcomponents=FALSE,
        sequence=seq(.20, 1, .01), textFilter=c(1, .99), speed=50,
        dir=NULL, ...)

Arguments

variables

a data frame with at least two quantitative variables.

nodes

a data frame with at least one vector of names and other information from the nodes

weight

a vector of weights. Optimal for data.framed tables

pairwise

Pairwise mode of handling missing values if TRUE. Listwise by default.

minimum

minimum mean to be considered

maximum

maximum mean to be considered

frequency

a logical value true if frequencies are to be shown. Default=FALSE.

means

a logical value true if means are to be shown. Default=TRUE.

method

a vector of statistics of similarity. Pearson correlation by default. Spearman and Kendall are also possible

criteria

statistic to be use for selection criteria.

Bonferroni

Bonferroni criterium of the signification test.

minL

minimum value of the statistic to include the edge in the list.

maxL

maximum value of the statistic to include the edge in the list.

sortL

sort the list according to the values of a statistic. See below

decreasingL

order in a decreasing way.

factorial

factorial layout: Principal components (pc), factorial (nf), factorial with varimax rotation (vf), and factorial with oblimin rotation (of) are possible

components

display following graph in sequence only when the components are unequal

backcomponents

display following graph in sequence even if there are less components

sequence

evolution of the dinamic graphs. c(first threshold, last threshold, step)

textFilter

limits for showing the correlations as text on the graph. This limit is the minimun value of the first (absolute), and the second (threshold plus its value)

speed

speed of the dynamic evolution from 0 to 100

dir

a "character" string representing the directory where the web files will be saved.

...

any netCoin argument.

Value

The function creates a list object to create a multigraph and eventually a folder in the computer with an HTML document named index.html which contains the produced dynamic graphs. This file can be directly opened with your browser and sent to a web server to work properly.

Author(s)

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

# A character column (with separator)
data(iris)
d_netCorr(iris[,1:4],ltext="value", sequence=seq(.80, 1, .05), zoom=3, textFilter=.85,
 main="Correlations between measurements of Iris Species", components=FALSE,
 note="Anderson, Edgar (1935) y Fisher, R. A. (1936)") # network object

netCoin documentation built on Oct. 18, 2024, 5:10 p.m.