allNet {netCoin} | R Documentation |
Networked coincidences from incidences data.
Description
allNet
produces a network object of coincidences from a data frame or a matrix with dichotomous values.
Usage
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
Frequencies (f), Relative frequencies (x), Conditional frequencies (i), Coincidence degree (cc), Probable degree (cp),
Expected (e), Confidence interval (con)
Matching (m), Rogers & Tanimoto (t), Gower (g), Sneath (s), Anderberg (and),
Jaccard (j), Dice (d), antiDice (a), Ochiai (o), Kulczynski (k),
Hamann (ham), Yule (y), Pearson (p), odds ratio (od), Rusell (r),
Haberman (h), Z value of Haberman (z),
Hypergeometric p greater value (hyp).
Convert a matrix into an edge list (shape).
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
# 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