Reprogramming task notes

From InterSciWiki

Jump to: navigation, search

Peter – a more specific proposal: I can send a purchase order form partly to be filled in by you whereby we would put in an amount (once, twice whatever needed) for the following programming job in R. There is already code for this, with documentation and R code at

http://intersci.ss.uci.edu/wiki/index.php/Software:_Kinship_simulation

Working with John you are probably familiar with kinship diagrams, these being P-graphs where the nodes are couples, the dotted red lines go to their daughters (alone or in a couple), the solid black lines to their sons (alone or in a couple). Parents are higher in these graphs than their children. Fig. 1 shows a graph drawn by Pajek. Fig. 2 after a Pajek net file for this P-graph is exported to R along with the *.clu partition variable computed within Pajek for /Net/Partition/Depth/Generation. Fig. 3 same as to, for visual comparison with Fig. 4 Fig. 4 is the result of a permutation in which the parents of a red line are retained but the lower bases of the lines are permuted: i.e. the wives play musical chairs with the husband.

That’s the idea of the simulation, described in 1999 Controlled Simulation of Marriage Systems. Journal of Artificial Societies and Social Simulation 2(3). http://jasss.soc.surrey.ac.uk/2/3/5.html

On the wiki page I provide a crude version of the simulation program. It is not debugged, not even well designed. Merely illustrative What I would send are several different Pajek *.net files for P-graphs.

In addition to calculating /Net/Partition/Depth/Generation for each, which gives the x coordinate of the Pajek image the y coordinate should also be exported into R. This means that the position of the nodes will be constant.

The program goes through each parental generation in the horizontal x coordinate, and permutes among the children, who may but at any lower generation.

I need a program that is robust for different datasets and that scales the results in some reasonable way imagewise.

We could probably get this done before you start school in the fall and not take up much of your time. John would like it. If successful we could do another version where generations are calculated for an “Ore” graph where the nodes are individuals, links to children are directed arcs, and marriages are either bidirected or directed from, say, Hu to Wi.

The choices in the R program are whether to permute the wives, the husbands, or one, then the other, in what order.