Thanks to Kit Baum, -nw_fromlist- a program that allows you to generate networks from lists (long data), is on SSC.
While my previous programs dealt with extracting information from network data on Stata, this one is one step before and allows you to create networks from a list of individuals on nodes.
Before showing an example I detail a little the network analysis. While most econometrics works tries to determined how a variable y is determined by another variable x1, the network analysis provides another perspective (which could be seen a extended descriptive statistics) and gives information on how various (discrete) values of y are associated by individual (or any observation scale). Precise metrics of nodes (each value of y), can be returned and used in a more traditional econometric analysis.
Example : Multinational firms and host countries :
Multinational firms (here my individuals), are located in various host countries. But what kind of countries are jointly invested? Which country is "central" and linked to many other? These questions might be addressed by a network analysis. (Replace country by any discrete variable, and firms by any individual that fit your research topic).
nw_fromlist allows you to build a network simply from a long dataset on individual (here firms) on nodes (here countries). Eg:
The program has drawn a network from the long data format. Then a quick network analysis shows that USA are the most central node here.
nw_fromlist also has options to built directed, binary or normalized networks, see the help file for preciser information.
I hope some of you will find it useful and give a try, at least to see what could bring a network analysis in your topics, with a very low entry cost.
Best, and thank again to Thomas Grund, since I'm relying much on is substantial existing work.
Charlie
While my previous programs dealt with extracting information from network data on Stata, this one is one step before and allows you to create networks from a list of individuals on nodes.
Before showing an example I detail a little the network analysis. While most econometrics works tries to determined how a variable y is determined by another variable x1, the network analysis provides another perspective (which could be seen a extended descriptive statistics) and gives information on how various (discrete) values of y are associated by individual (or any observation scale). Precise metrics of nodes (each value of y), can be returned and used in a more traditional econometric analysis.
Example : Multinational firms and host countries :
Multinational firms (here my individuals), are located in various host countries. But what kind of countries are jointly invested? Which country is "central" and linked to many other? These questions might be addressed by a network analysis. (Replace country by any discrete variable, and firms by any individual that fit your research topic).
nw_fromlist allows you to build a network simply from a long dataset on individual (here firms) on nodes (here countries). Eg:
Code:
*Before running this code, you must install Thomas Grund nwcommand I use in my code, by uncommenting next line *net install nwcommands-ado, from(http://www.nwcommands.org) nwclear input byte ent str4 iso3 float(year) 1 "AUT" 1 1 "USA" 2 2 "USA" 1 2 "GBR" 1 3 "GBR" 2 3 "FRA" 2 3 "ESP" 1 4 "ESP" 1 4 "ITA" 1 4 "FRA" 2 4 "USA" 3 end . nw_fromlist mynetwork,node(iso3) id(ent) nwplot, edgesize(mynetwork) label(iso3)
nw_fromlist also has options to built directed, binary or normalized networks, see the help file for preciser information.
I hope some of you will find it useful and give a try, at least to see what could bring a network analysis in your topics, with a very low entry cost.
Best, and thank again to Thomas Grund, since I'm relying much on is substantial existing work.
Charlie
Comment