allNet: Networked coincidences from incidences data.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/netcoin.R

Description

allNet produces a network object of coincidences from a data frame or a matrix with dichotomous values.

Usage

1
2
3
4
5
6
7
8
9
allNet(incidences, weight = NULL, subsample = FALSE, pairwise = FALSE,
       minimum=1, maximum = nrow(incidences), 
       sort = FALSE, decreasing = TRUE,
       frequency = FALSE, percentages = TRUE, 
       procedures = "Haberman", criteria = "Z", Bonferroni = FALSE,
       support = -Inf, minL = -Inf, maxL = Inf,
       directed = FALSE, diagonal = FALSE, 
       sortL = NULL, decreasingL = TRUE,
       igraph = FALSE, dir=NULL, ...)

Arguments

incidences

an incidence matrix or data frame with only 0/1 variables.

weight

a vector of weights. Optimal for data.framed tables.

subsample

retrict the analysis to scenarios with at least one event.

pairwise

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

minimum

minimum frequency to be considered.

maximum

maximum frequency to be considered.

sort

sort the coincidence matrix according to frequency of events.

decreasing

decreasing or increasing sort of the matrix.

frequency

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

percentages

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

procedures

a vector of statistics of similarity. See below.

criteria

statistic to be use for selection criteria.

Bonferroni

Bonferroni criterium of the signification test.

support

minimum value of the frequency of the coincidence to be edged.

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.

directed

includes same edges only once.

diagonal

includes auto-links.

sortL

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

decreasingL

order in a decreasing way.

igraph

Produces an igraph object instead of a netCoin object if TRUE.

dir

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

...

Any netCoin argument.

Details

Possible measures in procedures are

Value

This function creates a netCoin object (or igraph) and, if stated, a folder in the computer with an HTML document named index.html which contains the produced graph. 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/

References

Escobar, M. and Martinez-Uribe, L. (2020) Network Coincidence Analysis: The netCoin R Package. Journal of Statistical Software, 93, 1-32. doi: 10.18637/jss.v093.i11.

Examples

1
2
3
4
5
# A character column (with separator)
frame <- data.frame(A = c("Man; Women", "Women; Women",
                        "Man; Man", "Undet.; Women; Man"))
data <- dichotomize(frame, "A", sep = "; ")[2:4]
allNet(data) # network object

Example output

Title: 

Nodes:
         name  %
Man       Man 75
Women   Women 75
Undet. Undet. 25

Links:
  source target  Haberman         Z
3    Man Undet. 0.6666667 0.2707349
6  Women Undet. 0.6666667 0.2707349

netCoin documentation built on Oct. 29, 2021, 1:06 a.m.