Skip to main content
. Author manuscript; available in PMC: 2015 Apr 7.
Published in final edited form as: Simulation. 2014 Apr 1;90(4):460–484. doi: 10.1177/0037549714526947

Algorithm 2.

Procedure MakePopulation

Input: pop. size n, attribute distributions {αi}i=1..m, degree distributions {Xj}j=1..l.
Output: ({xi}, {dj}, V)i=1..m;j=1..l.
1 V = {v1, v2, . . ., vn}.
2 foreach vk in V do
3     // Set the attributes of individual vk.
4     foreach i in 1...m do
5         xi(vk) := an element of Ui randomly selected via αi.
6     // Set individual vk's ideal ego net size at each layer.
7     foreach j in 1...l do
8         sfjC(v), the layer-j ideal degree class of vk.
9         τ := χj;s the corresponding layer-j ideal degree distribution, taken from Range(Xj).
10         dj(vk) := an integer randomly chosen via pdf τ.
11 return ({xi}, {dj}, V)i=1..m;j=1..i.