Agent-Based Modelling to Assess Community Food Security and Sustainable Livelihoods

We present amethodological approach for constructing an agent-basedmodel (ABM) to assess community food security and variation among livelihood trajectories, using rural Malawi as a case study. The approach integrates both quantitative and qualitative data to explore how interactions between households and the environment lead to the emergence of community food availability, access, utilisation and stability over time. Results suggest that livelihoods based upon either non-agricultural work or farming aremost stable over time, but agricultural labourers, dependent upon the availability of casual work, demonstrate limited capacity to ‘step-up’ livelihood activities. The scenario results suggest that population growth and increased rainfall variability are linked to significant declines in food utilisation and stability by 2050. Taking a systems approach may help to enhance the sustainability of livelihoods, target e orts and promote community food security. We discuss transferability of the methodological approach to other case studies and scenarios.


Introduction
. The aim of this paper is to develop a methodological approach to enable the construction of agent-based models of community food security in developing country contexts where regional (sub-national) data sets are available. Measurement of food security has tended to concentrate on either entire nations or individual households (Carletto et al. ; Pinstrup-Andersen ). However, rights-based approaches have prompted a renewed interest in community food security, an evolving concept that advocates long-term systemic approaches to address food insecurity in an equitable and sustainable manner (Jarosz ). Community food security can be defined as "a situation in which all community residents obtain a safe, culturally acceptable, nutritionally adequate diet through a sustainable food system that maximizes self-reliance and social justice" (Hamm & Bellows , p. ). It di ers from household or national food security, as it emphasises the complex nature of food systems, which are embedded within dynamic social, ecological and economic processes (Kaiser ; Thompson & Scoones ). Community food security pays attention to interactions between system components such as households, institutions and the environment and the emergence of diverse food systems and food security outcomes (Hamm & Bellows ; McCullum et al. ). .
The inherent complexity of community food security poses a significant challenge to the design and implementation of appropriate development programmes and policy (McCullum et al. ). Indeed, community food security is an emergent property of household food security, which is shaped by the way in which households interact, acquire and utilise assets within a context of vulnerability (Chambers & Conway ; Scoones ). The multiple interactions between the various factors that a ect the livelihoods of households give rise to o en complex and non-linear system behaviour (Chambers & Conway ; Scoones ). .
Within developing countries, the livelihoods of rural households remain largely dependent upon agriculture. This article uses rural Malawi as a case study. It is a small, landlocked country home to approximately million .
Greater understanding of the relationships amongst climate, population, food and livelihoods is necessary to guide policy programmes and actions intended to sustain or improve the livelihoods and food security of communities in many developing countries and smallholder dominated areas. The applied questions that motivated this research are: how do interactions between households and the environment lead to the emergence of community food security? How is increased rainfall variability and population growth likely to impact future food availability, access, utilisation and stability? And how will increased rainfall variability and population growth a ect household livelihood trajectories over time?
The Potential of Agent-Based Modelling .
Agent-based modelling provides a useful simulation tool to address these questions (Balbi & Giupponi ; Balbi et al. ). It represents a bottom-up approach in which interactions at the local level lead to the emergence of patterns at the macro-level (Epstein & Axtell ). Agent-based simulations enable the heterogeneous nature of households, individuals and the environment to be taken into account (Epstein ). ABM's also employ a dynamic approach that allows the trajectory of households and individuals to be traced over time (Valbuena et al. , ). A key advantage of the technique is its ability to represent decision-making and behaviour (Smajgl & Bohensky ; Smajgl et al. ). Finally, agent-based models can integrate data from multiple sources, both qualitative and quantitative, which is particularly useful within data scarce contexts (Janssen & Ostrom ; Robinson et al. ). In data poor regions, such as our case study area of southern Malawi, we suggest that the scarcity of community or village data can be overcome using a typology-based approach. The ABM can be built upon regional data that tends to be more easily available. The paper demonstrates how the ABM can then be supplemented with context specific data to tailor development programmes and policies that address community food security. .
For simulation outputs to be of use to decision makers, the model must be credible (Verburg et al. ). A range of technical, methodological and epistemological uncertainties may act to undermine model credibility (Funtowicz & Ravetz ). According to Reilly & Willenbockel ( ), technical uncertainties relate to the quality of data available to calibrate the model. Methodological uncertainties arise from knowledge constraints. There may not be su icient knowledge with which to construct an accurate representation of the system at hand. Finally, epistemological uncertainties are concerned with model completeness. A number of factors, including stochasticity inherent to social-ecological systems, changes in human behaviour, technological innovations and 'black swan' events, may pose great uncertainty over time (Reilly & Willenbockel ). In order to ensure model credibility, uncertainty analysis can build confidence that outcomes are representative of the complex social ecological system at hand, rather than artefacts of parameterisation. In the present case, we use expert knowledge and empirical data to validate the model both quantitatively and qualitatively. .
The paper begins with a description of the study site and modelling approach. In Results and Discussion we first present the e ects of population growth, rainfall variability and market projections on food security, considering both the four pillars at the community level and the household livelihood trajectories. We then consider the limitations and the benefits of the modelling approach, using rural Malawi as a case study.

Study Site and Methodology
. This study analyses rural households located within Southern Malawi. Over % of the population live on less than one US dollar a day and the proportion of ultra-poor people (defined as the proportion of the population below the minimum level of dietary energy requirement) is highest within Southern Malawi at approximately . % (Gondwe ). Villages within rural Malawi are highly heterogeneous. Households di er with regards to the assets they possess and the trends, shocks and seasonal shi s they are exposed to (Kamanga et al. ; Chilongo ).
. Two exogenous drivers, population growth and climate change, appear to be highly relevant to food security outcomes. Africa is the only region in the world expected to demonstrate sustained population growth until (Jayne et al. ). In Malawi, the rural population is anticipated to grow from approximately . million in to almost million by (UN ). The share of young people is also increasing over time (UN ). Within Africa as a whole, Fine et al. ( ) estimate that approximately million people will enter the labour force between and . Over the same period it is estimated that the non-farm sectors will generate just million wage jobs (Fine et al. ). Agricultural work will therefore remain an important livelihood strategy for Africa's expanding young labour force. Climate change provides an additional stressor a ecting livelihoods and food security (Connolly-Boutin & Smit ). Here, changes to climatic patterns manifest over longer time frames, whilst changes in the frequency and severity of extreme weather events can be felt over shorter time periods.

Modelling approach .
The modelling approach required an iterative development process that comprised a number of stages (Figure ) and di erent data sources incorporated into each. The remainder of this section introduces the data sources before moving on to summarise the main stages of the approach. Data sources Regional data .
Regional data for this study came from Malawi's Third Integrated Household Survey (IHS ) (NSO ). The National Statistical O ice of Malawi (NSO) conducted the survey from March to March . The main objective of the IHS was to provide and update information on the welfare and socio-economic status of Malawian households. Four questionnaire instruments were employed including household, agriculture, fishery and community questionnaires. The survey selected households based on a two-stage stratified sampling process and a Probability Proportional to Size (PPS) design. As a result, the sample was representative at national as well as district levels. A total of , households were sampled, made up of a cross-sectional sample set ( %) and a smaller, panel sample set ( %). Cross-sectional households were visited once in / , whereas panel households were visited twice: once in / and again in . The panel sample wasn't publicly available at the time of our study. For this study, cross-sectional households from rural areas of southern Malawi were extracted to give a sample of households. This data was utilised for the ABM development to represent a hypothetical village within Southern Malawi.

Village data .
Household-level data for a village in Southern Malawi was collected over a period of four days in July as part of a larger research project. Four trained Malawian enumerators used a household questionnaire to collect information on farming practices, crops planted, harvested and sold, other income generating activities, perceived food security, and socio-demographic characteristics of the households. A er a village mapping exercise, in which three village representatives listed the household heads and mapped their locations, all households (n = 46) were selected (census) to participate. When the listed household head was not available, the partner or another adult ( years or above) was interviewed. Three households were not home and therefore not interviewed. Village data was used for parameterisation purposes as described in Sections . -. . To this end, village data were clusterized with the same variables of the regional data.

Cluster analysis .
A cluster analysis was performed twice, once during the initial model design stages and again as part of the validation process. The initial cluster analysis used regional data to construct a typology of households within rural Southern Malawi (see Dobbie ). Using variables based upon land, labour, livestock assets and gender, three distinct clusters were identified and labelled: farmers, agricultural labourers and non-agricultural workers, respectively (Dobbie ). A subsequent cluster analysis used the same variables to enable the integration of village data into the model. This provided a village-level case study, which formed a key component of the validation process.

Expert knowledge
. This study benefits from an informal association with the project 'Attaining Sustainable Services from Ecosystems through Trade-o Scenarios' (ASSETS), which aims to "explicitly quantify the linkages between ecosystem services that a ect and are a ected by food security and nutritional health for the rural poor at the forestagricultural interface" (http://espa-assets.org/). Expert knowledge was drawn from project partners at the University of Southampton and LEAD-SEA, Malawi, throughout the modelling design process to iteratively validate the structure of the ABM and test agents' behaviour. The latter stage included a role playing game devised to test the land allocation decision (more details in Sections . -. ).
The initial model development process involved a number of iterative steps, including i) clarification of model aim, ii) conceptual model development, iii) design and implementation of the ABM, and iv) validation. A detailed explanation of the model process is provided by Dobbie & Balbi ( ). A number of improvements have since been made to the model, which is presented here using a summary of the Overview, Design and Details (ODD) protocol (Grimm et al. , ). The extended ODD protocol and model code are available online (https: //www.openabm.org/model/5170/version/2/view).
The purpose of the model is to simulate the behaviour of households within a village and observe the emerging properties of the system in terms of food security. The model draws upon the Sustainable Livelihoods Framework (Chambers & Conway ; Scoones ) to consider food security outcomes of di erent livelihood strategies. A key aim of the model is to quantify the multiple dimensions of food security (namely food availability, access, utilisation and stability) at both the household and village level. .
Households are the main entity and are divided into three types: i) farmers, ii) agricultural labourers and iii) non-agricultural workers. The main attributes of households include human, physical, natural and financial capital. Individuals belong to households and are defined by their gender, education, and age. Households and individuals are initialised using empirical data from the third household survey (IHS ) for Malawi (NSO ) and as a result are highly heterogeneous. The total number of households at initialization is : farmers, agricultural labourers and non-agricultural workers. This is based upon the average number of households registered within villages in Southern Malawi in according to population data from MASDAP (http://www. masdap.mw/).

.
Households interact through a social network, which is modelled as a 'small world' with characteristically short average path lengths and high clustering (Watts & Strogatz ). The social network is used by the households to access labour opportunities and food donations. This assumption is based upon results from the IHS data combined with evidence from the literature (Gebremedhin et al. ; Spielman et al. ; Ligon & Schechter ; NSO ). Following the 'small world' assumption, the social network is initialized with an average degree (i.e. number of connections per household to access opportunities) of . , an average path (i.e. shortest path between all pairs of households) slightly above and an average clustering coe icient (i.e. the ratio of household's connections that are connected among themselves) of . .

.
The current environment represents a hypothetical village within Southern Malawi. Based upon IHS data, the village encompasses approximately hectares made up of farmland, dimba , forest and water. At initialization farmland is set at around ha (making it less than a hectare per farmer) while forest area is set at ha in total. The environment is represented as a stylised D grid of patches with each patch corresponding to an area of land of variable size. Key attributes of the di erent patches include: size (in hectares), fertility (kg of fertiliser applied) and ownership. These are initialised using plot level data from the IHS (NSO ). Households can own both dimba and farm plots, whilst forests and water remain communal. The model runs on a monthly time-step. The location of patches and individuals or households has no e ect on model outcomes as it is assumed that the village boundary is small enough for individuals (and households) to access farm plots, dimba and forest within any given month. Other entities are captured in Figure and a more detailed description and justification of the state variables that characterise each entity is provided as part of model documentation online (see ODD available online).

Process, overview and scheduling .
During each monthly time step households go through a sequence of processes from resource allocation to harvesting and adopting coping strategies which combine to give village-level outcomes in relation to land use, food production and food security status ( Figure ). During simulations described here, the model loops through months, representing years from to . Each time-step begins by defining the month of the year and the corresponding agricultural season. Basic needs, defined in the IHS in the form of food, water and fuel, are then calculated for each of the households. Total labour availability (in hours per month) is also calculated for the household. This is based upon the household type, number of working adults, gender and health. Household labour is allocated between productive activities, including ïňĄrewood collection, water collection, on-farm agricultural activities, o -farm agricultural activities and o -farm non-agricultural work. The proportion of time spent by the household on di erent productive activities is set according to household type using averages calculated from IHS data (NSO ).

Figure :
The sequence of processes conducted by each household during a monthly time-step. Inputs are listed on the le -hand side and outcomes on the right. Outcome variables at the household level can be aggregated to give indicators of land use, productivity and food security at the village level.
. At the beginning of the agricultural season, households decide on which crops to grow. Eleven di erent combinations of basic grains, annual roots, permanent roots, nuts & pulses, fruit trees, vegetables and cash crops are possible. Decisions are constrained by land, labour, subsistence, input and knowledge requirements. In the months that follow, households are able to adjust land allocation decisions based upon labour availability. In addition to farming, households may also tend livestock, forage for wild and indigenous foods and carry out o -farm agricultural activities such as casual farm labour (ganyu) and non-agricultural employment. .
Decisions surrounding the extraction of firewood and water are simulated using a modified version of a common pool resources model described by Agrawal et al. ( ). Time spent upon both casual labour and nonagricultural work is multiplied by an hourly wage estimated from household survey data. Output in calories for time spent foraging for 'wild' foods on the other hand, is drawn from a distribution consistent with ISH survey data. Time spent tending to livestock is also multiplied by an expected hourly output for meat, eggs, milk and manure. A further procedure for livestock then determines the proportions of outputs that are eaten, sold, or lost. It is assumed that all stored outputs are eaten within the monthly time step. .
Towards the end of the time-step the four dimensions of food security, namely availability, access, utilisation and stability, are quantified for each household. Crop production is assumed to be a ected by the availability of land and labour as well as rainfall. Food availability is determined based upon the amount of calories available from self-production and the market. The total number of calories from crops, livestock products and forage is first summed. Surplus calories are then calculated as the di erence between food-needs and calories from food availability and spending capacity (the di erence between household income and non-food expenses). If surplus is greater than zero it is divided into a calorie-pool that can be donated to members of a household's social network. If surplus is less than zero it is converted into a calorie deficit.
. Food access is defined by the amount of calories accessible from food production, market purchases and coping strategies. It is calculated as a sum of equivalent calories from food production, spending capacity, payment for work programmes, borrowing food from the social network and sale of livestock. The ability of a household to process this food dictates food utilisation. Potential calories are determined by food access. Actual calories can then be calculated by multiplying potential calories by the process-ability value. This is a percentage value that takes into account the proportion of water and fuel needs the household has met, as well as household health. Whether food needs of the household have been met or not is then determined and stocks of water and fuel are also updated.
. Food stability is a function of market stability, political stability and production stability. Market stability is defined as the coe icient of variation (CV) in annual maize price: this dataset is provided as international market scenario (see Sections . -. ). Political stability is a global variable calculated as the mean of the CV of the proportion of households with access to inputs and the CV of households with access to payment for work schemes (Beegle et al. ). Production stability is a local variable calculated as the CV of household maize output for the given month. This allows multiple scales to be taken into account when evaluating food stability. Finally, food security is determined based upon food availability, access, utilisation and stability. Using techniques from fuzzy logic (Bosma et al. ; Zadeh ), each household returns a value between and with being the lowest and , the highest (further details are given in the extended ODD available online).
. A total of time-steps constitute an agricultural season, running from June to May the following year. The livelihood strategy, or 'type' of a household may be adjusted at the end of an agricultural season. This is based upon the proportion of time allocated to farming, agricultural labour and non-agricultural work. In line with Dorward et al. ( ), households persevering with the same livelihood strategy, or type are considered to be 'hanging in', those households who move to a type of higher yields and/or income compared to previous years are classified as 'stepping up' and households shi ing into new, more productive activities are termed 'stepping-out'. Households following a trajectory of declining yields and income are regarded to be 'falling down' (Figure ). The model was implemented within Netlogo . . (Wilensky ). Three model extensions have been used: array, network (Wilensky ) and NLfuzzy (Machálek et al. ).

Uncertainty analysis .
Once constructed, we employed two techniques to explore model uncertainty. Firstly, consistency analysis provided an indication of the number of simulation runs necessary to reduce stochastic uncertainty. Secondly, we determined the e ect of parameter estimation on simulation results (Alden et al. ). .
To conduct the consistency analysis, distributions of simulation outputs resulting from model runs using identical parameter values were compared using Simulation Parameter Analysis R Toolkit Application (SPARTAN) (Alden et al. ). The number of runs required to ensure statistical consistency of outcomes was determined by altering the number of replicates within each distribution. In this case, a total of distributions were used and sample sizes of , , , and model runs were analysed. For a sample size of , each of the distributions contained the results of runs, etc. A distribution of median model outcomes responses for each simulation run was then generated for each of the subsets. Distributions to were compared with the first distribution using the Vargha-Delaney A-Test. This is a non-parametric e ect magnitude test that provides a statistical measure of the di erence between two distributions (Vargha & Delaney ). Samples from two distributions were contrasted and the probability that a randomly selected sample from one distribution would be larger than a randomly selected sample from the other was calculated. In agreement with Vargha & Delaney ( ) A-Test scores above . or below . indicated a significant di erence between distributions and . indicated no di erence. A sample size was deemed suitable when no statistical di erence was found between the first set of A-Test scores and the remaining distributions. .
The maximum A-Test score for each simulation outcome over the result distributions is shown for all sample sizes analysed (Figure ). Attention was paid to outcomes in the form of daily food energy consumption per capita (kcal per capita per day) and the proportion of calorie deficient households (%). Results are disaggregated based upon household type, namely farmers (h ), agricultural labourers (h ) and non-agricultural workers (h ). Results from the analysis implied that reducing the e ect of stochastic uncertainty on simulation results to less than 'small' requires at least model runs. Figure : Maximum A-Test score for each simulation response over the result sets for sample sizes: , , , , and . Measures include the proportion of food energy deficient households (prop.defic) and the daily food energy consumption per capita (fecc), disaggregated for farmers (h ), agricultural labourers (h ) and non-agricultural workers (h ). The e ect of stochasticity upon simulation responses are shown by horizontal lines and described as small, medium or large dependent upon A-Test scores (see accompanying text). .
Five simulation parameters for which values are currently unknown were analysed for parameter robustness. These included: the number of times a household can call upon its social network for i) labour and ii) food in a given month, n-l-interact and n-f-interact, respectively; as well as the e iciency of markets m-e iciency, the availability of non-agricultural work nag-avail and multiplier, a value that limits the amount of calories individuals can consume in a given month. A local sensitivity analysis was conducted, perturbing each parameter independently of all others, which were maintained at baseline values (Table ). Simulation outcomes under perturbed conditions could then be compared using the Vargha-Delaney A-Test described above (Vargha & Delaney ). If altering the value of a particular parameter from a baseline or calibrated value had a significant e ect on simulator output, the simulation was deemed highly sensitive to that parameter and caution applied when interpreting the result and establishing a value for that parameter. .
A significant e ect on simulation responses was uncovered for four of the parameters, including: n-f-interact, m-e iciency, nag-avail and multiplier (see the Appendix for more details). The number of times a household can draw upon its social network for labour, n-l-interact had little e ect on simulation outcomes, however.

Model validation .
The model was validated using both qualitative and quantitative approaches during di erent stages of the design and implementation process. A role playing game was devised to test the behavioural rules underpinning key decision-based procedures within the ABM. A total of experts associated with the ASSETS project took part in a two-day workshop convened in January . Participants took on the role of a household and followed decision tree rules to allocate land to cropping strategies, interact with social networks to borrow/donate labour or food and update financial capital. Following the exercise, a discussion was facilitated to evaluate the behavioural rules of households and determine whether alterations to the model code were required.

.
The generic village-level model was parameterised using case study data. A total of household agents were created, with attributes corresponding to the case study data. The model was run for time-steps from May to June , to reflect the data collection time-frame. Mean results from model simulations were then compared with the empirical data, focusing on outcomes in the form of food security and land use at the household level (Figure ). . Initial results overestimated the number of months households are food insecure (Figure a). The root mean squared error (RMSE) was high at . months. While it would be possible to tune the model and reduce the RMSE, care needs to be exercised in interpreting the empirical data that the model is being compared with. The household food security data was compiled using an indicator based upon an individual's perception of household food security. Jones et al. ( ) recognise experience-based measures of food security may result in a broad range of response bias. Changing environmental conditions may cause respondents to alter internal standards of food security, resulting in 'response dri ' (Maes et al. ). One individual's perception of food security may not be representative of the household and it may be di icult to ensure the definition of recall periods across respondents remains consistent (Jones et al. ). Further research should use additional survey instruments such as food diaries or household consumption and expenditure surveys to estimate food consumption and the actual food security status of households. This will enable further model fine-tuning and validation.

.
Model results for land allocation decisions were much closer to empirical data, although the number of single crop systems was significantly lower (Figure b). The percentage area of land given to grain crops was predicted with a RMSE of . %. As with household food security data, land allocation data should be viewed with caution as measures of land allocation were based upon household recall and best guesses rather than empirical measurement. Future work will validate land allocation decisions against additional village case studies.

Scenarios .
The model was run from June to May . Over time, changes to climate, markets and population were projected. Climate variability was represented by annual rainfall. At the beginning of each model year, a value is drawn from a list of rainfall data. This list was generated using MarkSim, a third-order Markov rainfall generator that can be employed as a Global Climate Model (GCM) downscaler (Jones & Thornton ). Daily rainfall projections for Malawi were generated from to . This was based upon the average output of GCMs using the RCP . scenario, as defined by the IPCC (Van Vuuren et al. ) . Daily values were then aggregated to give an estimate of annual rainfall. .
Village-level population growth was approximated using rural population projections from the revision of world urbanisation prospects (UN ). As projections consider the number of individuals only, the growth in household numbers at the village level had to be estimated. This was achieved using the simple equation: where hh is the number of households, rpop are the rural population projections (UN ), prop is the proportion of rural individuals living in Southern Malawi and hh-size is the average size of households (based on census data for , and ). In order to simulate population growth, at the end of each model year, the number of new households to be created is read from a list. Households and individuals are created and initialised accordingly, drawing upon data from IHS . In order to allocate patches, each new household asks a member of its social network to spare their smallest patch of fallow land. Patches may also be split. This reflects the matrilineal nature of customary land tenure in Malawi (Takane ).
. The local market prices for food categories are provided as input to the agent-based model at initialisation. The model stores the annual market price of these commodities starting at for the following years. The market value of crops and livestock products such as milk, eggs and meat play an important role within the model. Changes over time are simulated using two well established global models: AGLINK-COSIMO (OECD & FAO ) and GCAM . (Capellán-Pérez et al. ; Kyle et al. ). The stability of food is an emergent property of market, political and production stability. Under the current scenario, although political stability remains fixed throughout, market prices are assumed to exhibit annual variation. For example, the price of grains per kg is projected to increase from . USD in , to . USD by .

Results and Discussion
Modelling of community food security . The four pillars of food security were quantified for each household and are summarized at the village level for farmers, agricultural labourers and non-agricultural workers (Figure ). Overall, non-agricultural workers tend to have greater food availability, access, utilisation and stability when compared with farmers and agricultural labourers. Taking into account population growth, rainfall variability and market projections, the availability and access dimensions of food security remain stable between and . Large declines in utilisation and stability of food however, are anticipated for all households by . Such reductions are the result of increased exploitation of the natural resource base over time. .
Indeed, the ability of households to utilise food is dependent upon access to su icient amounts of water and fuel as well as a household's health and wellbeing. Model outputs suggest that the proportion of household water needs met could decline from % in to % in . This is due to increased demand for water as the population increases. .
Simulation outputs show large variation in the production of grains over time ( Figure A). Non-agricultural workers are projected to experience a sharp decline in grain output between and . During this period the mean quantity of grain produced falls from . kg to . kg. Agricultural labourers also experience a severe drop in grain output, which fluctuates between . kg and . kg from onwards. Average annual grain output for farmers on the other hand, increases from . kg in to over kg by . Results for grain output reflect changes in the proportion of households with access to land ( Figure B), highlighting the importance of land tenure to food security outcomes over time. .
Although non-agricultural workers display higher food security in our simulations, community food security can only exist when all residents obtain a safe, culturally acceptable, and nutritionally adequate diet (Hamm & Bellows ). E orts must therefore be made to target policies and development programs towards improving the sustainability of livelihoods based upon farming and agricultural labour. .
Knowledge of livelihood strategies and food security outcomes at the community level generated by this research may help build shared understanding and capacity for action. Practice of community food security is in its infancy, however interesting parallels can be made to the African Millennium Villages. Since the year , a total of Millennium Villages have been initiated in sites in African countries (Sanchez et al. ). Science-based research and interventions at the community level are suggested to have enabled food energy requirements of households to be met (Sanchez et al. ). .
Complementing existing national and district-level conceptualisations of food security with village level perspectives could address scale mismatches present within social-ecological systems. National policies and regulations that are e ective over larger geographical scales can have unintentional consequences at finer scales in which local conditions may di er significantly from the mean (Cumming et al. ). By taking a bottom-up approach and exploring how social-ecological interactions lead to the emergence of community food security, it is possible to take heterogeneity into account and develop context specific solutions. At the same time further research could look into the challenges and opportunities for scaling up the model for regional policy exploration. The household livelihood trajectories . The shi in household trajectories (as outlined in Figure ) over time can also be demonstrated (Figure ). Sustainable livelihoods are expected to be resilient to shocks and stresses over time. The number of households 'falling down' into a less food secure category is projected to be minimal at less than % overall ( Figure A). Farmers tend to 'hang-in' or 'step-up' within their category rather than 'stepping-out' to become non-agricultural workers ( Figure B). Agricultural labourers, on the other hand, appear the least stable. The proportion of households 'hanging-in' fluctuates over time. Only a small number of agricultural labourers 'step-up', instead the vast majority 'step-out' to become farmers or non-agricultural workers ( Figure C). None of the non-agricultural workers were found to 'fall-down' into less food secure livelihood strategies, between and . However, the proportion of such households 'stepping-up' declines from almost % in to just % in ( Figure D).  .
The dynamic nature of household livelihoods can be linked to trends in land access ( Figure B). Over time increasing numbers of agricultural labourers step out to become non-agricultural workers. These households tend to own less land and the ability to acquire new land is constrained by the area of fallow and forest remaining. As the population grows between and , the proportion of households with access to land declines by approximately %. In this context, non-agricultural workers were the most resilient to shocks and stresses over time. Farmers were the most likely to fall-down and adopt a less food secure livelihood strategy when compared with other households, however the proportion was low with a mean value of just . % from to .
. These model outcomes reflect empirical findings described by Falconnier et al. ( ) for Southern Mali. Here, between and , % of households chose to 'hang-in'. A number of technical options were proposed by the authors to avoid stagnation of the agricultural sector and promote trajectories that 'step-up' over time. These included increasing access to farm equipment, promoting mixed cropping strategies with legumes and the intensification of milk production (Falconnier et al. ). Within Malawi, the ability of non-agricultural workers to step-up, may also be promoted by improved access to credit, better infrastructure and more employment opportunities (Castaing Gachassin et al. ; Swaminathan et al. ). By following household trajectories, the model provides a systemic view that addresses the dynamics of agri-food systems within Malawi. According to Thompson & Scoones ( ) by understanding critical feedbacks across multiple scales, e ective responses to social-ecological interactions can be designed. .
In this article we focussed on the impact of exogenous factors such as rainfall and population growth. However, the agent-based model described here can provide a virtual environment through which di erent policies and development narratives could be explored. For instance, the potential of land tenure reforms (Holden & Otsuka ) and the development of land rental markets (Chamberlin & Ricker-Gilbert ) to increase e iciency and equity could be investigated. The ability of sustainable agricultural intensification to increase food production and reduce negative environmental impacts (Pretty ) through agroforestry, conservation agriculture, integrated pest management and aquaculture (Pretty et al. ) could also be evaluated. In addition, the role of social security policies, such as conditional cash transfers and school feeding programmes, to alleviate food insecurity of the most vulnerable community members (Devereux ) could be considered.

Model limitations .
By quantifying food availability, access, utilisation and stability, the model enables the impact of exogenous factors on the multidimensional nature of food security to be explored. Rainfall variability and population growth, for instance, were linked to declines in food utilisation and stability over time. .
Climate was characterised within the model by annual rainfall. In addition to changes in rainfall frequency and intensity, climate change in sub-Saharan Africa is anticipated to cause temperature increases, along with more frequent shocks and stresses in the form of droughts and floods (McSweeney et al. ). This will shorten growing seasons, reduce the area of land suitable for agriculture and lead to declines in agricultural yield (Schlenker & Lobell ; Vizy et al. ; Dube et al. ). Currently such factors are out of the scope of the model as yield is calculated using regression equations, which take into account the accumulation of labour, fertiliser and rainfall. However, there is potential for incorporating additional climatic variables to better explore the impact of climate change upon community food security. .
A number of simplifications were made when modelling population dynamics. Population growth for example, was represented by the addition of households at the end of the simulated year. Existing households remained with the same number and age of individuals as before. This means that the current model does not fully capture age structure, fertility, mortality and migration. Future work should expand on the role of household demographics upon food security.
. Despite model simplifications, simulation outputs were found to correspond closely with observations and theories documented within the literature. Within Malawi, the proportion of young people is set to increase over time (UN ). As the number of young adults rises, the inheritance of land, long considered a birth right of rural individuals, will become ever more problematic (Jayne et al. ). In the simulation, population growth was negatively correlated with land access: as the number of households increased from in to in , the proportion of households with access to land declined from . % to . %.

.
According to Jayne et al. ( ), behavioural responses of households to land scarcity can be divided into five main trajectories: i) intensification of land use; ii) shi ing labour to rural non-farm activities, iii) migration to other rural areas, iv) migration to urban areas and v) reduction in fertility rates. The simulation was able to reproduce the first two trajectories. Population growth was met with a reduction in the area of land le to fallow. Within Malawi this is recognised as a common repercussion of land intensification (Headey & Jayne ). Regarding shi ing labour patterns, model outputs show the proportion of non-agricultural workers increased from % in to % in . Such findings are supported by a recent study which found population density had a significant e ect upon o -farm income per capita (Ricker-Gilbert et al.  Englund , and Suckall et al. ). The response of fertility rates is also uncertain for Malawi. A recent study found that, whilst achieved fertility rates did not di er significantly between high density countries such as Benin, Ethiopia and Malawi, and low density countries (e.g. Niger, Tanzania and Zambia), the fertility rates desired by African women decrease with increasing population density (Headey & Jayne ).

Benefits of the modelling approach .
The main benefit of the proposed modelling approach is the ability to produce fine scale and relatively detailed micro-simulation of a rural community with limited use of local scale data. This is possible by building the generic model on largely available national longitudinal household surveys and integrating village data at the parameterisation stage. We regard this as a relevant methodological contribution to a major issue of agent-based modellers working on data-scarce agro-ecological environments (e.g. Saqalli et al. ), and more specifically, as a possible resolution to the tension between the lack of a minimum amount of reliable and checkable information and the need for individual-centered, empirical, and descriptive representation of complex social-ecological systems. The possibility to limit the need for scarce finer-scale data has tremendous implications for the potential replicability of this methodology in other low-data availability contexts. For example, within Sub Saharan Africa, the Living Standards Measurement Study has aided the design and implementation of household surveys within a number of countries (Malawi, Burkina Faso, Ethiopia, Mali, Niger, Nigeria, Tanzania and Uganda) (Grosh & Glewwe ). The data collected in each project country is publicly available. Using our approach, such district data sets could be supplemented with quick and unexpansive assessments in village field studies to allow the construction of micro-level agent-based models of community food security within a wide range of contexts. .
A second major benefit of the modelling approach is the ability to deliver a credible model. Indeed, in order to be useful to decision makers, model outputs must be credible. A key strength of our methodological approach is the ability to explore model uncertainty and validity. Using the SPARTAN R package (Alden et al. ) in combination with Netlogo enabled two techniques to be operationalised, namely consistency analysis and parameter robustness. Both quantitative and qualitative approaches were used to validate the model. Comparison of simulation outputs with empirical data uncovered inconsistencies between food security indicators. The model consistently overestimated the number of months that households were food insecure. However, this may be explained by a disparity between actual and perceived food security status as reported by the model and the survey data, respectively. Additional data sets should be used to verify and validate the model further.
Combining qualitative e orts with quantitative validation has proved beneficial especially because promoting dialogue with stakeholders during role-playing exercises ensured model fit not only to the data, but also to its intended purposes.

Conclusion
. This study provides a methodological approach for the development of an agent-based model to assess community food security. Issues associated with data scarcity were alleviated by using a typology-based approachdriven by empirical data-informed identification of representative household types based upon shared attributes and livelihood strategies-that enables models to be built using district level data that tends to be richer and more readily available. This can then be supplemented with village level data to tailor policies and development programmes. The model takes into account the multi-dimensional nature of food security. Availability, access, utilisation and stability dimensions are quantified and can be summarized at both the household and community level. The trajectories of households can also be traced over time. The model is validated in a strategic manner, using both quantitative and qualitative approaches to ensure the simulation tool can reproduce real-world data and also be of use to stakeholders. Model uncertainty is tackled to ensure credibility and ensure the model is fit for decision-making purposes. Future work could focus on exploring household demographics further, as well as using the model to investigate di erent strategies to enhance community food security. Attempts could be made to validate the model against additional data sets as well as consider how assessments of community food security can guide the design and targeting of policy and development programmes in practice. The creation of agent-based models represents a potentially powerful tool that communities and stakeholders could use to ensure all community residents obtain a safe, culturally acceptable, nutritionally adequate diet through a sustainable food system that maximizes self-reliance and social justice.

Notes
Farm plots typically found in areas bordering streams and rivers. Residual moisture means they can be cultivated during the dry season from April to October.

Acknowledgements
SD was supported by an EPSRC Doctoral Training Centre grant (EP/G X/ ). MS provided the village-level data collected under an ESPA Early Career Fellowship Grant (FELL--) with support from the Ecosystem Services for Poverty Alleviation (ESPA) programme. The expert workshop was organized with the support of the 'Attaining Sustainable Services from Ecosystems using Trade-o Scenarios' project (ASSETS; http: //espa-assets.org/; NE-J -), which is also funded with support from ESPA. The ESPA programme is funded by the Department for International Development (DFID), the Economic and Social Research Council (ESRC) and the Natural Environment Research Council (NERC). SB was supported by two grants: BizkaiaTalent, Marie Curie Actions (People, Grant agreement n. ) and Juan de la Cierva incorporación (Grant IJCI--). Figure : A-Test scores when adjusting parameter n-f-interact. Measures include the proportion of food energy deficient households (prop.defic) and the daily food energy consumption per capita (fecc), disaggregated for farmers (h ), agricultural labourers (h ) and non-agricultural workers (h ).