Modelling "marriage Markets": a Population-scale Implementation and Parameter Test

Suggested Reference Walker, L., & Davis, P. (2013). Modelling "marriage markets": a population-scale implementation and parameter test. Copyright Items in ResearchSpace are protected by copyright, with all rights reserved, unless otherwise indicated. Previously published items are made available in accordance with the copyright policy of the publisher. Abstract Choice mechanisms and social networks, including "marriage markets", seem well-suited to be modelled using agent-type simulations. Few real-world empirical examples are available in the public literature, particularly those using human populations of size. We reviewed partnership models in both the micro-simulation and agent-based literatures. We then empirically implemented an algorithm derived from two established models using inter-censal data on first partnerships in New Zealand over the period 1981-2006. The purpose of the exercise was to test the robustness of different parameter settings and to determine whether a model simulating partnership selection among eligible never-married young adults at one census period is feasible for predicting patterns of partnership, co-habitation and marriage at the next. Varying simulation time and social network size parameters of the model showed that patterns of ethnic partnering could be consistently produced and were not dependent on these model settings. Examining the different scoring methods showed that age similarity, education similarity, and previous partnering patterns could produce partnership patterns similar to those seen in the census. The simulation produced patterns of ethnic partnering similar to those seen in the census and seemed robust to different parameter settings. To further improve these results, an optimised combination of the scoring components is proposed. The simulations also provided preliminary evidence of ethnic preferences in the New Zealand marriage market.


Introduction
1.1 Simulation provides the opportunity for the analysis of choice and network mechanisms, such as the examination of partnership formation or "marriage markets" (Billari, Diaz, Fent, & Prkawetz 2007).Such simulation models have been applied in economics (Chantarat and Barrett 2008), criminology (Weerman 2011), anthropology (Hoppitt and Laland 2011), geography (Xu & Sui 2009), public health (Eubank et.al. 2004), and innovation (Gilbert, Pyka, & Ahrweiler 2001).In this paper we review the models of partnership used in the micro-simulation and agent-based literatures, before implementing a population-scale marriage market model and testing different parameter settings for robustness.
1.2 The key measures of interest for this study are the patterns of inter-ethnic cohabitation, as they provide an insight into the changing interactions between ethnic groups, as well as being of interest in a population modelling context.The simulation modelling of these patterns uses non-ethnicity based micro variables, observation of the macro environment, and a random stochastic factor to simulate the partnering process.The simulation is run to model the partnership choices of single people in the 18-30 age group empirically identified from micro-data in the New Zealand Census, with ethnicity as a key choice variable.The ethnic partnering patterns generated by the simulation are observed and compared to the actual patterns of cohabitation or partnership in the 23-35 age group detected in the micro-data at the following census five years later.We wish to test the feasibility of such a model and its robustness to different parameter settings.
Mic r o-s imulation models 2.2 A number of large scale microsimulation projects have incorporated partnership matching into their population and policy simulation models.This section examines a number of these models.An early discussion of such models was done by van Imhoff and Post (1998), who provided a brief history of microsimulation population models and contrasted micro and macro (microsimulation using a sample that is scaled up vs. microsimulation using a whole population) approaches to such models.
The models were all simple Monte Carlo processes, so a major criticism of both types of models has the lack of realism in describing the partnership process.The authors concluded that both approaches to microsimulation generally performed well under conditions of a sizeable state space and could provide rich output, but results could be influenced by model specifications, particularly if scaling up from a sample.
2. 3 Bouffard et.al. (2001) compared the standard life table method with an alternative stochastic algorithm.This was based on a logistic regression using both the age differences of the potential partners and economic factors to find better matches.
Validation testing demonstrated that the stochastic algorithm provided better predictions against American census data than the fixed probability method.Similar findings on stochastic algorithms compared to fixed probabilities were reported by Perese (2002) who also applied a logistic regression-based algorithm to marriage matching within a microsimulation model.

2.4
The DYNASIM model, first developed by the Urban Institute ( http://www.urbaninstitute.org)as an income model in the 1970s (Orcutt, Caldwell, & Wertheimer II 1976) but has seen updates in the 1980s (Zedlewski 1990) and 2000 (Favreault & Smith 2004).The DYNASIM matching algorithm is a Monte Carlo styled method based around the age differences and education differences of the agents.This method is appealing in several ways.By creating a probability function rather than relying on regression models, the algorithm is not bound by assumptions of independence or other statistical factors.Other researchers have also used the same basic matching function, including the Australian Dynamic Population and Policy Microsimulation Model (APPSIM) (Bacon & Pennec 2007;Harding 2007).
2.5 Two European models, the Microsimulation Model of Family Dynamics (FAMSIM) (Spielauer & Vencatasawmy 2001) and the Simulating Social Policy in an Ageing Society (SAGE) model (Cheesbrough & Scott 2003), represent a more robust method than that of the regression approach.Each uses retrospective accounts of partnership histories, collected from stratified random samples of women in their respective regions, to inform their models, rather than using matrices of actual and hypothetical partnerships as logistic regression outcomes.
2.6 Not all microsimulation models of partnership formation focus on predictive outcomes.Chen (2005) uses an alternative paradigm, electing to examine possible strategies for the process of how people find their partners rather than focussing solely on an extrapolation-based outcome.He uses simulation models to examine five different theoretical matching strategies and finds that a "well-rounded" which combines satisficing and compensatory behaviour provided the most efficient matches.Monte Carlo simulation comparing transition probabilities based on logistic regression models using retrospective partnership histories from survey.
2.8 Rather than building these matching models for prediction, one of the main goals of these works has been to actively search for emergent patterns in the simulated populations, such as the shape of the aggregate age-at-marriage distribution (Todd & Billari 2003;Todd, Billari & Simão 2005).In both of these articles, the authors demonstrated the effectiveness of a simple search strategy based on a two-sided (mutual) process where matches were based on the combined evaluations of the male agents and the female agents.By comparison, the Simão and Todd articles (2002;2003) focussed less on the emergent outcomes of their partnership simulations and more on the simulation process itself.
2.9 Hills and Todd (2008) developed an agent-based model known as MADAM (Marriage and Divorce Annealing Model).MADAM built on earlier work by Miller and Todd (1998), Todd and Billari (2003) and Todd, Billari and Simão (2005), using a "homophilic trait matching model" which would gradually relax the expectations of the matching preferences as the agents aged.The main matching process involved a randomly generated world of agents, each of which have k mate-relevant traits from a set of N possible traits.Each will initially seek a mate who has a perfect match of the same k traits but, as they age, they will settle for a mate with j ( j < k) traits.This satisficing level was built into the simulation by using the function: j = k.exp(lambda.t),where j is the current threshold required to partner, k is the initial number of matched traits required, and lambda is the rate of decay of expectation.Like the DYNASIM model this is a decaying exponential function of the form exp(-f(x)).
2.10 Alam and Meyer ( 2008) used an agent-based network simulation to study the spread of HIV/AIDS in an African village.They developed two matching algorithms to model the sexual networks in the village.Two different choice mechanisms were tested.The first one involved each agent having an attraction score and an aspiration value.The second scheme used an "endorsement mechanism", where the decision to partner was based on a potential partner having sufficient positive feedback from others in the network, akin to an explicitly communicated social norm.The authors found that both methods gave broadly similar results, although the endorsement mechanism had less variability than the attraction/aspiration one (see Agents partner when they find k matches out of N generic traits in another agent.The number of matches required decays exponentially as the agents age.Kalick & Hamilton (1986) A single generic rankable trait.
Agents are either attracted to the agent with the highest trait, the agent with the most similar trait, or a combination of both.
Simão & Todd (2002;2003) A normally distributed generic trait and aspiration level for evaluating partners.
Agents encounter each other randomly.They compare each other's traits with their aspiration levels, then make "offers" to one another if traits are both greater than aspiration.Otherwise, one will reject the other and they adjust their aspiration levels.Todd & Billari (2003), Todd et.al. (2005) A normally distributed generic trait and aspiration level for evaluating partners.
Agents encounter each other randomly.They compare each other's traits with their aspiration levels, then make "offers" to one another if traits are both greater than aspiration.Otherwise, one will reject the other and they adjust their aspiration levels.
Algor ithms of Mate Selec tion 2.11 The algorithms for mate selection are pivotal to a successful model.In microsimulation models there are typically two approaches -the stable marriage approach, and the stochastic approach (Bacon & Pennec 2007) -whilst agent-based models are more likely to have some sort of rules or heuristics for decision making (Spielauer & Vencatasawmy 2001).
2.12 One of the earlier algorithms for partnership matching came about from an applied mathematical problem which aimed to match students to colleges such that the utility of individuals could not be increased by swapping any pair of individuals (Gale & Shapley 1962).It was shown that there was always a combination which would meet this requirement.The application of this algorithm to marriage problems became known as the "stable marriage problem" (Gusfield & Irving 1989).Although this algorithm is relatively simple and mathematically elegant, it is not suitable for the empirical simulation of the New Zealand census data for a number of reasons.The model assumes that every member of the population can evaluate every other member of the population, which is both unrealistic and computationally expensive at a population level.Also the algorithm requires the participants to be able to explicitly rank one another.In real life, traits such as education are also not immediately obvious, and neither is information about a person's potential pool of partners.This means that one of the problems that must be considered for the matching algorithm is that of incomplete information.For more recent applications of the stable marriage problem, see Mumcu and Saglam (2008) and Saglam (2011).
2.13 One of the more famous matching problems which deals with the problem of incomplete information is the "Secretary Problem" (also known as the "Dowry Problem") (Freeman 1983).The basis of this "problem" is that, because of the way in which the interview and hiring process is set up, the "best" candidate might not be selected.By incorporating the concept of incomplete information (Ferguson 1989), the Secretary/Dowry strategy is a more realistic approach to partnership matching than the stable marriage algorithm.Although this strategy is more realistic than the stable marriage algorithm, it assumes that people in the population will wait until they have viewed or dated nearly 37% of potential mates before making a decision.Any reasonable algorithm must include some form of satisficing in order for it to be considered practical as a partnership choice model.
2.14 An alternative to the combinatorial-based approaches such as the stable marriage algorithm, is to use some sort of stochastic strategy.This is often referred to as Monte Carlo simulation and generally involves drawing random numbers and comparing them to some existing probability value.In a number of marriage studies (Bouffard et.al. 2001;O'Donoghue et.al. 2009;Perese 2002;Spielauer & Vencatasawmy 2001) these probabilities were generated via logistic regressions, but they may be drawn from other sources such as actuarial life tables or suitable probability distributions.

2.15
Two contrasting examples of stochastic methods are the DYNASIM (Zedlewski 1990) and APPSIM (Bacon & Pennec 2007) models and the Congressional Budget Office's Long-Term (CBOLT) model (Perese 2002).The DYNASIM/APPSIM model randomly sorts the bachelors and bachelorettes.The probability that the first available bachelor will partner the first available bachelorette is calculated by: This figure is compared to a random uniform number.If the random draw from a uniform distribution is less than the calculated probability then a match is made.
2.16 By comparison, the CBOLT model uses information about n couples to create an n-squared size dataset, where each male is paired to his real partner and then each other woman.A new binary variable is created, which takes a value of one for each male's actual partner, and each other woman with identical characteristics to his partner, and a zero otherwise.This binary variable is modelled by a series of covariates, using a logistic regression model.The resulting model is used to generate the probabilities of each match in the simulation.These probabilities are compared to randomly drawn values to determine which couples are matched together in the simulation.
2.17 The advantage of these kinds of stochastic approaches is that the simulation can be informed by empirical evidence, and it can incorporate variability through the use of random numbers.The downside of a stochastic approach is that it often requires more detailed information about the population or system that is being simulated, and can subsequently require further detailed data.
2.18 An additional problem with the logistic regression methods is that the way the data is formulated invalidates the regression assumption of independence.The algorithm works by creating a set of "hypothetical partners" for each male.It then uses logistic regression to generate the probability of the match.In reality, a person can only take one partner, so the additional "hypothetical partners" who are created are not independent observations, and therefore this has the potential to create bias in the logistic regression estimates.
2.19 A third approach that is seen more often in agent-based models is to use a set of sociological rules or heuristics for the agents in the model to make their partnership choices.These rules may be deterministic, or they may incorporate some kind of stochastic element into the decision-making process.For example, an agent may choose the partner with the most similar education level to themselves or consider a particular age difference to be ideal.Examples of such heuristics can be seen in Chen (2005) and Alam and Meyer (2008).

Model Implementation
3.1 Our purpose is to implement a model of marriage markets with real-world data of population scale -i.e. the New Zealand Census -and to test its robustness for different parameter settings.This section discusses how our review of the literature on partnership matching led to a model implementation that extends the current work in the area, and is achievable given the available data.
3.2 Although the logistic matching routines used by Bouffard et.al. (2001) and Perese (2002) are not practical with the New Zealand data, both highlight the value of a stochastic method over deterministic models, while Bouffard et.al.also suggests that simulating segmented marriage markets through the use of independent sub-markets will improve accuracy.The DYNASIM (Zedlewski 1990) and APPSIM (Bacon & Pennec 2007;Harding 2007) models both utilised a simple probability function, which was demonstrated to be effective and can be produced with the available New Zealand Census data.

3.3
The literature on the agent-based modelling of partnership choice is sparser than that of microsimulation.The models typically use small artificial datasets rather than real data, although some of the more recent literature has incorporated some level of comparison to actual data (e.g. Hills & Todd (2008) comparing to real age-at-marriage distributions).One of the reasons for this is that the agent-based models tend to focus on process-related factors or on the demonstration of emergent properties, rather than prediction.

3.4
The simulation models of partnering fell into three broad categories.The first was combinatorial methods such as the stable marriage algorithm.These methods had their origins in mathematical theory, and although they were mathematically elegant, they assumed that every individual had prior knowledge about every other individual to use in their decision making.It was also a computationally expensive algorithm, which would potentially require billions of iterations for a city-sized dataset.The second category was microsimulation models that tended to use empirical data to match their agents.These models tended to be either very data intensive or use very simplistic matching algorithms.The third category was agent-based models.These were more likely to use artificial data but work with more complex algorithms and matching heuristics.
3.5 Our algorithm builds on the ones used in the DYNASIM (Zedlewski 1990) and APPSIM (Bacon & Pennec 2007) simulation models.The simplicity and intuitive reasoning used in the algorithms of these two models was one of the appealing factors for using a similar style of algorithm.In addition, the algorithm also appealed because it could be applied to the census datasets without requiring additional information or adaptation of the data.Todd et.al. 2005).The two main reasons for this are that either a more complex method of allocating networks would complicate the model and possibly confound any effects that are seen, or there is insufficient information about the structure of social networks in the population of interest for any significant improvements to be made in the allocation of the networks.For this simulation there was no information about the social networks of New Zealanders and there was only limited information available in the simulation dataset that could have been used for allocating the networks.Beyond this, a more complex method for allocating the social networks could confound any patterns that are generated.
3.7 One of the improvements that this simulation makes over the DYNASIM and APPSIM models is the use of a competitive marriage market, where the couples with the strongest level of attraction are paired first.Since the number of comparisons required in a competitive partnership model make it computationally expensive, marriage models have tended to match agents as they go.This creates the problem that the agents that get matched first are not necessarily the most attracted to each other or the best match, but are in part just a by-product of being first on a randomly sorted list.Once an agent has been paired with a partner, they are no longer available to be partnered again and will not get added to any new social networks.

Method
4.1 The simulation model was programmed in Java and applied to real, unit-level micro data from the New Zealand Census.In order to deal with the large amount of data and the associated number of iterations involved in the matching algorithms, the code was run across a secure grid computer system.In addition to the increased processing power, the grid computer system also provided the high level of security that was necessary for the unit-level census data that was used as the main input for populating the simulation.
Simulation Data 4.2 The simulation is populated with unit level data from the New Zealand Census of Population and Dwellings in such a way as to create a simulation environment which closely resembles regions of New Zealand at each census date.

4.3
The agents in the model represent all those individuals who are unpartnered (not living in a married or de facto relationship) and aged between eighteen and thirty in the Auckland, Wellington and Canterbury territorial regions.This definition of "single" was necessary as the census does not provide information on non-cohabiting relationships.The regions were chosen for two reasons.Firstly, they are three of the largest territorial authorities, thus alleviating privacy concerns with the use of unitlevel data.Secondly, the three regions represent three different levels of ethnic diversity, from the high level of ethnic diversity in Auckland to the lower levels in Canterbury and Wellington.Due to privacy requirements the construction of the simulation algorithm and scoring method was constrained to using the age, education and ethnicity of the agents in each region.

4.4
The age grouping of eighteen to thirty year olds was used in order to create a fixed cohort that could be compared from one census to the next.The eighteen to thirty year old group at one census would become the twenty three to thirty five year old group at the next, allowing inter-census comparisons to be made and validation of the results to be performed.
Simulation Appr oac h 4.5 The model is based on the DYNASIM model (Zedlewski 1990) which was used to simulate partnership as part of a taxation model on American data and has subsequently been applied to a national level simulation (APPSIM) of Australian data (Bacon & Pennec 2007).To allow for model transparency and replicability the full simulation code is available from: https://researchspace.auckland.ac.nz/bitstream/handle/2292/5823/02whole.pdf?sequence=6.However, the data used in the simulation is covered by a privacy agreement with Statistics New Zealand so cannot be provided.

4.6
The premise of the model is that each single male agent is initially assigned a random "social network" of potential female partners.Each of these potential partners is assigned a score using an exponential function that is based on the DYNASIM and APPSIM models.Starting with the couple with the highest score, partnerships are formed and those agents are removed from the system.The scoring of men by women and women by men is symmetrical so matches are based on mutual attraction.The total number of partnerships formed at each time step in the simulation is determined by dividing the total number of partnerships that were actually formed over the five-year census period by the number of time steps used in that simulation.Additional female agents are then added to the social networks, simulating the male agents "meeting" new people.
The three cities are treated as three separate simulations as they are geographically separate and only a small amount of mixing would be expected between them.However, there is no geographic segregation of social networks within each of the cities.
4.7 One full execution of the simulation represents a five-year census period.It is run for a pre-determined number of time steps, where each time step represents a period of five years divided by the number of time steps that are used.The default number of time steps used is five, meaning that each time step represents one year.Once the simulation completes the final time step a cross-tabulation of partnerships by ethnicity and a calculation of the deviation from the actual census figures are generated.The simulations for each of the three regions are run independently of one another.
Mate Selec tion Algor ithm 4.8 The simulation starts by having each male agent form a randomly assigned social network of female agents.This is the initial pool of women that will be evaluated as possible partners.

r o m h i g h e s t s c o r e ) E N D F O R E A C H s i n g l e -m a l e R e m o v e p a r t n e r e d i n d i v i d u a l s I n c r e m e n t a g e o f a g e n t s E N D F O R E A C H t i m e -s t e p
4.9 The potential partnerships of each male agent with each female agent in his network are scored using an exponential function which is based on the DYNASIM and APPSIM models which is shown below.The scoring mechanism incorporates the similarity of the age and education levels of the agent, a stochastic "attraction" factor, an observed macro factor (in this set of experiments the number of relationships with the same ethnic pattern observed in the previous time step), and an age dependent component.This simulation incorporates the decaying expectations into the main scoring function rather than matching all couples above a certain threshold score.This is because the simulation sets the number of couples that will partner in each time period at the outset of the simulation and then matches the couples in order, starting from the highest attraction score.

4.10
The attraction score between male i and female j is calculated by: Score i,j = exp(-sqrt( threshold + scoring variable)) where: Threshold = 80 -age i -age j and the scoring variables and ranges are shown below in Table 3.
T 4.11 The scoring structure was based on the APPSIM model described in the "algorithms of mate selection" section (using the exponential function and the age and education differences).It was also constructed in a way that would allow for multiple scoring variables to be weighted and combined within the exponential function in future research (which is why the threshold and age decay component was included for the testing of each scoring variable, and the similar ranges of scores for Education, Macro and Random were chosen).
4.12 At each time step, once the scores have been allocated, N/T couples are formed, where N is the net change in the number of couples in the age cohort over that five year census period and T is the number of time steps for that particular simulation.This method was one of the improvements that APPSIM made over DYNASIM, ensuring that the simulation will produce the correct number of couples seen in the census data.For this simulation it allows for a much easier comparison of the ethnic patterns within the simulation output.

4.13
The simulation algorithm requires the male agents to form social networks of the female agents.To ensure that this does not create different patterns from having the females select the males, the simulation was run with the male and female roles reversed.Given the symmetrical nature of the scoring/preferences, there was little change in the frequencies and patterns of ethnicity between the male-led and female-led simulations.

Results
5.1 There are two subsections, the first examining the effect of changing some of the internal parameters of the model, and the second presenting the outcomes of running the simulation with each of the four scoring variables.The number of actual partnership formations is calculated by taking the difference in frequencies between the eighteen to thirty year-olds in the simulated census period and the twenty-three to thirty-five year-olds in the following census.For some groups, this net change is quite small, so the main focus is on the larger ethnic groups.One example of this is the number of couples where both partners are Maori.Although this group is fairly large overall, the net changes in the tables are relatively low.This is partly due to the small net change in the number of partnerships, but also due to changes in the self-definition of ethnicity (Carter, Hayward, Blakely, & Shaw 2009).Since there are so many combinations of year, region, ethnicity, and simulation parameter, only selected results are shown.
Changing Inter nal Par ameter s 5.2 The first step in testing the model was to examine the impact of varying some of the internal parameters of the model.This was done in order to check that ethnic patterns produced by the simulation were not just a by-product of using a particular parameter setting in the simulation.The effect of varying the initial size of the social network, and the number of time steps were examined.In addition, the simulation was run with the gender roles reversed to investigate whether there was any gender-based asymmetry in the patterns created by the simulation.The frequencies presented are for age difference scoring but these patterns were consistent for the other scoring variables as well.
T  4 shows a selection of simulated frequencies (numbers of couples) for the sensitivity analysis of the size of the social network.The "only" refers to agents who hold only a single ethnic group (ie Maori only is an agent who belongs only to the Maori ethnic group).Two regions and time point were used to test the social network sizes of 10 people, 50 people and 100 people.A social network with 500 people was attempted for Canterbury but not for Auckland as it was too computationally expensive to complete.There are some slight reductions in the number of European/Asian and European/Pacific couples as the size of the social network increased, but otherwise the frequencies were very similar.More ethnic combinations are shown for Auckland since the simulated frequencies were larger.5.4 Table 5 shows the effect of the number of time steps used in the simulation.Overall, there was little variation in the simulated frequencies across the different numbers of time steps per simulation.The major constraint with increasing the number of time steps for the remainder of the simulations is the additional time the simulations would take to run.Since there are five years between each census, using five time steps equates to having an annual process.Five time steps provide sufficient opportunity for the macro variable to recalculate.Increasing the number of time steps to ten for the sensitivity analysis slowed the programme down to the extent that it was not practical to use it for the larger data sets.

Table
5.5 Both Table 4 and 5 show some variation in the estimated number of couples for the different combinations of ethnic groups, depending on the number of time steps and the size of the social networks.The counts are not being compared to actual census data so are not under or over-estimates.What they do represent is some slight variations in estimation as the parameters are varied, together with the natural variation of the social process of partnership matching (where running the same simulation several times will produce similar but not identical results).Qualitatively, the patterns remain similar when the parameters are varied.This allows the patterns of ethnicity to be examined relative to the census counts without worrying that these patterns are a by-product of social network size or the number of times steps.
Single Par ameter Weight Res ults 5.6 After examining the effects of varying the internal model parameters, the simulation was run using each of the scoring variables in isolation.This was done in order to test the feasibility of the model by examining the effect of each of the characteristics individually, before considering further work to combine them.Repeated trials of each simulation were run to ensure that the results were stable.However, due to the computational time required per trial, too few trials were run for it to be worthwhile creating standard deviations and confidence intervals.Due to small frequencies, and limits on space, the mixed ethnicity results are presented together and are not analysed separately by gender.
T 5.9 Table 8 shows a selection of the mixed ethnicity partnerships.The number of mixed European/Maori partnerships is overestimated by most of the scoring variables in most of the periods other than 1981.The random variable and macro variable produced the largest over-estimates in all three regions.The number of Asian/European mixed partnerships was consistently over-estimated by the simulation.The random scoring variable had the highest over-estimates in most of the census periods.
The numbers of Pacific/European mixed partnerships are heavily over-estimated by all of the methods, particularly in Auckland.As with the previous mixed ethnicity groups, each of the scoring methods tended to produce over-estimates.The random scoring variable created the largest over-estimates in Canterbury, Wellington, and in the earlier census periods in Auckland.For the later census periods in Auckland, the macro scoring variable creates the largest over-estimates.Discussion 6.1 The purpose of this paper was to review the literature relating to the simulation of marriage markets, and to introduce a simulation model that addressed some of the shortcomings identified.The literature in the area was divided into two distinct groups: micro-simulation and agent-based simulation.The micro-simulation models discussed tended to operate at a realistic scale, but with very simple matching algorithms (often a Monte Carlo "roll the dice" styled decision rule).In contrast, the agent-based models used small, artificial data sets, but had more complexity in terms of how the agents viewed and chose partners.This simulation model bridges the gap between the areas, using real world data, but with a more complex matching system than current micro-simulations.There have been no previous attempts to simulate New Zealand marriage markets, so it is difficult to benchmark the simulation.
6.2 The empirical simulation model was applied to unit-level census data.Although privacy requirements meant that the number of variables about each agent were limited, the data still provided unit-level information about all of the singles in each of the regions of interest.At each time step the male agents in the model examined a social network of possible female partners.
Those who had the highest score in the matching algorithm were paired off and removed from the system.Their social networks were then extended and the process repeated in the next time step.The model parameters were examined to confirm that the size of the social networks and the size of the time steps were not affecting the partnership matching.Simulations were then run to examine how each of the scoring variables affected the ethnic patterns in the data.The sensitivity testing of the model parameters showed that the model was robust to varying the size of the social network and the size of the time steps had little impact on the ethnic patterns that were created.
6.3 One of the strengths of the study is that the agents in the simulation are the actual unit-level records for the entire population of the selected regions.They are not scaled up from a census sub-sample (Pennec & Bacon 2007), nor have they been reverse-engineered from frequency tables in order to match marginal distributions (Bouffard et.al. 2001).They are the actual unit level records for the sub-population that is being studied.Beyond this, the algorithm and matching extend the APPSIM (Bacon & Pennec 2007) model.The simulation results show the feasibility of combining micro-simulation styled "big data" with agent-based simulation matching and sorting algorithms for examining patterns and matching dynamics.
6.4 A final consideration for this simulation model is whether it can provide any meaningful information about marriage matching, ethnic patterns and marriage markets in New Zealand.The simulations showed that a number of the patterns in ethnic partnering were qualitatively similar in the simulations that used age and education for matching to those that actually occurred.This suggests that these variables could play some part in the patterns of inter-ethnic cohabitation in New Zealand.However, they did not fully replicate the patterns, and in particular tended to under-estimate the homogamous partnerships.This indicates that there is some degree of ethnic preference that is not being captured by the model.

6.5
The "macro" scoring, where agent partnering decisions were not based on an individual ethnic preference, but were influenced by the patterns of ethnic partnering of the cohort at the previous time period, showed a much closer match of ethnic patterns to the census data.Although this could not be considered conclusive proof of an emergent pattern or a micromacro link, it does provide encouragement to undertake further examination and experimentation with these simulation models for emergent properties in the New Zealand marriage market.
6.6 The simulations produced a mixture of under and over-estimates for the different partnering combinations.This was most evident with the Auckland estimates, where the number of homogamous partnerships for the various ethnic groups were generally under-estimated and the number of non-homogamous partnerships were over-estimated.The age and education variables tended to produce the lowest estimates for the number of couples in each group.However, the simulated frequencies were not completely unrealistic, indicating that a city level simulation of partnership matching is feasible.The combination of under-and over-estimates provides a case for future research in the area, looking at possible optimisation methods for combining the scoring variables.
6.7 It is not possible to give a single reason for the mixture of under and over-estimates in the simulated number of couples for the different combinations of ethnic groups.However, there are three main factors which between them provide the most compelling explanations for these under and over-estimates.The first factor is that the agents did not have an explicit ethnic preference in their partner selection.This could explain why there was under-estimation for a number of the homogamous ethnic combinations, where there were fewer same ethnicity matches in the simulations than actually occurred.This would also suggest that people do, either consciously or sub-consciously, have ethnic preferences in partner selection.The second factor is the assumption of random social networks.While the random allocation of agents to social networks was justified due to a lack of data about how such networks behave in New Zealand, and the random allocation was able to provide a more simple structure for the model, it would also explain why there tended to be over-estimates of the partnerships between one European Only partner (which was the largest ethnic group) and one minority partner.The third explanation of under and over-estimates is that partnership matching is a complex process, and in reality these decisions are not made across a single dimension.In addition, the variation in under and over-estimates also provide a direction for future work, examining the effect of combining the scoring variables in the simulations.Sanderson (1998) describes how benefit can be gained by combining forecasts if they are not highly correlated.There is no evidence of the under and over-estimates in the simulation being correlated, which would indicate that partner decisions based on more than one scoring variables would improve the accuracy of the simulation.An extension of this is that weighted combinations of variables could enable further insights into the partnership process itself by looking at how estimates vary as their relative weights vary.

Conclusion
7.1 This paper demonstrated an empirical simulation model of marriage matching to examine how New Zealand marriage markets operate.Census data was used to populate the model, and age similarity, educational similarity, the rate of inter-ethnic partnership in the previous time period (referred to as the macro variable), and a random stochastic factor were each used to pair agents.The simulations produced mixed results, but with sufficient accuracy to indicate the model is feasible and further development of the model would be worthwhile.Beyond this, the model also provided evidence of ethnic preferences in partnership choices in New Zealand marriage markets.
7.2 Having demonstrated the feasibility of partnership matching simulation using census data, there are several methodological and substantive implications for future work in the area.The combination of under-and over-estimates in the ethnic patterns indicates that finding an optimisation method for combining the scoring variables could produce a significant increase in the accuracy of the simulated results.Furthermore, being able to combine the scoring variables will allow for a closer examination of the ethnic patterns, with a view to exploring emergent properties in New Zealand marriage markets.

3. 6
Although there is evidence that social networks often exhibit homogamy (McPherson, Smith-Lovin, & Cook 2001), most simulation models still use randomly allocated social networks (Bacon & Pennec 2007; Hills & Todd 2008; Todd & Billari 2003; C H s i n g l e -m a l e A p p e n d s o c i a l -n e t w o r k S c o r e a l l p o t e n t i a l p a r t n e r s i n s o c i a l n e t w o r k S o r t a l l p a r t n e r s c o r e s M a t c h p r e -d e t e r m i n e d n u m b e r o f c o u p l e s ( f Data is set up with each male paired with every possible female partner.Logistic regressions are run with outcome 1 for actual partner and every other woman with the same characteristics, and 0 otherwise.
Data is set up with each male paired with every possible female partner.Logistic regressions are run with outcome 1 for actual partner and every other woman with the same characteristics, and 0 otherwise.Transition probabilities from this model are used in Monte Carlo in the midto late-1980s.Since 2000, following improvements in computing power and the availability of new programming languages and simulation tools, the number of publications has increased, in particular thanks to a number of different collaborations involving Peter Todd of the Max Planck Institute for Human Cognitive and Brain Sciences ( http://www.cbs.mpg.de/index.html)

Table 2
able 4: Varying social network size Table6shows the actual and simulated numbers of homogamous (both partners of the same ethnicity) European couples for each of the time periods, in each of the regions.It shows that the number of European/European couples in Auckland was underestimated, particularly in the later census periods where all of the scoring variables produced very poor estimates.By comparison, Canterbury had the most consistent and accurate simulated frequencies for all of the scoring variables.The macro variable was the least consistent of the individual scoring variables for Auckland and Wellington.In the earlier periods it produced higher estimates than the other scoring variables (over-estimates in the case of Wellington), but by 1991 in Auckland, and 1996 in Wellington, it was producing the biggest under-estimates.Table7shows the simulation results for a selection of other homogamous ethnic combinations.The number of homogamous Asian Only couples estimated via the simulations was quite consistent across all of the regions and census periods.Unfortunately, this led to under-estimation of the frequencies in Canterbury.As previously mentioned, one difficulty with interpreting these figures is that the net changes between censuses for this group were very small.The macro variable produced the highest estimates for all three regions, and had the highest number of over-estimations.The age variable tended to produce the lowest estimates, followed by the education variable.As with the Asian/Asian partnerships, the Pacific/Pacific partnerships are significantly underestimated in Auckland.This is most noticeable in Auckland where the simulated frequencies were similar to the other regions, but much lower than the actual values.The actual frequencies in Canterbury are very low, and over-estimated by the macro and random methods, but very closely estimated with the education variable.