The effect of farm size and farmland use on agricultural diversification: a spatial analysis of Brazilian municipalities

,

input and product prices become more volatile, production loss may increase and compromise the sector's economic sustainability.The model of market-based agricultural diversification strengthens farmers' economic resilience considering that a variety of crops meet market demand at different times of the year, eventually leading to a transfer of resources from a crop to crops mix to increase the sector's income and profit (Bellon et al. 2020).According to Di Bene et al. (2022), crop diversity improves crop productivity, resource use efficiency, and cropping system resilience in the long term.Among the main farming practices of agricultural diversification, the authors cite crop rotation, cover crops, multiple crops and intercropping, conservation agriculture, and organic agriculture.
Agricultural diversification strategy plays a vital role in reducing climate-related risks inherent to farming activity, has a positive nutritional and environmental impact, and increases the resilience of food systems.The United Nations encourages the adoption of diversified production systems by farmers.It increases food security, generates jobs in the countryside, climate change adaptation, increases household income, and provides agronomic benefits such as improving soil and plant health and reducing exposure to pests (FAO 2012(FAO , 2018;;Maggio et al. 2018).
According to Aguilar et al. (2015), some farmers prefer nothing to adopt a diversification of their production; this strategy can be explained by agricultural policies, increases in the value of human labor, and development of farming techniques to increase the scale of production and specialization.Isbell at el. (2021) surveys the literature on why agriculture has led to a decline in crop diversity and highlights some trends in agricultural development that reward specialization through economies of scale, government subsidy programs for commodity crops, and agricultural policies that benefit both conventional and large-scale production.Therefore, risk and uncertainty are the significant characteristics of agricultural output in developing countries.The adoption of crop diversification has increased recently due to prolonged droughts and other extreme weather events (Kurdy's-Kujawska et al. 2021).
This article focuses on two essential characteristics of Brazilian agriculture and their effects on the diversity of agricultural production in the country, namely the prevalence of small farms and the regionalization of agriculture in municipalities and regions where the agricultural sector predominates.In 2017, about 77% of rural establishments in Brazil were classified as household farms, with an occupied area of 80.9 million hectares, which accounted for 23% of the total area of Brazilian rural establishments.Farm size is a crucial determinant of whether households adopt more diverse systems.Galli et al. (2020) have found that small farms ensure food and nutrition security for households at local, regional, and global levels and maximize the profits for the farmer and the household.Farmland use determines the expansion of agriculture in the territory (rurality degree), giving rise to different characteristics of the regional agricultural sector.Agricultural expansion and land use intensification can cause adverse environmental impacts, and implementing different land use plans, mechanisms, and policies is crucial to mitigate some of these impacts (Di Falco and Zoupanidou 2017).
Hence, based on the discussion above, the study was intended to answer the following fundamental question empirically: in addition to factors associated with regional demand and agricultural technology, does the size of the property and the intensity of land use influence agricultural diversification in Brazilian municipalities?The results of this study reduce the information gap on farm diversification and contribute relevant information to improve food security, income stability, and the nutritional level of the Brazilian population.Then, the general objective is to analyze the determinants of agricultural diversification in Brazilian municipalities in the period from 1996 to 2017.Specifically, we intend to estimate an empirical model with spatial effects that allows the identification of the effects of regional demand and technology adopted by farmers, with emphasis on the effects of size farm and farmland use.We selected 4298 Brazilian municipalities covering the country's entire territory for the last three agricultural censuses (1996, 2006, and 2017).
The remainder of this paper is structured as follows.The second section presents an update of empirical studies on agricultural diversification; materials and methods are described in the third section; the fourth section presents results and discussion on diversification in Brazil, illustrated with maps, and provides the estimation results and the corresponding analysis.The conclusion is drawn in the last section.

Empirical evidence on the importance of agricultural diversification
According to Parré and Chagas (2022), a region or agricultural property is considered diversified if it grows multiple agrarian crops instead of focusing on a single crop (monocrop).Farmers who adjust their specialization from one crop to a more varied portfolio of crops are said to have diversified their agriculture system (Alam et al. 2023).Furthermore, the concept of agricultural diversification may include using productive resources together in varied agricultural activities (crop activities), and activities incorporating other income generation forms (non-crop activities) (Vroege et al. 2020;Monteleone et al. 2018).
An evolution in agricultural systems is necessary to achieve sustainability, balancing socioeconomic food production aspects with environmental objectives.Research results show that crop diversification significantly improves income stability, thereby supporting the idea of it being a resilience strategy (Mzyece and Ng'ombe, 2020;Ponce 2020).Isbell et al. (2021) researched the factors influencing the decision to maintain crop diversity among commercial and non-commercial seed producers in the US state of Vermont.The results suggest that seed producers maintain crop diversity for numerous reasons, including environmental, social, and cultural reasons.In addition to profit accumulation, diversity can act as a form of investment in natural capital and informal insurance for farmers whose value can be challenging to quantify in simple economic terms.The diversification of the production can bring market advantages, making it possible to migrate from the commodities market to the sale of differentiated goods with higher market value (Bowman and Zilberman 2013;Roest et al. 2017).In addition, farms might diversify by combining diversity of crop production with other income-generating activities such as livestock, agritourism, sales and processing of products on the farm, and nature conservation activities (Vroege et al. 2020;Monteleone et al. 2018).
Factors such as population size and individual income that determine the demand for agricultural products can drive agricultural diversification.Proximity to urban centers can generate consumer demand for a greater variety of local farm products (Zasada 2011).Proximity to tourist sites or urban areas can drive diversification into on-farm non-agricultural products, such as agrotourism activities, environmental services, and other products.However, the results from Boncinelli et al. (2018) revealed that farms located far from urban areas have a greater probability of diversifying than those close to urban areas.According to the authors, this result suggests the diversification process as an "endogenous" strategy to overcome the disadvantages arising from farm locations in more remote areas (i.e., high transport costs, fewer off-farm opportunities, and less networking) which reduces agriculture profitability.
Technological advances result in increased labor productivity in agriculture and labor migration to other sectors, resulting in decreased employment in the agricultural sector.Workers' gender seems to be a variable that influences diversification in agriculture.Decisions about agricultural land use, agricultural landscape, and activities linked to agrotourism are influenced by gender, and the presence of female farm workers is where to farm diversification activities (Villamor et al. 2014;Joo et al. 2013).
In the study by Pfeifer et al. (2009), farm size had a significant negative impact on the diversification of farm activities, suggesting that diversification may be a survival strategy for small properties that do not have the opportunity to increase in size.Research by Guarín et al. (2020) proposes a new typology of small farms in Europe, providing a picture of the diversity and nature of small farming.The findings suggest evidence of entrepreneurship and strong market linkages, suggesting diversification and multifunctionality in small farms in regions of Europe dominated by large-scale intensive agriculture.
According to FAO (2021), irrigation development is one aspect of agriculture intensification that has allowed total production to grow much faster than the cultivated area has grown.Irrigation resources and land quality are cited by some authors (Song et al. 2021;Alaofè et al. 2016) as physical environment factors that influence farmers' choice to adopt diversified crop production.The use of irrigation and soil improvement expands the production area and allows for diversification of production.Ndip et al. (2023) explore the relationship between land fragmentation and crop diversification using survey data from Cameroon.The outcome variable of interest is crop diversification, measured by the number of crops the household grows on different plots (count).Alongside fragmentation, the authors used covariates that can affect diversification, such as socioeconomic characteristics variables (age of household head, gender of household head, household size, availability of alternative sources of income); farming characteristics, such as farming experience; and institutional factors, such as access to extension services.The results indicate that fragmentation positively affects crop diversification, and farmers with more fragmented lands are more likely to diversify than those with fewer fragmented lands.Given that most smallholder agricultural households are the primary source of home-consumed food, fragmentation ensures that they cultivate diverse crops to provide a heterogeneous food basket for the household.Bernzen et al. (2023) analyze the (relative) impact and significance of relevant factors contributing to adopting crop diversification practices among farming households in coastal Bangladesh.The dependent variable in the study is crop diversification, defined by the prevalence of one or more types of crop diversification practices per household at the time of the survey and measured as a dichotomous variable with a value of 1, indicating households that apply crop diversification strategies.The results obtained by the authors showed that although direct economic factors appear to be more important for diversification decisions, the study also suggests that perceived environmental threats and changes can have a favorable influence on crop diversification and should, therefore, be included in studies that investigate the causes of changes in land use.Kumar et al. (2024) examined the adoption of crop diversification across Indian states, understanding the situation and identifying the key determinants of diversification.They calculated the crop diversification index employing the Theil Entropy index for all 28 Indian states and found that it has risen in most Indian states.The analysis finds that cropping intensity, gross state domestic product, rural road density, and operational holding have led to crop diversification.In contrast, credit, fertilizer, irrigation intensity, and electricity have led to crop concentration.

Materials and methods
For this research, given the objective of building indicators of agricultural diversification in Brazil and analyzing the diversification factors, it will be necessary to divide the methodology into sub-items.Initially, we present the research database.In the following section, we explain the diversification indices.Finally, we describe the methods used to calculate and analyze farm diversification.

Database specification
According to the last Agricultural Census (IBGE, 2017), Brazil has more than 5 million farms.Properties less than 100 ha represent 91% of Brazilian agricultural producers but occupy only 20% of the land.With 1000 ha or more, large establishments represent 1% of producers but occupy 48% of the total area (IBGE, 2017).This inequality motivates studies encompassing the entire national territory to draw a complete picture of the reality of Brazilian agriculture.
In this sense, the database of the present study covers all municipalities in the Brazilian territory, using data from the last three Agricultural Censuses (1996, 2006, and 2017).Because the number of Brazilian cities has increased over the years, we use the Minimum Comparable Areas (MCA) as units of observation to compare the same geographic area over time, following the methodology proposed by Ehrl (2017).In the present case, 4296 AMCs were considered, representing the municipalities existing in the 1990s.
In this research, we worked with the diversification of agricultural production, considering the Gross Value Production (GVP) of temporary crops, permanent crops, horticulture, and forestry, and the GVP of cattle, pigs, and poultry-according to the Brazilian Institute of Geography and Statistics-totaling 87 products.Using monetary values to make them compatible was necessary, as land use does not have a standard unitary measure between all activities.
The data covers the years 1996, 2006, and 2017 for the Brazilian municipalities.The monetary values were deflated to December 2017, based on the General Price Indexinternal availability (IGP-DI), prepared by Fundação Getúlio Vargas (FGV).Other variables were obtained from additional secondary data sources.Tables 1 and 2 present a list of variables used in the research, their descriptions, and their respective descriptive statistics.
The variables sizefarm and landfarm represent the effects of the size of the farm (sizefarm) and the intensity of agricultural use of land or rurality degree (landfarm) in the municipalities on the decision of producers to diversify their production (Di Falco and Chavas 2008;Pfeifer et al. 2009;Weltin et al. 2017;Ndip et al. 2023).
The population, wage, and GDPpc variables represent the effects of demand from municipalities.They were grouped into a single variable called Demand.Market access and regional characteristics can encourage additional cash income through crop diversification (Benin et al. 2004;Anwer et al. 2019;Bernzen et al. 2023).
The productivity variable characterizes the economic performance of agriculture in the cities (Kurdy's-Kujawska et al. 2021;Parré and Chagas 2022).The technological characteristics of the municipalities' agriculture are captured by the variables assistance, fertilizer, and irrigation, representing the proportion of farmers in the municipality that make use of technical assistance, fertilizers, and irrigation, respectively (Di Falco and Zoupanidou 2017; Donfouet et al. 2017;Anwer et al. 2019;Mzyece and Ng'ombe, 2020;Kumar et al. 2024).The relationship between agricultural technology and diversification may present divergent results, considering the region analyzed, the technological level of the agricultural sector and the size of the properties.Diversification measures require investments in technology to increase agricultural productivity.Crop diversification may improve the economic efficiency of small farms.Crop diversification decisions can represent a trade-off between productivity and resilience (income volatility) for small farmers.The variable female illustrates the importance of the female workforce in agriculture (Mazzochi et al. 2020;Mzyece and Ng'ombe, 2020).

Agricultural diversification index
This study will use three indicators of agricultural diversity in Brazilian municipalities, which share the same primary input (proportion of individuals about the total), namely: Simpson index (D), Shannon index (H), and the Effective number (EN) (Shannon, 1948;   Simpson 1949; Magurran 1988).Simpson's index will be used in the econometric analyses, while the other indices will test robustness.We adopted the Simpson index in the econometric analysis of the study due to the following factors: (a) the D index shows a similarity with the Herfindahl index, widely used in economic concentration literature; (b) the index scale ranges from 0 to 1; making the interpretation simple and comparable between regions.
Several authors adopted the Simpson diversity index to analyze agricultural diversity (Sambuichi et al. 2016;Sen et al. 2017;Piedra-Bonilla et al. 2020a;Bellon et al. 2020).According to Magurran (1988), the Simpson index indicates the probability that any two individuals, randomly drawn from an infinitely large community, belong to different species.Still, according to the author, the most abundant species in the sample have a higher weight in the Simpson index, which is less sensitive to species richness compared to other indices.The index assumes the maximum value of 1 when there is only one species (complete dominance) and a value close to zero when there is a high number of species; thus, as the value of the index increases, diversity decreases. 1For this reason, the Simpson index is generally expressed as its value subtracted from 1, making interpretation more intuitive: the higher the index, the greater the diversity.The index is defined as where p i is the proportional value of the i-th crop in the total value in a specific geographic location (municipality), and n is the total number of agricultural products in the area.It considered 87 products (temporary crops, permanent crops, horticulture, forestry, value of heads of cattle, pigs, and poultry).
The Shannon diversity index is commonly used in agricultural diversity studies (Donfouet et al. 2017;Monteleone et al. 2018) and is expressed by: where ln is the natural logarithm, and the other variables were already defined.
According to Magurran (1988), the Shannon index presents values between 1.5 and 3.5.
The effective number is an indicator of diversity derived from the Shannon index: where exp is the exponential function; for example, the effective number with a value of 4 indicates that a municipality has approximately four types of major crops.

Econometric model
The farmer's choice to adopt productive diversification can be perceived as an investment decision based on the maximization of expected utility (Vroge et al. 2020).We (1) 1 According to Magurran (1988) this initial version of the index is given by i = 1npi2.According to Di Falco and Zoupanidou (2017), agricultural production is a process that involves the choice of inputs to obtain a certain level of production.Another critical decision by farmers is which crops they will produce in a given period (harvest) and how much land each.The decision involves a socioeconomic and physical environment analysis, considering farmers and farm characteristics, the available resources and technologies, the crop's demand and prices, government incentives, and the natural production region characteristics (Anwer et al. 2019;Benin et al. 2004;Sen et al. 2017;Culas and Mahendrarajah 2005;Donfouet et al. 2017;Waha et al. 2018;Davis et al. 2012;Bellon et al. 2020;Parré and Chagas 2022).
Therefore, in the present study, we estimate a-spatial and spatial data panels for the 4296 municipalities of Brazil from 1996 to 2017 (3 years Census), totaling 18,888 observations.Specifically, to verify the determinants of agricultural diversification, the following a-spatial function will be estimated: where the subscript i denotes municipality (i = 1,…, 4296), the subscript t denotes time periods (t = 1, 2, 3), and k (j = 1,…, K) denotes the K independent variables.D it is the Simpson diversity index in logs, α is the constant term, x it is a vector representing the independent variables in logs, and β k is a vector of parameters related to each one; ε it is the error term.
The neighborhood may influence some explanatory factors of diversification in a given farm or region.In technical terms, an explanatory variable in one municipality may have an indirect effect, influencing the dependent variable (spatial spillover).In this sense, the spatial models (SLX, SDM, or SDEM) are applied in this study, which incorporates the spatial effects in the explanatory variables (Gibbons and Overman 2012;Elhorst and Vega 2015;Jiang et al. 2014Jiang et al. , 2018;;Vroege et al. 2020;Parré and Chagas 2022). (4) Some tests are performed to choose the best specification of the spatial panel data models.Mutl and Pfaffermayr (2011) extend the procedure of the Hausman test for a spatial panel data model in which the random and fixed effects estimators are compared and tested to determine whether the data support the assumption of random effects.If the random effects hypothesis is not rejected, then the random effects methods must be used.Millo and Piras (2018) developed Lagrange-LM multiplier tests for deciding whether SAR or SEM better fit the data.The LM tests for choosing between SAR and SEM can be of the standard type or the locally robust type, which has suboptimal statistical properties to ideal conditional tests.These assume that there is no SEM component (SAR) in the data generation process and, when rejected, indicate that these spatial effects are present.

Results and discussion
Agricultural production diversification in Brazil Mazzocchi et al. (2020) state that research on agricultural diversification should incorporate time dynamics to verify changes in the diversification process.Figure 1  Figure 2 shows Simpson's index maps for municipalities in Brazil for the years 1996, 2006, and 2017.We prepared the maps using the same diversity classification categories to illustrate the spatiotemporal dynamics of the index.Considering an average value of 0.6, we can divide the municipalities into two large groups, above and below the average.In 1996, Brazil had 30% of the municipalities below and 70% above this average.In 2017, the values changed to 46% below average and 54% above.This finding demonstrates a balance between municipalities with diversified and concentrated production, with a slight tendency toward local concentration of agricultural production in the country.Brazil's results regarding the effective number at the municipal level are unprecedented.They can be considered essential to this study to understand Brazil's agricultural production evolution.The findings indicate that the process of agricultural diversification has decreased in most municipalities in Brazil.Figure 3 demonstrates this dynamic; in 1996, most municipalities had an effective number value between 6 and 8 (blue), which means that there were at least six types of crops in most municipalities; by 2017, most municipalities were in the range of 2 to 4 (orange).Our analysis revealed interesting trends between and within different production regions.These results show that nationally, the municipalities are grouped in low (Central-West, State of São Paulo) and high diversity (Northeast Region and states of Santa Catarina and Minas Gerais).Parré and Chagas (2022) calculated the effective number for states of Brazil and found a decrease in its value of -0.91% per year from 2002 to 2018.
It is possible to compare this result with similar studies for the USA (Aguilar et al. 2015), India (Smith et al. 2019), andChina (Lui et al. 2022).While the USA  experienced a reduction in crop diversity and China (1980China ( -2014) ) experienced an increase in diversity, India  presented a situation of stability in its districts.Brazil's results are like those obtained for the USA (average 4, with a heterogeneous pattern between regions) but lower than those calculated for China (average 7, with an increase in diversity in two-thirds of the municipalities) and India (average 6, with stability).Despite the difference in intensity, all countries show a typical behavior, with changes in agricultural diversification varying between and within regions.The global agricultural land area was 4.8 billion hectares (ha), about 38 percent of the global land surface.Roughly one-third of this is used as cropland (1.6 billion ha in 2019), while the remaining two-thirds consist of permanent meadows and pastures (3.2 billion ha in 2019).Although agricultural land decreased since 2000, it increased on average by 0.1 percent each year over the 1961-2019 period, with a significant expansion up to the 1990s (FAO 2021).In the Brazilian case, there was a considerable increase in the cropland, from 54.9 million hectares in 2000 to 63.5 million in 2019 (FAO 2021).
The average size of farms in Brazil decreased from 103 hectares in 1996 to 82 hectares in 2017 (Table 2).The spatial distribution of this variable showed little change between the years analyzed, with the largest farms (area greater than 500 hectares) located mainly in the states of Mato Grosso and Mato Grosso do Sul, located in the country's Midwest region (Fig. 4).In the north and southeast regions (states of São Paulo and Minas Gerais), there is a predominance of medium-sized properties (100 hectares).In the south and northeast, there are smaller properties with household farm practices (Fig. 4).
According to Embrapa (2018), land use in Brazil can be divided as follows: Crops and planted forests occupy 9% of the territory; cultivated pastures, 13%; and the native ones, 8%.Permanent preservation areas (indigenous lands, conservation units), native vegetation on non-registered lands, and areas on private properties separated according to environmental legislation-such as Legal Reserve and protection areasrepresent 66% of the Brazilian territory.Cities and infrastructure occupy the remaining 4% of the total area.Figure 5 shows a significant occupation of agriculture in the interior of Brazil, emphasizing the interior of the southeast and southern regions and the entirety of the Midwest region.Notably, these regions have increased their cultivation of corn and soybeans, high-tech crops that use large land areas.While the primary crops of beans and potatoes decreased in area.We can also observe that the Amazon region has a low percentage of land area devoted to agriculture.
This panorama remained constant during the period analyzed in the study.However, within the regions, there is a change in land use, with agriculture suffering pressure from urbanization and changes in the regions' infrastructure, mainly in the southeastern and southern areas of the country.In 1996, Brazil had 78% of municipalities with more than half of the area occupied by agricultural activities; in 2017, this figure decreased to 71%.

Econometric results
After checking the Hausman test,2 which indicated the application of the fixed effects model, we employ the Lagrange multiplier (LM) test to identify whether spatial models are more appropriate than non-spatial models.These tests also allow you to choose between models from the SAR or SEM family (Anselin et al. 1996).The results are exhibited in Table 3.The tests indicated that the appropriate model is the SEM family model.The null hypothesis of the nonexistence of spatial effects was not rejected for the robust lag test, considering individual and time fixed effects.The last column presents the SLX specification, with the explanatory variables' lags.In this case, the test values in their standard version are statistically not significant, meaning that the residuals have no spatial dependence.
The neighborhood effects are essential for analysis when adopting crop diversification (spatial spillover), as shown in the statistical test.Also, some of the farmers' decisions are strongly influenced by the behavior of agents located in neighboring regions (Vroege et al. 2020;Lapple et al. 2017), which confirms the empirical tests.We analyzed the  results of the SDEM and SLX models to verify the determinants of agricultural diversification for the municipalities in Brazil.
According to Table 4, farm size (lnSIZEFARM) has the most prominent global direct effect on the diversity of Brazilian agriculture, and this effect is negative.This effect demonstrates the importance of small farms in agriculture in Brazil and their role in economic resilience and food security.These farmers also understand that diversifying their portfolios reduces risk (Pfeifer et al. 2009;Weltin et al. 2017).Farm size influences diversification, small farms often struggle to participate in profitable markets and do not benefit from scale gains; therefore, diversification becomes necessary (Pfeifer et al. 2009;Mazzocchi et al. 2020).The local spillover effect in the SDEM model is positive (W*lnSIZEFARM), but with a small coefficient value and significant only at 10%.This result may indicate that large farms are starting a process of diversifying their production, meeting local demand.
Although some regions present a development and urbanization process, a large part of the Brazilian territory is used for agricultural activities.Brazilian farmland is constantly changing, following different development trajectories.Some livestock areas have been occupied by crops, while livestock has been moved to frontier areas.Table 4 also presents the effect of the variable farmland on diversity, and the positive and significant sign explained by the variable indicates that regions where agriculture is important and dominant present greater diversification of production.However, this variable had no significant spillover effect.According to Van Vliet et al. (2015), several factors influence the farmland use intensity and territory occupation, highlighting economic, technological, institutional, and locational factors, besides demographic and sociocultural factors.These factors can result in agricultural land expansion or contraction, defining the landscape's characteristics and regional agriculture.
As shown in Table 4, the components of the demand vector-population, GDP per capita, and wage-demonstrated a negative global impact on agricultural diversification, as was found in Boncinelli et al. (2018) and Liu et al. (2022).The diversification process becomes a strategy to overcome the disadvantages of locating in isolated areas with low profitability.The results of Liu et al. (2022) pointed out that population density has a negative impact on crop diversity in China, indicating that high population density counties have lower diversity.For the authors, this result is influenced by the fact that China has a large population concentrated in rural areas; therefore, farmers will choose crops to plant according to their knowledge, tradition, and preferences.However, in our study, when spatially lagged variables are incorporated, the effects of local demand spillover are positive on diversity (Table 4), indicating, as Zasada (2011) concluded, that proximity to urban centers can generate consumer demand for a greater variety of local farm products.
The productivity variable had a negative and significant global effect and a non-significant spillover effect.Parré and Chagas (2022) also obtained a negative sign for productivity considering the states of Brazil.They explained that the possible cause is that the variable is calculated based on monetary values, which gives high weight to the agricultural commodity market.
Mazzochi et al. (2020) used the percentage of female farm managers to verify the potential connection between gender and the choice of different agricultural activities in the municipalities of Italy.The results indicated that the percentage of female farm managers did not influence the implementation of agricultural activity diversification.
In the present study, the percentage of female workers in agriculture was used to verify the relationship between labor gender and diversification.The global results are the same as those obtained by Mazzochi et al. (2020), that is, not significant (Table 4).However, when considering the local effects, a negative relationship was observed between the percentage of female workers and farm diversification, contrary to what was expected in the literature (Villamor et al. 2014).This result may be influenced by the low percentage of female workers in Brazilian agriculture, which is only 28% (Table 2).
Table 4 shows that the technical assistance variable had a negative and significant global effect and a non-significant local spillover effect.According to Table 2, on average, only 29% of Brazilian farms receive assistance, and apparently, the guidance received by farmers is not encouraging them to diversify their production.We can also expect municipalities with more diversified agriculture to have little technical assistance coverage.According to Table 4, the fertilizer variable presented a global positive effect on diversity and a non-significant spillover effect.This finding reveals that farmers who adopt diversification have a sophisticated technological level with fertilization and soil correction practices.
In global terms, irrigation positively affected Brazilian agriculture's diversification (a positive and significant sign).This result is corroborated by previous studies (Song et al. 2021;Alaofè et al. 2016).The authors explain that water availability can expand the cultivated area, allowing a greater diversity of production.
However, irrigation has a negative and significant spillover effect, and the literature also discusses this situation.The findings by Liu et al. (2022) for counties in China revealed that irrigation had negative spillover effects on crop diversity.The authors consider that this small negative impact occurs because irrigation contributes to large areas of farmland that can be specialized, which, in turn, reduces crop diversity.
The regression coefficients from the study by Jong et al. (2021) indicated significantly negative relationships between agricultural production (the proportion of irrigated area and land quality) and crop diversity.The authors justified the results by arguing that improvements in agricultural production conditions, including advances in water resource reliability and improvements in farmland fertility, can reduce crop diversity by contributing to large-scale agricultural operations based on monocropping to maximize labor productivity.

Conclusions
This article analyzes the effects of demand, technology, size farm and farmland use on agricultural diversification in Brazilian municipalities using data panel from the last three Agricultural Censuses (1996, 2006, and 2017).Additionally, the spatial spillover effects were incorporated into the explanatory variables.
This study demonstrates the importance of agricultural diversification, especially for small Brazilian farmers, as a rational production strategy that can significantly reduce the risks inherent in farming, provide income security, and positively impact the rural population's nutritional aspects.
The diversification indexes continuously decreased, indicating production concentration in the period.The findings also demonstrate a tendency toward local concentration of agricultural production in the country.The results for Brazil concerning the effective number at the municipal level are unprecedented and indicate an average value of 4 with a heterogeneous pattern among the country's regions, which means that there are, on average, four types of agricultural products in most municipalities.
Did this research investigate the cause of this behavior in the agricultural diversification index?What determines farmers' choice to produce few agricultural products?Consumer market characteristics, farm characteristics, available technology, and public incentive policies were considered.
The importance of small farms and regions with a high degree of rurality in adopting diversified production systems was verified.In technological terms, it was found that diversified farms have lower productivity when compared to farms that do not diversify.However, the findings reveal that farmers who adopt diversification have a more sophisticated technological level.This finding contributes to the international literature on agricultural production diversity and formulating public policies encouraging small farms in Brazil.
The government provides a large proportion of the technical assistance Brazilian farmers receive.In this sense, it is essential to analyze the effect of the technical assistance variable on agricultural diversification, which had a negative and significant global impact.This finding indicates that Brazilian farmers receive little incentive to adopt more diversified production systems.
The findings of this research can help to understand the role of agricultural diversification in national food security strategies and the factors needed to encourage more diversified production.Future research should focus on improving technical assistance conditions for small farms and integrating diversification and farm management strategies to reduce risks in Brazilian agriculture.
formalize the investment decision of farmers followingVroge et al. (2020)  andWolnni  and Anderson (2014)  with some minor adjustments to fit the context of our study.The farmer is assumed to adopt agricultural diversification if and only if: with where U i a is utility of farmer i from activity a (D = diversification in activity a, ND = no diversification in activity a), π i a is the profit, TC i a is the transaction cost of converting from not diversify farming to diversify farming, Δπ i a is the increase in profit experienced by farmer i as a result of the chosen activity, p are output prices, q is the production function, S are structural farm characteristics, L are locational factors on the farm, and C and v are quantity and prices of inputs used on the farm.
shows that during the analyzed period, all diversification indexes showed a continuous decrease in values, indicating production concentration.Piedra-Bonilla et al. (2020) also obtained an average value of the Simpson index equal to 0.59 for municipalities in Brazil in 2006.However, these authors did not calculate the indexes for 1996 and 2017.Parré and Chagas (2022) also showed a trend of production concentration from 2002 to 2018 in Brazil, according to Simpson's and Shannon's indices.Figure 1 also shows a decrease in the effective number, with a value of 4 in 2017, a value equal to what Aguilar et al. (2015) calculated for the USA.

Table 1
Variables used in the research

Table 2
Descriptive statistics of the data used in the analysis Shannon, Simpson, and effective number for Brazilian municipalities Source: Research results.Medium values

Table 3
Lagrange multiplier tests for spatial dependence on panel data.Source: Results of research Queen Matrix; Figures in parentheses are the p-value; *p < 0.1, **p < 0.05, ***p < 0.