{smcl} {* *! version 1.1 05April2020}{...} {title:Title} {p2colset 9 18 22 2}{...} {p2col :nw_projection {hline 2} Projects a bipartite network into one of its two dimensions.} {p2colreset}{...} {title:Syntax} {p 8 17 2} {cmdab: nw_projection} [{cmd:,} {opt X()} {opt Y()} {opt sequence()} {opt nsequence()} {opt output()} {opt netname()} {opt binary} {opt normalize} ] {synoptset 25 tabbed}{...} {synopthdr} {synoptline} {synopt:{opt X(varname)}} Indicate the set of nodes into which the projection is generated. Required. {synopt:{opt Y(varname)}} Indicate the second set of nodes in the initial bipartite network. Required . {synopt:{opt s:equence(varname)}} For directed projections : Indicate the sequence of linkages. {synopt:{opt ns:equence()}} Indicate the nomber of previous sequences to be considered. Default is all of them. {synopt:{opt out:put()}} Output display, eitheir adjacency {it:matrix} (default) or {it:edgelist} {synopt:{opt net:name()}} Name of the resulting network {synopt:{opt norm:alize}} Build a normalized network (max weight=1). {synopt:{opt bin:ary}} Build a binary network (all positive edges' weights set to 1). {synoptline} {p2colreset}{...} {title:Description} {pstd} 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, {cmd: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 {cmd:X(varlist)}. The Y nodes must be identified in {cmd:Y(varlist)}. {pstd} {cmd: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. {pstd} By default, the resulting matrix is weighted by the frequency of linkages from the bipartite network. Options {cmd:binary} or {cmd:normalize} can modify the weights. {pstd} A directed network can be generated by providing a sequence order of linkages in the initial bipartite network in option {cmd:sequence(varlist)}. Then the subsequent option {cmd:nsequence(#)} indicates how many previous linkages' sequence are considered. {pstd} {cmd:nw_projection} Note that nw_projection requires {bf : nwcommands} package developed by Thomas Grund (see below). {title: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) {pstd} 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) {title:Saved results} {pstd}{cmd:nw_projection} saves the following in {cmd:r()}: {synoptset 14 tabbed}{...} {p2col 5 20 30 2: matrices}{p_end} {synopt:{cmd:r(M_proj)}} Adjacency matrix of projected network {p_end} {p2colreset}{...} {pstd}{cmd:nw_projection} also saves the adjacency matrix in a Mata matrix {it:M}: {cmd:. mata M_proj} {title:See also} {pstd} {cmd:nw_projection} requires the {bf : nwcommands} package developed by Thomas Grund. {pstd} For do-files and ancillary files, see: {cmd:. net describe nwcommands-ado, from(http://www.nwcommands.org)} } For help files, see : {cmd:. net describe nwcommands-hlp, from(http://www.nwcommands.org)} } {title:Author} Charlie Joyez, Université Côte d'Azur charlie.joyez@univ-cotedazur.fr