*! version 1.1 05April2020

Title

nw_projection -- Projects a bipartite network into one of its two dimensions.

Syntax

nw_projection
[,
X()
Y()
sequence()
nsequence()
output()
netname()
binary
normalize
]

X(varname) Indicate the set of nodes into which the projection is generated. Required.

Y(varname) Indicate the second set of nodes in the initial bipartite network. Required .

sequence(varname) For directed projections : Indicate the sequence of linkages.

nsequence() Indicate the nomber of previous sequences to be considered. Default is all of them.

output() Output display, eitheir adjacency matrix (default) or edgelist

netname() Name of the resulting network

normalize Build a normalized network (max weight=1).

binary Build a binary network (all positive edges' weights set to 1).

Description

A bipartite network is made of two sets of nodes (X and Y) where only connections between nodes in different sets are allowed.
From an edgelist of a bipartite network, nw_projection returns the resulting projection into one dimension (Zhou et al., 2007, Phys. Rev. E). A projection consists in liking two nodes in the same set X according to the number of neighboring Y nodes.
The projection reduces the network into a unimodular one where remaining X nodes are identified in the X(varlist). The Y nodes must be identified in Y(varlist).

nw_projection returns etiher the adjacency matrix of the projected network, or its edgelist, and the former dataset is deleted. The adjacency matrix is also stored as a mata matrix, and as a network.

By default, the resulting matrix is weighted by the frequency of linkages from the bipartite network. Options binary or normalize can modify the weights.

A directed network can be generated by providing a sequence order of linkages in the initial bipartite network in option sequence(varlist). Then the subsequent option nsequence(#) indicates how many previous linkages' sequence are considered.

nw_projection Note that nw_projection requires nwcommands package developed by Thomas Grund (see below).

Examples

clear
input float X_nodes str1 Y_nodes
1 "A"
1 "B"
1 "C"
2 "C"
3 "A"
3 "B"
end

nw_projection , x(X_nodes) y(Y_nodes)

clear
input float X_nodes str1 Y_nodes float year
1 "A" 1999
1 "B" 2000
1 "C" 2002
2 "C" 2002
3 "A" 2002
3 "B" 2002
end

nw_projection , x(X_nodes) y(Y_nodes) sequence(year) nsequence(2)

Saved results

nw_projection saves the following in r():

matrices

r(M_proj) Adjacency matrix of projected network

nw_projection also saves the adjacency matrix in a Mata matrix M:
. mata M_proj

See also

nw_projection requires the nwcommands package developed by Thomas Grund.

For do-files and ancillary files, see:

. net describe nwcommands-ado, from(http://www.nwcommands.org)
}
For help files, see :

. net describe nwcommands-hlp, from(http://www.nwcommands.org)
}

Author

Charlie Joyez, Université Côte d'Azur
charlie.joyez@univ-cotedazur.fr