Learn R Programming

⚠️There's a newer version (2.8) of this package.Take me there.

sna (version 2.7)

Tools for Social Network Analysis

Description

A range of tools for social network analysis, including node and graph-level indices, structural distance and covariance methods, structural equivalence detection, network regression, random graph generation, and 2D/3D network visualization.

Copy Link

Version

Install

install.packages('sna')

Monthly Downloads

23,980

Version

2.7

License

GPL (>= 2)

Maintainer

Carter Butts

Last Published

June 1st, 2022

Functions in sna (2.7)

add.isolates

Add Isolates to a Graph
bbnam

Butts' (Hierarchical) Bayesian Network Accuracy Model
bbnam.bf

Estimate Bayes Factors for the bbnam
betweenness

Compute the Betweenness Centrality Scores of Network Positions
coleman

Coleman's High School Friendship Data
bonpow

Find Bonacich Power Centrality Scores of Network Positions
component.dist

Calculate the Component Size Distribution of a Graph
centralgraph

Find the Central Graph of a Labeled Graph Stack
closeness

Compute the Closeness Centrality Scores of Network Positions
clique.census

Compute Cycle Census Information
centralization

Find the Centralization of a Given Network, for Some Measure of Centrality
brokerage

Perform a Gould-Fernandez Brokerage Analysis
diag.remove

Remove the Diagonals of Adjacency Matrices in a Graph Stack
bicomponent.dist

Calculate the Bicomponents of a Graph
component.size.byvertex

Get Component Sizes, by Vertex
equiv.clust

Find Clusters of Positions Based on an Equivalence Relation
components

Find the Number of (Maximal) Components Within a Given Graph
eval.edgeperturbation

Compute the Effects of Single-Edge Perturbations on Structural Indices
blockmodel.expand

Generate a Graph (or Stack) from a Given Blockmodel Using Particular Expansion Rules
flowbet

Calculate Flow Betweenness Scores of Network Positions
cug.test

Univariate Conditional Uniform Graph Tests
cugtest

Perform Conditional Uniform Graph (CUG) Hypothesis Tests for Graph-Level Indices
bn

Fit a Biased Net Model
gden

Find the Density of a Graph
degree

Compute the Degree Centrality Scores of Network Positions
cutpoints

Identify the Cutpoints of a Graph or Digraph
gplot.layout

Vertex Layout Functions for gplot
dyad.census

Compute a Holland and Leinhardt MAN Dyad Census
evcent

Find Eigenvector Centrality Scores of Network Positions
event2dichot

Convert an Observed Event Matrix to a Dichotomous matrix
gplot.loop

Add Loops to a Plot
gapply

Apply Functions Over Vertex Neighborhoods
geodist

Fund the Numbers and Lengths of Geodesics Among Nodes in a Graph
gdist.plotstats

Plot Various Graph Statistics Over a Network MDS
gt

Transpose an Input Graph
gtrans

Compute the Transitivity of an Input Graph or Graph Stack
gplot3d.arrow

Add Arrows a Three-Dimensional Plot
gplot3d

Three-Dimensional Visualization of Graphs
gplot.vertex

Add Vertices to a Plot
gdist.plotdiff

Plot Differences in Graph-level Statistics Against Inter-graph Distances
gplot.target

Display a Graph in Target Diagram Form
gplot3d.layout

Vertex Layout Functions for gplot3d
gplot3d.loop

Add Loops to a Three-Dimensional Plot
consensus

Estimate a Consensus Structure from Multiple Observations
hdist

Find the Hamming Distances Between Two or More Graphs
blockmodel

Generate Blockmodels Based on Partitions of Network Positions
gvectorize

Vectorization of Adjacency Matrices
connectedness

Compute Graph Connectedness Scores
lab.optimize

Optimize a Bivariate Graph Statistic Across a Set of Accessible Permutations
isolates

List the Isolates in a Graph or Graph Stack
kcores

Compute the k-Core Structure of a Graph
is.isolate

Is Ego an Isolate?
gclust.centralgraph

Get Central Graphs Associated with Graph Clusters
gclust.boxstats

Plot Statistics Associated with Graph Clusters
gilschmidt

Compute the Gil-Schmidt Power Index
loadcent

Compute the Load Centrality Scores of Network Positions
nties

Find the Number of Possible Ties in a Given Graph or Graph Stack
npostpred

Take Posterior Predictive Draws for Functions of Networks
lnam

Fit a Linear Network Autocorrelation Model
lower.tri.remove

Remove the Lower Triangles of Adjacency Matrices in a Graph Stack
gscor

Find the Structural Correlations Between Two or More Graphs
gscov

Find the Structural Covariance(s) Between Two or More Graphs
gliop

Return a Binary Operation on GLI Values Computed on Two Graphs
lubness

Compute Graph LUBness Scores
is.connected

Is a Given Graph Connected?
mutuality

Find the Mutuality of a Graph
efficiency

Compute Graph Efficiency Scores
interval.graph

Convert Spell Data to Interval Graphs
print.blockmodel

Printing for blockmodel Objects
print.bbnam

Printing for bbnam Objects
print.cugtest

Printing for cugtest Objects
print.lnam

Printing for lnam Objects
gcor

Find the (Product-Moment) Correlation Between Two or More Labeled Graphs
ego.extract

Extract Egocentric Networks from Complete Network Data
print.qaptest

Printing for qaptest Objects
print.summary.qaptest

Printing for summary.qaptest Objects
print.netlogit

Printing for netlogit Objects
plot.bbnam

Plotting for bbnam Objects
numperm

Get the nth Permutation Vector by Periodic Placement
make.stochastic

Make a Graph Stack Row, Column, or Row-column Stochastic
maxflow

Calculate Maximum Flows Between Vertices
pstar

Fit a p*/ERG Model Using a Logistic Approximation
plot.blockmodel

Plotting for blockmodel Objects
gplot

Two-Dimensional Visualization of Graphs
hierarchy

Compute Graph Hierarchy Scores
gcov

Find the Covariance(s) Between Two or More Labeled Graphs
graphcent

Compute the (Harary) Graph Centrality Scores of Network Positions
gplot.arrow

Add Arrows or Segments to a Plot
sedist

Find a Matrix of Distances Between Positions Based on Structural Equivalence
print.summary.blockmodel

Printing for summary.blockmodel Objects
grecip

Compute the Reciprocity of an Input Graph or Graph Stack
print.summary.bbnam

Printing for summary.bbnam Objects
simmelian

Find the Simmelian Tie Structure of a Graph
print.summary.bayes.factor

Printing for summary.bayes.factor Objects
print.summary.cugtest

Printing for summary.cugtest Objects
infocent

Find Information Centrality Scores of Network Positions
neighborhood

Compute Neighborhood Structures of Specified Order
plot.cugtest

Plotting for cugtest Objects
netcancor

Canonical Correlation for Labeled Graphs
summary.blockmodel

Detailed Summaries of blockmodel Objects
summary.bbnam

Detailed Summaries of bbnam Objects
sna-defunct

Defunct sna Objects
kpath.census

Compute Path or Cycle Census Information
sna-coercion

sna Coercion Functions
redist

Find a Matrix of Distances Between Positions Based on Regular Equivalence
rgbn

Draw from a Skvoretz-Fararo Biased Net Process
stresscent

Compute the Stress Centrality Scores of Network Positions
structdist

Find the Structural Distances Between Two or More Graphs
netlogit

Logistic Regression for Network Data
nacf

Sample Network Covariance and Correlation Functions
netlm

Linear Regression for Network Data
prestige

Calculate the Vertex Prestige Scores
rgnm

Draw Density-Conditioned Random Graphs
plot.lnam

Plotting for lnam Objects
plot.qaptest

Plotting for qaptest Objects
write.dl

Write Output Graphs in DL Format
write.nos

Write Output Graphs in (N)eo-(O)rg(S)tat Format
rgnmix

Draw Mixing-Conditioned Random Graphs
print.bayes.factor

Printing for Bayes Factor Objects
sna.operators

Graphical Operators
sna

Tools for Social Network Analysis
print.summary.lnam

Printing for summary.lnam Objects
print.summary.netcancor

Printing for summary.netcancor Objects
structure.statistics

Compute Network Structure Statistics
read.nos

Read (N)eo-(O)rg(S)tat Input Files
read.dot

Read Graphviz DOT Files
print.netcancor

Printing for netcancor Objects
print.summary.netlogit

Printing for summary.netlogit Objects
print.netlm

Printing for netlm Objects
print.summary.netlm

Printing for summary.netlm Objects
rgws

Draw From the Watts-Strogatz Rewiring Model
summary.bayes.factor

Detailed Summaries of Bayes Factor Objects
rperm

Draw a Random Permutation Vector with Exchangeability Constraints
rmperm

Randomly Permute the Rows and Columns of an Input Matrix
stackcount

How Many Graphs are in a Graph Stack?
sr2css

Convert a Row-wise Self-Report Matrix to a CSS Matrix with Missing Observations
summary.cugtest

Detailed Summaries of cugtest Objects
sdmat

Estimate the Structural Distance Matrix for a Graph Stack
plot.equiv.clust

Plot an equiv.clust Object
sna-deprecated

Deprecated Functions in sna Package
plot.sociomatrix

Plot Matrices Using a Color/Intensity Grid
potscalered.mcmc

Compute Gelman and Rubin's Potential Scale Reduction Measure for a Markov Chain Monte Carlo Simulation
summary.lnam

Detailed Summaries of lnam Objects
reachability

Find the Reachability Matrix of a Graph
qaptest

Perform Quadratic Assignment Procedure (QAP) Hypothesis Tests for Graph-Level Statistics
summary.netcancor

Detailed Summaries of netcancor Objects
sna-internal

Internal sna Functions
summary.netlm

Detailed Summaries of netlm Objects
upper.tri.remove

Remove the Upper Triangles of Adjacency Matrices in a Graph Stack
triad.classify

Compute the Davis and Leinhardt Classification of a Given Triad
rgraph

Generate Bernoulli Random Graphs
rguman

Draw Dyad Census-Conditioned Random Graphs
summary.qaptest

Detailed Summaries of qaptest Objects
summary.netlogit

Detailed Summaries of netlogit Objects
symmetrize

Symmetrize an Adjacency Matrix
triad.census

Compute the Davis and Leinhardt Triad Census