Hi all,
below is the answer for what Paul wants to do. He points towards the problem of keeping node labels when making an edgelist. While "nwtoedge" does not have a specific option to do this, you can achieve it very easily by specifying the "fromvars()" and the "tovars()" option with the original node labels.
For example, the solution to his specific problem using the florentine data would be:
. webnwuse florentine
. gen originallab = _nodelab
. nwgeodesic flomarriage, name(mygeo)
. nwtoedge mygeo, fromvars(originallab) tovars(originallab)
In a similar way you can make an edgelist with node labels, instead of node id's:
. webnwuse florentine
. nwtoedge flomarriage, fromvars(_nodelab) tovars(_nodelab)
This generates the new variables "from_nodelab" and "to_nodelab", which hold the original node labels.
Best,
Thomas