Introduction

The World Food Summit of 1996, defined food security as “when all people at all times have physical, social and economic access to sufficient, safe and nutritious food that meets their dietary needs and food preferences for an active and healthy life” (World Food Summit 1996). This definition encompasses the four dimensions of food security: access, availability, utilization and stability, which are necessary for a household to be categorized as food secure (FAO 2008). Food security is a human right, yet close to 11.3 % (805 million) of the world population remains food insecure (FAO et al. 2014). Globally there has been a modest decline in food insecurity; however, the decline has been disproportionate. The Sub-Saharan Africa (SSA) region still has the highest prevalence of undernourishment with one in every four people in the region being food insecure (FAO et al. 2014). Between 2000–2002 and 2012–2014, while the proportion of undernourished population in SSA and Kenya reduced to 23.8 % and 24.3 %, the absolute number of people increased by 214.1 million and 10.8 million respectively, telling a different story (FAO et al. 2014). In the slums of Nairobi, more than half of the population is severely food insecure (Faye et al. 2011).

Many studies on food insecurity have tended to focus on rural populations. However, new challenges to achieving food security in the world are emerging. Among the many is rapid urbanization occurring in developing countries with unparalleled economic growth. This growth in most cases has led to the growth of an urban poor population living in slums. The growth of slums coupled with limited urban agriculture, means that the urban poor population is increasingly becoming vulnerable to food insecurity. In SSA, poverty, food insecurity, child mortality and malnutrition have for long been widely viewed as problems affecting rural populations (Van de Poel et al. 2007; Fotso 2006, 2007). However, with the growing population of the urban poor, the urban advantage is disappearing (Fotso 2007). While the rural population remains relevant and of interest to researchers, the growing urban population, especially the urban poor is increasingly becoming of interest too for it poses risks to achieving social, economic and health development in low and middle income countries (Ravallion et al. 2007). In these countries, rapid urbanization poses unanticipated challenges, one of which is food insecurity. Agricultural production in rural areas has declined over the years as a result of high prices of inputs, climatic conditions and low returns on agricultural investments, and this is hypothesized to drive rural to urban migration (Hove et al. 2013). Food production in many low income countries remains largely rural and small scale. Therefore, urbanization not only leads to a reduction in workforce and necessary skills in rural areas, but also a decline in food production. The situation is complicated by the fact that in SSA, it is the ‘urbanisation of poverty’, unlike in high income countries where urbanization was associated with diversification and transformation from agriculture to manufacturing and macro-economic growth (Obeng-Odoom 2010; Otto 2008; Ravallion 2002; Ravallion et al. 2007). In SSA, urban agriculture remains mainly informal, sometimes outlawed and is not integrated in urban planning, making it unsustainable (Martellozzo et al. 2014). Furthermore, those moving to the cities are largely food consuming and in search of employment and are therefore more likely to be exposed to food insecurity (United Nations 2004), yet there remains a dearth of evidence on the drivers of food security in this population. Specifically, the effect of education attainment on food security among the urban poor has not been closely examined.

Several studies, the majority outside SSA, have explored the mechanism through which education and food security influence each other (Das and Sahoo 2012; Amali 2012; USDA Economic Research Service 2014; Bashir and Schilizzi 2013; Reimers and Klasen 2013; Gebre 2012; Oluwatayo 2009; De Muro and Burchi 2007). The findings are, however, mixed with some showing a negative effect of education on agricultural production (Amali 2012) while the majority found a positive association (Bashir et al. 2012; De Muro and Burchi 2007; Faye et al. 2011; Birhane et al. 2014). Much of the research evidence on the effect of education on food security is based on rural populations. The existing evidence points to a two way causal relationship between food security and education (Headey 2013). First, food security has an effect on education and health. Food insecurity, especially during the early years of growth, leads to malnutrition among children; malnutrition is associated with poor cognitive growth and low educational achievement and the effects may extend to later life (Black et al. 2013). Secondly, and the focus of this study, is the effect of education on food security among the urban poor. The human capital theories posit that human capital is a major determinant of production and later life chances of success e.g. employment and earnings (Becker 1964). These theories postulate that education, a measure of human capital, is associated with both productivity and efficiency. Education has direct and wider returns to individual and immediate members of their family and society at large in terms of increased income, improved health and better decision making (McMahon 2009; Psacharopoulos and Woodhall 1997). Education is indeed considered a key determinant of social mobility, by moving individuals and households out of poverty.

The mechanisms through which education influences food security differ, depending on the context, including urban versus rural. In the rural context, education influences food security through access to information on best agricultural production, nutrition and sanitation; increased efficiency, hence increased production and better decision making as well as the pride that comes with education (De Muro and Burchi 2007; Bashir and Schilizzi 2013). While these mechanisms may also apply among urban households, the pathways differ. In the urban context, the effect of education is through proxies such as employment, household income and decision making. These proxies have effects on the access, utilization and availability dimensions of food security. Increased years of schooling are associated with better employment opportunities, working efficiency, better decision making and increased disposable income (Bashir and Schilizzi 2013; Gebre 2012). It is estimated that 90 % of the food consumed by the urban population is purchased and that poor households spend more than 50 % of their income on food and are more vulnerable to food price increases (Ruel and Garrett 2004; FAO et al. 2012). Given this, individuals and households with higher levels of education can be said to be more likely to be food secure because of their increased purchasing power (Bashir and Schilizzi 2013). While this is true, labour participation among the urban poor is mainly in the informal sector with returns that can barely meet their daily needs. For instance, in Nairobi’s informal settlements, the main source of income is employment with 52 % of the persons aged above 18 years either in fulltime salaried employment or in casual employment but 27 % are economically inactive (Emina et al. 2011).

Urban food security is of programmatic importance to policy makers in low and middle income countries that are characterized by urban poverty and low rates of food production, high food prices and unemployment. Indeed, food security is a driver for sustainable development, yet there remains a paucity of information on the key drivers of food security especially among the urban poor. Specifically, the effect of household education remains understudied. The existing evidence on determinants of food security has several methodological limitations. First, most existing studies are cross-sectional in nature and thus limited in the extent to which causal inferences can be made and fail to capture intra-household dynamics over time. Second, many studies categorize food security as a dichotomy and only utilize the household head level of education, and thus may fail to capture important nuances in household food security. Third, many studies focus on rural contexts, yet the benefits and the mechanisms through which education influences food security in the rural context varies from that of the urban poor households. Our study addresses these limitations and expands our understanding of urban dynamics of food insecurity by analysing the relationships between household food insecurity and education, taking cognizance of the cumulative educational attainment of household and wealth status. The study uses longitudinal data collected between 2007 and 2012 in two urban informal settlements and employs robust analytical techniques to determine the prevalence of food insecurity among the urban poor and to examine the effect of education on household food security.

Conceptual framework

The conceptual framework guiding this study is shown in Fig. 1. Drawing on existing literature and the conceptual framework of malnutrition, we postulate that household food security is directly influenced by household education attainment (Feinstein et al. 2006; Pieters et al. 2013). In addition, we postulate that education also has indirect effects on food security by influencing income (proxied by household wealth index) (Botha 2010). In this regard, household wealth mediates the effect of household level of education on food security (Headey 2011). The direct effect of education can therefore be said to be the net effect of education on food security and can be referred to as the impact controlling for other covariates, hence causal inference (Victora et al. 1997; Baron and Kenny 1986).

Fig. 1
figure 1

Conceptual framework

The framework also takes into consideration other factors that may influence food security by affecting either the acquisition of food or its utilization. First, we consider the availability of resources to support household food production such as land (Pieters et al. 2013). The decision to include this variable is informed by the authors’ understanding of the local context that most households in Nairobi’s informal settlements own land in their rural homes, which they use for food production. We also consider the other household factors that have been documented in the literature to have direct effects on household food security: household demographic characteristics (e.g. the age and gender of the household head); duration of stay in the slum, area of residence, household size and dependency ratio, as well as household shocks (Bashir and Schilizzi 2013). Duration of stay can be considered as an indirect measure of coping. Households that have stayed for longer period have experience in navigating the challenges of being in the slums. The literature on food security shows that social networks provide strong support for households (Martin et al. 2004). Households that have stayed in the slum for a long time can be thought to have established networks and connections through which they can negotiate when faced with challenges such as being food insecure. Moreover, shocks experienced by households increase their vulnerability and may expose households to food insecurity by the shifting of resources to address them, leading to loss of household resources (Feinstein et al. 2006).

Methods

Data

In this study we use panel data collected between 2007 and 2012 from the Nairobi Urban Health and Demographic Surveillance System (NUHDSS). The NUHDSS is a health and demographic surveillance system situated in two informal settlements, Korogocho and Viwandani, Nairobi, Kenya. The NUHDSS collects data on vital events (deaths, births and migration), household characteristics and health information from every household in the surveillance area every 4 months. By 2012, the NUHDSS had a midyear population of about 67,800 individuals in about 27,300 households. The selection of the study sites was based on two datasets: the 1999 Kenya housing and population census and the 1997 Kenya welfare monitoring survey. The 49 locations in Nairobi county were ranked according to the proportion of population categorized as poor and put into five groups (Ngware et al. 2012). The focus was poor locations and therefore those ranked as rich were excluded. The two selected sites, Korogocho and Viwandani, were ranked in the poorest quintile, were in positions 44 and 48, respectively, and had comparable features with other slum settlements.

In 2006, the DSS operationalized a household characteristics and amenities module that was administered once a year. The module contained items that collect rich data on household socio-economics, amenities, household shocks and food security. The module targeted all households enumerated in the two study sites. In this study, we drew on the data gathered using this module. The overall response rate on questions relating to household food security was 93 %. We restricted our analysis to households with at least one child aged 5 years or younger. This is because one of the key measures of household food security is child hunger, which was only collected from households with children below 5 years. The final sample for analysis included a cumulative number of 56,344 records from 23,549 unique households. At least 50 % of the households had a minimum of 3 records and only 18 % had one record.

Measurement of food security

The primary outcome was household food security, a latent variable assessed using a single indicator derived from multiple measures (Bicklel et al. 2000). As noted by Faye et al. (2011), the items were a subset of those identified in the approach of Radimer et al. (1992) to measuring hunger and food security and mainly included insufficiency of the quantity of household food, access to food, anxiety over its availability and child and adult hunger. Three of the items were part of a household hunger scale and have been validated to not only measure but also monitor food insecurity in low income countries (Deitchler et al. 2010). The items were administered once every year between the months of September and December to all the households in the two study sites. The items assessed food insecurity over a recall period of 30 days (about 4 weeks) and attracted three response options (1 = Often true (more than 10 times); 2 = Sometimes true (3 to 10 times); 3 = Never true (0 to 2 times)) (Leroy et al. 2015):

  1. a.

    Household had enough food during the last 30 days (insufficient food quantity)

  2. b.

    In the last 30 days, the food that the household bought was finished and there was no money to obtain more (food uncertainty/unaffordability)

  3. c.

    During the past 30 days, children in the household failed to eat for a whole day/slept hungry because there was not enough money for food (child hunger).

  4. d.

    During the past 30 days, you or other adult(s) in your household failed to eat for a whole day because there was not enough food (adult hunger).

The reliability of the items was assessed using Cronbach’s alpha and found to be 0.75, which was within the acceptable range (Tavakol and Dennick 2011). Responses to the questions were dichotomized as described by Faye et al. (2011) and (Ballard et al. 2011). Thus for items ‘b’, ‘c’ and ‘d’, those responding as either often or sometimes true were categorized as ‘1’ otherwise ‘0’ ; while for item ‘a’, the response was negated, and those who responded to never true (did not have enough food) were coded as ‘1’, else ‘0’. Using a similar approach described by Deitchler et al. (2010), we calculated a sum of the item scores; scores ranged from zero to four. Households that did not experience any of the situations (score of zero) were categorized as food secure; households that experienced either one or two (score of one or two) were categorized as moderately food insecure, those that experienced at least three (score of above two) were coded as severely food insecure.

Measurement of household educational attainment

The main independent variable is the average household educational attainment (AHEA) measured by average number of schooling years within a household for adult members aged 18 years and above. That is the total number of schooling years divided by the number of individuals in the household aged 18 years and above. The variable is continuous and large values indicate higher education attainment for that household.

Measure of other independent variables

Household wealth index score

This is a composite measure, calculated using principle component analysis (PCA). In the PCA model, both household amenities and asset ownership measures were included. The household amenities variables were main material of the wall, floor and roof, main source of drinking water, and the main type of toilet. The assets included ownership of a car, motor bike, and bicycle or radio, gas cooker, sewing machine, bed and mobile phone among others.

Household shocks

were determined by whether the household had, in the past year, experienced any household shocks, with the key ones being fire, mugging, floods, death, theft, eviction, demolition and illness. Households that reported experiencing a particular shock were coded as ‘yes’ and otherwise ‘no’.

Food production

This is captured by whether the household grew crops and how the produce was utilized. The variable takes three categories: 1 = Household did not grow any crops; 2 = household grew crops and used the entire produce for food; and 3 = Household grew and partly used and also sold them.

Dependency burden

We used the conventional definition of dependency to calculate this indicator. That is, the indicator expresses the proportion of people aged either below 15 or above 64 years within a household as a fraction of the number aged between 15 and 64 years.

Household size

This is the number of people in a household. The variable is treated as continuous.

Duration of stay

This is the number of years that the household has stayed/lived in the study sites.

Other variables

Household age, maintained as the actual age of the household head; study site coded as either Korogocho or Viwandani and gender of the household head as either male or female and year of observation.

Statistical analysis

We employed both descriptive and inferential data analysis techniques. The descriptive statistics included frequencies, means, proportions and percentages. ANOVA was used to determine whether there was an association between food security status and the continuous variables.

To determine the relationship between household education attainment and food insecurity status among households living in informal settlements, we used a random effects generalized ordered probit model.

In eqs. 1 to 6, we describe the model. Let the outcome, food security ‘y’ have ‘j’ categories that have a natural ordering, then accordingly (Wooldridge 2010):

$$ {y}_j=1,2,\dots ..j,\left\{j>2\right\} $$
(1)

Considering the observed food security status to have an underlying latent variable y *, then \( {y}^{*}={X}_i^{\mathit{\hbox{'}}}\beta +{\varepsilon}_i \) where X' is a vector of variable(s) that conditions the outcome; y i (observed food security status) and its underlying variable y * can be said to associate in such a way that:

$$ y=j\ \mathrm{if}\ \mathrm{and}\ \mathrm{only}\ \mathrm{if}\ {k}_{j-1}\le {y}^{*}={X}_i^{\hbox{'}}\beta +{\displaystyle {\varepsilon}_i}\le {k}_j $$
(2)

Where j = 1 , 2 …  . j and k j are the thresholds (often referred to as cut points) to be estimated. The cut points partition the latent variable y * into j categories, since the observed variable is categorical and ordered with an assumption of parallel lines. In this type of model, the cut points can be flexible and allowed to vary, such that:

$$ {k}_{ij}=k{\hbox{'}}_j+{X}_i^{\hbox{'}}{\delta}_j $$
(3)

According to Pudney and Shields (2000), allowing the thresholds not to be fixed but vary, based on the conditioning covariates (\( {X}_i^{\mathit{\hbox{'}}}{\delta}_j\Big) \), then household heterogeneity is accounted for in the threshold. By so doing, the response probability and the cumulative distribution function is given by:

$$ p\left\{{y}_i\le j|{X}_i\right\}=\left\{{k}_{j-1}<{y}^{*}\le {k}_j|{X}_i\right\}=F\left({k}_j^{\prime }+{X}_i^{\hbox{'}}{\delta}_j-{X}_i^{\hbox{'}}\beta \right)=F\left(k{\hbox{'}}_j-{X}_i^{\hbox{'}}{\beta}_j\right) $$
(4)

where β j  = β − δ j , which allows a separate set of coefficients for each of the categories; this in essence implies that observable individual heterogeneity in the cut points and mean of the regression are assessed.

Since the response variable has j categories (which are more than two), unlike in a multinomial regression which compares pairwise, ordered probit, j − 1 binary response models or equations are estimated. The j − 1 equations are estimated sequentially such that the first model, category 1 is compared with category 2 up to j; the second equation compares category 1 and 2 versus 3 up to j, with the last model comparing category 1 to j − 1 against the jth category. In the current study, the response variable has three categories (1 = Food secure; 2 = Moderately food insecure and 3 = Food insecure), thus two models were estimated. The first model compares food secure households versus combined categories of moderate and severely food insecure households (model 1), and the second compares food secure and moderate food insecure against the food insecure households (model 2).

Equation 4 does not account for random effects since households are observed over time; therefore, substituting in Eq. 4 with a mean of zero and constant variance as described by (Pfarr et al. 2011), then:

$$ {y_{it}}^{*}={X}_{it}^{\hbox{'}}\beta +{\propto}_i+{\varepsilon}_{it} $$
(5)

where ε it |X i is normally distributed with a mean of 0 and a constant variance δ2 (such that rho (p)= δ2/(1+ δ2) allowing household effects (observed heterogeneity) to be estimated by cut points that are varying and random effects (unobserved heterogeneity) that occur due to the repeated nature of the data. Eq. 5, response probability and the cumulative distribution function, is given by:

$$ p\left\{{y}_i\le j|{X}_i\right\}=F\left({k}_j^{\prime }+{X}_i^{\hbox{'}}{\delta}_j-{X}_i^{\hbox{'}}{\beta}_j-{\propto}_i\right) $$
(6)

One key assumption of ordered models is that the estimated parameters are parallel and the same for the different estimated models. In this case, the assumption is such that the parameter estimates for model 1 which compares food secure households against combined categories of moderate and food insecure households are the same to those of model 2 which compares food secure and moderately food insecure against the food insecure households. This assumption may not hold. One advantage of the random effects generalized ordered probit model is that this assumption can be relaxed. This is achieved by estimating an unrestricted model and carrying out a sequential global Wald tests, which tests the parallel line assumption (Pfarr et al. 2011). Several models are estimated when restricting for the variables that have the highest probability until variables that have probability scores of the set significance level (in our case below 0.05) remain. The series of estimations depend on the number of variables that do not violate the parallel line assumption.

Based on our conceptual framework (Fig. 1) and the procedure of Victora et al. (1997) on the role of conceptual frameworks in epidemiological analysis, we fitted 1) a model with only the outcome and the main explanatory variable, household educational attainment; 2) a model with household educational attainment and wealth index; in this model the mediating effect of the wealth index was isolated; and 3) a model with household educational attainment and wealth index controlling for other variables. In the last, the estimated coefficients for education represent what is not mediated by the wealth index and other possible covariates in the model. Thereafter, we estimated the marginal effects in order to measure the probability of being food secure given a unit increase in household education attainment and wealth score holding other covariates at mean. We analysed data in STATA 13 using the REGOPROB2 command (Pfarr et al. 2010).

Results

Table 1 shows the demographic characteristics of households by household food security status. The prevalence of severe food insecurity in the two urban informal settlements of the study was 42 % with a greater proportion of severely food insecure households observed in Korogocho (66 %) than Viwandani (15 %). Household food security was significantly associated with household educational attainment at bivariate level. The average household educational attainment was 8.29 schooling years, which is almost equivalent to the primary level of education. The average household educational attainment decreased with food insecurity status – was highest among the food secure households and lowest among the food insecure households. ANOVA showed a significant difference in the means of household educational attainment between the three food security statuses. The social economic status of a household was measured by a wealth index score. High scores indicated high household social economic status. Severely food insecure households had lower wealth index scores.

Table 1 Social-demographic characteristics’ association with household food security status, Nairobi informal settlements, 2007 to 2012, n = 56,344

Severe food insecurity was highest (42 %) among households that did not grow any crops and lowest (18 %) among those households that grew crops for household consumption. There was no difference in the proportion of severely food insecure households between households that did not grow any crops and those that grew crops both for household consumption and other purposes (49 %). Results also showed variations in food security status over time. Specifically, between 2007 and 2009, around 48 % of households were severely food insecure compared with 36 % in 2010. A slight increase was observed in 2012 with 39 % of households categorized as severely food insecure. Food insecurity was highest between 2007 and 2009 with a gradual decrease thereafter. The high levels of food insecurity observed in the earlier years may be associated with the political turmoil witnessed in Kenya after the 2007 general elections and a drought that began in 2008.

Tables 2 and 3 shows the independent effect of education, wealth and year of observation on food insecurity from a random effects generalized ordered probit model and the effect of educational attainment controlling for wealth index score, respectively. In the bivariate models, the household average years of schooling and wealth status variables were not constrained since they all violated the parallel line assumption. Model 1 compares food secure households (category 1) to combined categories of the moderate (category 2) and severely (category 3) food insecure households. Model 2 compares the categories of food secure or moderate insecure households with severely food insecure households (1 and 2 versus 3). For Model 1, a negative coefficient indicates a higher probability of being categorised as food secure (category 1) while a positive coefficient indicates an increased probability of being moderately or severely food insecure; similarly Model 2 shows a negative coefficient if the household is categorized as food secure or moderately insecure.

Table 2 Bivariate estimation results of random effects generalized ordered probit models linking characteristics and food security (n = 56,344)
Table 3 Education level and HH wealth index results of a random effects generalized ordered probit model (n = 56,344)

In both models in Table 2, the coefficient for household educational attainment is negative and highly significant. This shows that the probability of being moderately or severely food insecure decreases with increased level of education – simply higher educational attainment has a positive effect on food security. The bivariate results for the year variable are mixed. First, the years 2009, 2011 and 2012 did not violate the parallel line assumption and were therefore constrained hence similar coefficients in the two models. In essence, this means that the constrained dummy variables have the same effect across the ordered categories of the outcome variable. Secondly, 2008 and 2009 have positive coefficients while the other years have negative coefficients. Compared to 2007, households in 2008 and 2009 had increased probability of being food insecure; thereafter, the probability of being moderately or severely food insecure decreased. This result suggests substantial improvements in food security after 2009.

The household wealth index in Table 2, shows that wealth index score (higher wealth score indicates improved wealth status) was negatively associated with food insecurity. That is, the severity of food insecurity decreased with increased wealth scores. In order to assess the mediating effect of household wealth on the estimated effect of education level, a model with both variables was fitted (Table 3). When both variables were included, none fitted the parallel assumption. Although the education coefficient remained statistically significant, it was slightly attenuated after controlling for wealth index score. This suggests a mediating effect of wealth index, though not so strong as to eliminate the significant effect of educational level.

Table 4 presents results on the effect of educational attainment on food security controlling for other known determinants (full model). Household educational attainment is a significant determinant of household food security, even after controlling for other covariates that were thought to be significantly associated with food security. The coefficient for the education attainment variable remained negative and statistically significant. Unlike the results in Table 2, the effect of education on food security in the full model is constrained. The constrained effect of education implies that households with high education attainment had increased probability of being food secure. That is the probability of being food insecure decreased by 0.019 given a unit increment (one year increment) in household education attainment. Fig. 2 shows the predicted marginal effect of security given a unit increase in household education attainment holding other covariates in the full model at means. The probability of food security significantly increased with increased education attainment: likewise, the probability of being food insecure significantly decreased with increased average years of schooling in a household.

Table 4 Estimation results of a random effects generalized ordered probit model (n = 56,344)
Fig. 2
figure 2

Household educational attainment predictive margins with 95% confidence intervals

Household social economic status, measured by wealth index score showed a negative relationship between increased wealth score and food insecurity. This relationship is illustrated in Fig. 3. The predicted marginal effects for the food secure shows a positive linear association between wealth score and predicted probability of being food secure. Conversely, the incidence of food insecurity decreased with increased wealth score. The household education and wealth scores marginal effects were stratified by study sites. Though we observed a difference in the magnitude of the predicted marginal effects the directions remained the same.

Fig. 3
figure 3

Household wealth score predictive margins with 95% confidence intervals

Duration of stay, health shocks and gender of the household head were constrained. The coefficient for duration of stay was negative and significant implying that households that had lived in the study site for a longer period had a higher probability of being food secure. Male- headed households had insignificantly reduced (0.023) probability of being food insecure compared with female- headed households.

The variables that were not constrained in the model mean that they violated the parallel line assumption. The effect of these variables on food security varied between model 1 and model 2 as their coefficients differed in magnitude between the two models. These non-constrained variables contributed substantially to the heterogeneity observed in household food security. In some instances, the significance of the non-constrained variables varied between model 1 and 2 of Table 4.

The dependency burden within the household is a strong predictor of food security. The probability of a household being food insecure increased with increased dependency burden. That is, a unit increase in dependency burden was associated with 0.096 and 0.125 increase in the probability of being food insecure in model 1 and 2, respectively. In terms of the study site, households in Viwandani had higher probability of being food secure than those in Korogocho. The year variable was included in order to examine changes in food insecurity over the period of observation as well as control for unobserved time effects that may be occasioned by changes that are not directly measured in the data (e.g., political environment and climatic variation). The results of the year variable mirror those of the bivariate models presented in Table 2. The years 2008 and 2009 showed increased food insecurity status compared to 2007. From 2010, the magnitude of the coefficients for model 2 are large and negative as compared to those of model 1. This shows an increased probability of being food secure or moderately food insecure from 2010 compared to 2007. This is an indication of improved household food security status, though borderline over the period of observation.

Other non-constrained variables that were significantly associated with food security were shocks happening within households during the year, household food production and household head’s age and whether a birth happened within the household that year. Households that had experienced shocks and households that grew crops were more likely to be food insecure compared with households experiencing no shocks or that did not grow crops. However, households that grew crops for household consumption were significantly more likely to be food secure or moderately food insecure. A positive association between household head age and the likelihood of food insecurity was observed, though only significant for model 2 of Table 4. Further, households that had experienced a birth during the year of observation were likely to be either food secure or moderately food insecure compared to households not experiencing any birth within the year.

In order to check for robustness of the results in Table 4 and due to the unbalanced nature of the data, we fitted a full model using balanced data. The robustness was checked using households that had 3 consecutive observations as well as those with data for all the years of observation. The coefficient for the education attainment remained negative and highly significant. Other than the shocks which became insignificant, in the balanced sample, all the other variables behaved in a similar manner to the unbalanced sample. Few incidences of the shocks included in the analysis were reported (see Table 1), and since the balanced samples were smaller than the original sample, the number of shocks were reduced and we think this could explain the change in significance.

The influence of unobserved heterogeneity in the status of food security for households over the period was measured by rho, which is the correlation of the error terms. The unobserved heterogeneity decreased from 30 % in the model that only included education (Table 2) to 24 % after including household wealth index (Table 3) and to 9 % in the full model (Table 4). This shows that the variables included in the full model significantly reduced the unobserved effects, and hence accounted for much of the variation of observed household food insecurity.

Discussion

The aim of this study was to investigate the effect of household educational attainment on food security. Using longitudinal data spanning 6 years from households in two informal settlements in Nairobi, we observed high levels of food insecurity – only 27 % of households were food secure. Levels of food insecurity were nearly threefold that of the national average of 26 % in 2013 (Dietz et al. 2014) and consistent with previous studies conducted in the same context (Faye et al. 2011; Kimani-Murage et al. 2014) and in other contexts (Musyoka et al. 2010; Birhane et al. 2014). Urban agriculture is limited and urban households, including the poor, depend on food supplies from rural areas and the ability to pay in a cash-based economy (Kimani-Murage et al. 2014). The first three years were characterized by high levels of food insecurity and coincided with the post-election period in 2008 that was marked by political turmoil and the hunger strikes of 2007–2008 due to increased world food prices and inflation. During the same period, Kenya experienced a prolonged spell of drought that led to a decline in food production. Dietz et al. (2014), also found high levels of food insecurity two years after the 2007 elections. The effects of the violence may have had both an economic impact on households, reducing their ability to pay, as well as an effect on food production in the country, due to internal displacement and destruction of farm properties, resulting in reduced food supplies. This coupled with drought which was associated with a decline in food production made matters worse. USAID (2010) noted that the agricultural sector recorded negative growth and that maize production during the post-election period and immediately thereafter decreased by 15 to 20 %. This led to increased inflation, with the most hard hit being those of low socio-economic status. Qualitative narratives also reported the state of food security as being severe during the crises that affected the economy (Kimani-Murage et al. 2014). Moreover, in Kenya, droughts are characterized by loss of livestock, especially among the pastoral communities, and a decline in food production which affects supply and hence increases prices. By so doing, drought undermines household livelihoods exposing them to poverty and food insecurity.

Results of the full model showed that increased household education attainment was associated with an increased probability of being food secure. This is consistent with other studies that showed food security to be associated with the level of education (De Muro and Burchi 2007; Bashir et al. 2012; Faye et al. 2011) and in contrast to those of Garrett and Ruel (1999) who found no significant association between education and urban and rural food security in Mozambique. Although this relationship was expected, we anticipated after controlling for household wealth index, the effect to diminish (Headey 2011). We hypothesised that the effect of education on food security is mainly through income in the urban context. Income in this case is a more proximate factor, since urban households mainly depend on out of pocket purchases for food (World Food Programme 2009; Musyoka et al. 2010). Education is a key factor in food access, production and utilization. Moreover, education is associated with better job opportunities and provides households with the knowledge of how to meet health and nutritional needs of their families. These opportunities provided by education such as better employment imply increased disposable income for households. Thus, education was expected to exert its effect through a wealth index, which was a proxy measure for household income. Although the household wealth index mediated the effect of household education attainment, it did not eliminate it entirely. This suggests that education, irrespective of household wealth status, has an independent effect on food security in an urban poor context. The independent effects could be through other unobserved characteristics that relate to education such as household decisions and resource allocation, which in turn determine household food security.

We interpret the study findings bearing in mind some limitations. Unlike previous studies which mostly used the education level of the household head, our measure of education was the average years of schooling which captures the human capital of a household. One issue with this approach is reverse causality whereby educational attainment within the household is also a result of household wealth and food security (Filmer and Pritchett 1999; Belachew et al. 2011). While this is true, about 85 % of the population surveyed was aged below 39 years with about 50 % of the population aged between 15 and 29 years. This implies that most of the households are young and are most likely to have young children. Our educational attainment indicator included individuals aged 18 years and above, minimizing the effects of reverse causality. Data on household incomes and expenditures, which may be better measures of household wealth than the asset and amenities index were not available. Moreover, though individuals were mainly in informal settlements, information on employment was not available. In this study we controlled for the household wealth index score, a proxy measure for wealth status, to minimize any nuances that could be attributed to income and employment. The longitudinal nature of the data, large sample size as well the analytical approach adopted are strengths of the study.

The current study extends the body of knowledge by analyzing data from multiple years using random effects ordered probit models that take into account unobserved heterogeneities and time effects. Moreover, use of household average years of educational attainment means that the human capital of the households was better measured than in most of the previous studies. With the large datasets, one can confidently interpret the parameter estimates. One key issue with the generalized ordered probit models is that prior information or knowledge of the theories that underlie the violation of the parallel line assumption may not be available in case of outcomes with more than two categories. In this case, one does not know in advance which variables violate or do not violate the assumption in an ordered outcome. This however is overcome by the auto fitting options that are provided for this type of analysis as described by Pfarr et al. (2011). The auto fitting provides a robust analytical approach to identifying such variables that do not violate the assumption by sequential modelling and using the global Wald tests; this is an assumption, which many previous studies avoided by dichotomising the food security indicator.

Conclusion and way forward

Prevalence of food insecurity among the urban poor is high. However, even among the urban poor, disparities exist in food security status. In this study, households with low educational attainment were more likely to be food insecure than those with at least some basic education. The urban poor face unique challenges that are different from those faced by their rural counterparts. Therefore, effective strategies to address the vulnerability of the slum residents to food insecurity in the short term are warranted. However, investments in education may have long-term dividends in efforts to reduce food insecurity. This is in line with the capability approach, which recognises the role played by education in increasing capabilities of people and by extension households. Education alone, may, however, not reduce the severity of food insecurity if other economic opportunities, such as employment, are not available, calling for a systems approach.