Locationally Varying Production Technology and Productivity: The Case of Norwegian Farming

: In this study, we leverage geographical coordinates and ﬁrm-level panel data to uncover variations in production across different locations. Our approach involves using a semiparametric proxy variable regression estimator, which allows us to deﬁne and estimate a customized production function for each ﬁrm and its corresponding location. By employing kernel methods, we estimate the nonparametric functions that determine the model’s parameters based on latitude and longitude. Furthermore, our model incorporates productivity components that consider various factors that inﬂuence production. Unlike spatially autoregressive-type production functions that assume a uniform technology across all locations, our approach estimates technology and productivity at both the ﬁrm and location levels, taking into account their speciﬁc characteristics. To handle endogenous regressors, we incorporate a proxy variable identiﬁcation technique, distinguishing our method from geographically weighted semiparametric regressions. To investigate the heterogeneity in production technology and productivity among Norwegian grain farmers, we apply our model to a sample of farms using panel data spanning from 2001 to 2020. Through this analysis, we provide empirical evidence of regional variations in both technology and productivity among Norwegian grain farmers. Finally, we discuss the suitability of our approach for addressing the heterogeneity in this industry.


Introduction
Some of the more common assumptions in the econometric estimation of production function are related to the independence and homogeneity of the production units. That is, the production technology is assumed to be homogeneous, and possible externalities (spillover effects) are ruled out. However, in the context of farming, where production is primarily a biological process, this may not be the case. For this reason, the analysis of agricultural production should typically be more nuanced and account for differences in technology that satisfy the environmental and social conditions within which farms operate. Farming is also a somewhat unique industry in terms of the extent to which it is possible to get a handle on the natural characteristics of land that determine natural advantages, such as soil type and moisture, plant fertility, the potential for crop diseases and weed infestations, the gradient of the land, the climate, etc. (e.g., Holmes and Lee 2012;Postiglione et al. 2022). As an example, farmers usually choose to grow varieties that are best suited to the environmental and climatic conditions in which the farms operate.
Heterogeneity also arises because of the way the economic system works. Some farms have advantages because they are located close to markets (which implies lower transportation costs, either to the local market or to food processing) and/or have easier access to labor, human capital, and expert advisors. It can also be due to differences between farms and regions in terms of government restrictions, support systems, etc. (e.g., Capello 2009). All of the above-mentioned aspects require agricultural production analyses (and their corresponding production functions) to account for heterogeneity. Further, existing studies in the literature support the idea that producers do not even operate on the basis of a single homogeneous technology (e.g., Dosi and Nelson 2010;Eberhardt and Teal 2013;Just and Pope 2001;Mundlak 2001;Syverson 2011).
For this reason, many existing studies control for the possibility of heterogeneous technology. One way is to use classification (e.g., firm location) or cluster analysis (statistical classification based on some observed variables) to estimate different production functions for each class or group (e.g., Álvarez et al. 2008). This "observed" classification to deal with heterogeneity among firms is challenging. The identification of heterogeneity requires comprehensive spatial modeling of soil as well as agronomic and climatic properties, including changes through time. This identification then requires processing of large quantities of data acquired at a very fine spatial resolution. In practice, it is hard or even sometimes impossible to gain access to all these data for "observed" classification, and researchers often need to rely on only a few control variables. Therefore, a drawback of this "observed" classification approach of splitting a sample of observations (firms) is that differences in technology will typically be the result of both observed and unobserved heterogeneity (Billé et al. 2018).
Modeling unobserved heterogeneity can be accomplished via finite mixture/latent class methods, nonparametric methods, and fixed/random effects panel data analyses (e.g., Greene 2005;Kumbhakar and Tsionas 2010;O'Donnell and Griffiths 2006;Orea and Kumbhakar 2004;Saint-Cyr et al. 2019;Sauer and Paul 2013). However, this approach cannot strictly identify which technology is used by which firm.
The extension beyond the cross-sectional input use and outcome of the production function analysis framework so far in the agricultural production economics literature has mostly been on the temporal dimension (i.e., the time series aspects of the analysis) and firm/farm heterogeneity (as reviewed briefly before). In other words, in the literature on agricultural production economics, the temporal analysis of economic development and firm heterogeneity has received the most attention, and the variable "space" has typically received less attention and is often neglected (e.g., Capello 2009;Eberhardt and Teal 2013;Isard 1954). This is clearly pointed out by Just and Pope (2001) (p. 651): 1 "Spatial dimensions of input groupings may be particularly important in agriculture because the inputs must be tailored to the heterogeneity of firm resources, which differ substantially by climate and land quality (location)." There are several commonly given reasons for this, including the need to simplify the treatment and models (Capello 2009), data limitations (Just and Pope 2001), and lack of access to computer power for estimation.
There are two distinguishable spatial effects that can be identified: spatial dependency and spatial heterogeneity. Spatial dependency, which involves analyzing the transfer of effects between locations, is a specific case of cross-sectional dependence. It arises from the correlation or covariance structure between random variables at different locations, determined by their relative positions (distances) in geographic space. Analyzing spatial dependency often requires specialized techniques, such as spatial lag models (SLM), spatial autoregressive models (SAR), spatial cross-regressive models (SLX), or spatial error models (SEM) (Anselin 2010). Although these approaches consider spatial relationships in terms of output/input quantities at the local level, they assume that the production technology remains consistent for all firms or farms. In other words, these methods do not account for the spatial heterogeneity in production technology across different locations. Among others, the concept of spatial dependency in agricultural production economics has been used to analyze crop diversification (e.g., Holmes and Lee 2012), drivers of technology adoption (e.g., Läpple and Kelley 2015;Läpple et al. 2017;Schmidtner et al. 2012), land rental intentions (e.g., Skevas et al. 2018), pesticide use (e.g., Aida 2018), variation in farmland values (e.g., Wang 2018), and analysis of policy intervention (e.g., Storm et al. 2015).
Spatial heterogeneity is a special case of unobserved heterogeneity. This framework accounts for the absence of stability and implies estimating parameters that vary over space. In contrast to spatial dependency, this framework does not always require a separate set of methods. Spatial heterogeneity provides the basis for the specification or structure of heterogeneity in a spatial model (Anselin 2010). In the literature, we find several studies that have used locally weighted regression (LWR) (McMillen and Redfearn 2010) or geographically weighted semiparametric regressions (GWR) (Brunsdon et al. 1996). Past applications within agricultural production economics include analysis of spatial regimes in olive farm technology in Italy (Billé et al. 2018), factors affecting fertilizer use efficiency in China (Bai et al. 2021), and space-time patterns of regional industrial resilience among Italian wine producers (Canello and Vidoli 2020).
In this study, we employ the spatial heterogeneity approach proposed by Malikov et al. (2022) to examine the productivity of the Norwegian grain farming sector. This approach entails estimating a production function that is specific to each firm and location, using a semiparametric proxy variable regression estimator. The parameters of the model are nonparametric functions derived from the geographical coordinates (latitude and longitude) of the firms, which are estimated using kernel methods. The model incorporates productivity components to account for the factors that influence productivity. This methodology enables us to estimate technologies that are specific to each firm and location, as well as productivity measures that are specific to each firm and location. Unlike, for example, the GWR approach mentioned earlier, our method can handle endogenous regressors through a proxy variable estimation technique. We applied this model to analyze the productivity of Norwegian grain farmers using panel data at the farm level, covering the period from 2001 to 2020. The significance of our study lies in evaluating the effectiveness of utilizing the aforementioned approach, which incorporates location-and firm-specific semiparametric production functions with longitude/latitude coordinates as a means to capture spatial variations among firms/farms and locations when analyzing production technology and productivity within the farming industries.

Locational Heterogeneity in Production
Consider firm i (i = 1, . . . , n) during time period t (t = 1, . . . , T). In line with the existing productivity literature (e.g., see Ackerberg et al. 2015;Blundell and Bond 2000;Collard-Wexler and De Loecker 2015;Doraszelski and Jaumandreu 2013;Konings and Vanormelingen 2015;Levinsohn and Petrin 2003;Olley and Pakes 1996), we make the assumption that the firm employs physical capital K it , labor L it , land N it , and an intermediate input such as materials M it to generate a single output Y it using Cobb-Douglas production technology, which incorporates unobserved Hicks-neutral productivity: where s i = (s 1i , s 2i ) represents the fixed location of firm i, and s 1i and s 2i are the latitude and longitude coordinates of the firm's location. A 0 (s i ) is a firm-and location-specific scalar constant; (α K (s i ), α L (s i ), α N (s i ), α M (s i )) are firm-and location-specific input elasticities; and ω it is the firm's persistent productivity, which is known to the firm at time t but unknown to others and which, as we discuss later, follows an evolution process that is also specific to firm location. By incorporating location-specific heterogeneity in the elasticities of inputs and persistent productivity, we account for the effects of technology spillovers and agglomeration economies, which are influenced by local neighborhood effects. Additionally, following the literature, we introduce η it as a random, independent, and identically distributed (i.i.d.) productivity shock. We assume that η it is a random i.i.d. productivity shock such that E[η it |I it ] = E[η it ] = 0, where I it is the information set available to firm i for making period t production decisions. Thus, the expectation of exponential random shock η it is θ ≡ E[exp{η it }| I it ] = E[exp{η it }], which is a constant. As such, θ does not play an important role; it is a nuisance parameter. Since the production shock is unknown due to the presence of η, the conventional procedure is to eliminate it by assuming the expected profit maximization (shown later in Equation (4)), which involves the expectation of E[exp{η it }].
Following the productivity literature (e.g., Gandhi et al. 2020;Malikov and Lien 2021;Malikov and Zhao 2021;Malikov et al. 2020Malikov et al. , 2022, physical capital K it , labor L it , and land N it are subject to adjustment frictions (e.g., time-to-install, hiring/training costs). The firm optimizes these inputs dynamically at time t − 1, making them predetermined (quasi-fixed) state variables at time t. Materials M it are determined statically by the firm at time t, making it a freely varying (flexible) input. Thus, K it , L it , and N it are state variables that follow the dynamic laws of motion, viz., where I it , H it , δ, and ∆N it−1 are gross investment, net hiring, the depreciation rate, and net change in land use, respectively.
Building on insights from the proxy variable literature (e.g., De Loecker 2013; Doraszelski and Jaumandreu 2013; Gandhi et al. 2020;Malikov and Lien 2021;Malikov and Zhao 2021;Malikov et al. 2020Malikov et al. , 2022, we utilize a first-order Markov process to capture the dynamics of firm productivity ω it . The evolution of ω it , representing the productivity of the firm, is shaped by a range of factors, denoted as X, which are specific to the particular empirical context. Thus, ω it is modeled according to a location-varying controlled first-order Markov process: where h |s i (·) is the conditional mean function of ω it , which varies across space, and ζ it is a random innovation in persistent productivity that is unanticipated by the firm at period The relationship between ω it and the control variables X it incorporates a lagged structure in the evolutionary process, as defined by Equation (3). This acknowledgment implicitly recognizes that activities aimed at enhancing productivity and learning incur costs and may require time to produce tangible results. Additionally, in E[ζ it | I it−1 ] = 0, we assume that, given the adjustment costs, firms do not experience changes in their productivity-related investments in light of productivity innovation. That is, a firm cannot anticipate innovation ζ it and chooses the level of X it−1 in period t − 1 based on its knowledge of the contemporaneous productivity ω it−1 . These structural timing assumptions about ζ it are common in models with controlled productivity processes (e.g., Van Biesebroeck 2005; Jaumandreu 2013, 2018;De Loecker 2013;Malikov et al. 2020Malikov et al. , 2022 and are needed to identify productivity-enhancing learning effects. Given the intermediate input M it is freely varying and thus affects profits only in the current period, the risk-neutral firm chooses its optimal level of freely varying input M it via solving the (static) restricted expected profit-maximization problem subject to the already optimal dynamic choice of quasi-fixed inputs: where P Y t and P M t are the output and material prices, respectively, both of which are competitively determined, and θ ≡ E[exp{η it }| I it ]. The firm's conditional demand for M it is derived by applying the first-order condition with respect to the input variable M.
Following Jaumandreu (2013, 2018), the firm's dynamic optimization problem is described by the following Bellman equation: where is the restricted profit function derived as a value function corresponding to the static problem in (4); and C κ t (·) is the cost function for capital (κ = I), labor (κ = H), land (κ = ∆N), and productivityenhancing activities (κ = X). In the dynamic problem above, the level of productivityenhancing activities X it+1 is chosen in the time period t + 1, unlike the amounts in the dynamic inputs K it+1 , L it+1 , and N it+1 , which are chosen by the firm in the time period t (through I it , H it , and ∆N it , respectively). By solving (5), we obtain the optimal policy functions for I it , H it , ∆N it , and X it .

Proxy Variable Identification
Taking the logarithm of the locationally varying production function in (1) for both sides and substituting for the Markov process ω it using (3), we obtain: (6) where the lower-case variables correspond to the log forms of the corresponding uppercase variables.
According to our structural assumptions, all the regressors on the right-hand side of (6) are predetermined and weakly exogenous with respect to ζ it + η it , except for the freely varying input m it . The firm chooses the freely varying input m it in period t based on its knowledge of ω it , which makes it correlated with ζ it . Therefore, m it is endogenous. Before tackling the endogeneity of m it , to consistently estimate (6), we first need to address the latency of firm productivity ω it−1 . Following the established methodology in the productivity literature, we adopt a proxy measure to capture latent productivity. This is accomplished by utilizing the structural relationship between the production function and the firm's (static) first-order condition associated with the input which can be freely adjusted.
First step. We first identify the material elasticity function β M (s i ). To achieve this, we investigate the optimality condition of the firm regarding M it in Equation (4), which can be expressed in logarithmic form as: ln Using the production function in (6), we rewrite the first-order condition in terms of the following location-specific material share equation: where We then identify θ from: Combining (9) and (10), we identify the firm's material elasticity β M (s i ) as: Using the already identified material elasticity β M , we rewrite (6) as follows: where y * it ≡ y it − β M (s i )m it on the left-hand side is already identified/observable and, hence, the regressors in (12) are all exogenous. However, we cannot estimate (12) as is because ω is unobserved. In the next step, we express ω in terms of observables.
Second step. To identify the remaining parameters of the production function, including latent firm productivity, we employ (7) to derive the explicit form of the conditional demand function for M it . We then invert this function to serve as a proxy for the unobservable scalar ω it . In other words, by utilizing the inverted (log) material function (12), to obtain: where Since all the regressors included in Equation (13) are weakly exogenous, we can establish the identification of Equation (13) by employing the moment conditions: After obtaining the parameters of the identified production function and the productivity shock η it , we can easily recover ω it up to a constant via

Semiparametric Estimation
To estimate location-varying production technology and the evolution of productivity, we employ the local-constant kernel fitting method for the first-and second-step estimations in (8) and (13).
Denote the unknown term ln[β M (s i )θ] as a non-parametric function specific to the location s i . We represent this function as b M (s i ). Assuming that these input elasticity functions are smooth and twice-continuously differentiable in the neighborhood of correspondingly, the local-constant kernel estimator of ln[β M (s)θ] is given by where K h 1 (s i , s) is a kernel function that assigns weights to each observation based on the proximity of their geographic coordinates s i to the value s. Instead of using a "fixed" bandwidth parameter, which may result in over-smoothing in dense data regions and under-smoothing in sparse tails, we opt for an "adaptive" bandwidth approach. This adaptive bandwidth allows us to adjust the smoothing parameter on the basis of the local distribution of the data. By adapting to the data's characteristics, our approach offers a more flexible and accurate estimation of the underlying patterns. To be precise, we utilize an h 1 -nearest-neighbor bandwidth denoted as R h 1 (s) to assign weights to the observations: where S (h 1 ) is the h 1 st nearest neighbor (i.e., location) of s. R h 1 (s) represents the Euclidean distance between the fixed location s and its h 1 st nearest location among s i . This distance measure is location-specific, which allows it to adapt to the distribution of the data. Correspondingly, the kernel weight function is defined as: where K(·) represents a non-negative smooth kernel function that integrates to unity. In this study, we employ a commonly used second-order Gaussian kernel. The range of values over which this kernel function is defined is non-negative. The choice of the number of nearest neighbors, denoted as h 1 , determines the level of smoothing or weight in the first-step estimator given by (16). To determine the optimal value for h 1 , we employ a data-driven cross-validation procedure.
From (11), the first-step estimator of β M (s) is: Using the local estimates of β M (s i ) from the first step, we construct y Following the first-step estimation, we employ a local-constant approach to locally approximate each unknown parameter function in (13) at points s i in proximity to s. In addition, the secondstage estimation requires the choice of an approximator for the unknown h |s i (·). We use the popular first-order polynomial sieves (e.g., Chen 2007). Therefore, for locations s i near s, we have Denoting all unknown parameters in (20) collectively as Θ(s) = [β K (s), β L (s), β N (s), λ 0 (s), λ 1 (s), λ 2 (s)] , we estimate the second-step equation using locally weighted non-linear least squares. The corresponding kernel estimator is: where h 2 is the number of nearest neighbors of a fixed location s in the second-step estimation. Finally, having obtained the identified parameters, we calculate the firm productivity using the estimated values. Specifically, we compute Inference. Due to the multistep nature of our estimator and the presence of nonparametric components, calculating the asymptotic variance of the estimators is not straightforward. 3 Therefore, we employ a bootstrap approach for statistical inference. Specifically, we utilize Efron's (1987) bias-corrected bootstrap percentile confidence intervals, which correct for the finite-sample bias of the estimators. To approximate the sampling distributions of the estimators, we employ a wild residual block bootstrap method that takes into account the panel structure of the data. We perform the bootstrap resampling jointly for both stages, since the estimation in the second stage relies on the first-stage estimator. We performed B = 999 bootstrap iterations to ensure reliable results. 4 Let Ψ represent the estimand of interest specific to each observation, such as the coefficient of elasticity of the material β M (s i ) for a firm. For two-tailed hypotheses, we can estimate the two-sided bias-corrected (1 − a) × 100% confidence interval for Ψ using the empirical distribution ofΨ 1 , · · · ,Ψ B . Specifically, the confidence interval lies between the [a 1 × 100]th and [a 2 × 100]th percentiles of the bootstrap distribution. Here, a 1 = Φ 2 z 0 + Φ −1 (a/2) and a 2 = Φ 2 z 0 + Φ −1 (1 − a/2) , where a denotes the confidence level, Φ(·) represents the standard normal cumulative distribution function (CDF), and Φ −1 (·) is the quantile function of the standard normal distribution. Additionally, the Testing of Location Invariance. The traditional fixed-parameter specification assumes that both the production function and the productivity evolution are invariant across locations. This fixed-coefficient assumption represents a nested and special case within our semiparametric spatially varying model. To formally assess whether our model is compatible with the fixed-coefficient alternative, we employ Ullah's (1985) nonparametric goodness-of-fit test. This test involves comparing the restricted parametric model with the unrestricted semiparametric model. The null hypothesis suggests that the restricted parametric model, which assumes location-invariant coefficients, adequately fits the data. On the other hand, the alternative hypothesis posits that the unrestricted semiparametric model, which allows for location-varying coefficients, provides a good fit to the data. The residual-based test statistic is T n = (RSS 0 − RSS 1 )/RSS 1 , where RSS 0 = ∑ i ∑ t ( ζ it + η it ) 2 and RSS 1 = ∑ i ∑ t ( ζ it + η it ) 2 are the sum of squared residuals under the null and (unrestricted semiparametric) alternative, respectively. The test statistic is expected to converge to zero under the null and to be positive under the alternative. The null distribution of the test statistic follows a chi-square distribution.

Data
Norway, the source of the data for this study, is an elongated country characterized by varying climate and growth conditions in different regions. Furthermore, Norwegian farmers operate within a challenging production environment characterized by harsh climates, rugged terrain, and a short growing season (Knutsen 2020). These factors contribute to significant variations in growing conditions in regions. In many parts of Norway, farmers primarily focus on growing feed crops, such as grass, due to the difficulties associated with grain farming.
The diverse climate and growing conditions, along with the challenging production environment, result in substantial variations in farmers' operational techniques and methods. Furthermore, the high production costs due to rough and fluctuating conditions make it difficult for Norwegian farmers to compete in an open market. To address these challenges, the Norwegian government has implemented substantial subsidies and regulations, including import and other measures, enabling many smaller farms to sustain their operations.
These factors, together with the unique characteristics of the production environment, can influence the scale, productivity, and efficiency aspects of production. Consequently, assuming a homogeneous production function in all Norwegian grain producers may not be realistic. In other words, it is plausible that different grain producers employ varying technologies that are tailored to their specific circumstances.
The data used in this study are sourced from the Norwegian Farm Accountancy Survey, a collection of panel data at the farm level compiled by the Norwegian Institute of Bioecon-omy Research (NIBIO). This dataset comprises annual information on farm production and economic indicators from approximately 1000 farms. To ensure a representative sample, farms are stratified according to geographic region, economic size, and type of farming.
The classification of farms is based on their primary category of farming, determined by the standard gross margins of the farm enterprises. Specifically, a farm is classified as a grain farm if more than 50% of the total standard gross margin is derived from grain production. This classification allows for the inclusion of farms that are specifically engaged in grain farming and ensures a focused analysis of the relevant agricultural sector.
The dataset used in the analysis is an unbalanced panel with 1689 annual observations from 195 grain farms during the period 2001 to 2020. To accommodate lagged variables in our estimation model, we include farms in our sample only if they have at least two years of available data. The farms included in our analysis have an average survey duration of approximately 11 years. Although grain farms typically cultivate multiple types of crops, the classification system we employ ensures that the farms in our sample focus primarily on crop production and have limited (if any) activities beyond that. Figure 1 maps the location of the grain farms in our sample. The total output (Y) is aggregated and measured in revenue terms adjusted to the 2020 prices in Norwegian Kroner (NOK), using the price index for crops. The four input quantities are K-capital that includes maintenance costs, interest rate costs, and depreciation; L-own and hired labor, measured in hours; N-land measured in hectares; and M-materials that include cost of seeds, fertilizer, lime, pesticides, and other consumables.
Both K and M are in nominal terms, deflated to real 2020 NOK using the consumer price index and the price index of other variable costs, respectively.
We included three productivity-modifying variables in the productivity evaluation process ω it : X 1 -subsidy/return ratio; X 2 -off-farm income share, defined as the ratio of income from off-farm activity to the total income from agriculture; and X 3 -debt/asset ratio.
The location variables "s" (defined by the coordinates of longitude (s 1 ) and latitude (s 2 )) are constructed based on the location of the courtyard of each farm, as this is timeinvariant. Table 1 reports the summary statistics for our data.

Results
To estimate the production function and the productivity of the farm/firm, which vary by location as described in (6), we need to determine the optimal number of nearestneighboring locations at each stage of the estimation (h 1 and h 2 ). To accomplish this, we employ a data-driven leave-one-location-out cross-validation method. This approach allows us to select appropriate smoothing parameters that control the spatial weighting of neighboring firms in the kernel fitting process. Using this data-driven approach, we avoid relying on arbitrary specifications of spatial weights and radii, which define the extent of neighborhood influences. This procedure also helps in the optimal selection of the bandwidth parameter. 5 When chosen optimally, a larger bandwidth parameter effectively "smooths out" the location variable s i , resulting in globally constant parameters across all locations. As a result, this provides an indirect data-driven method to assess the empirical relevance of the firm's geographic location in estimating the production function and productivity. Our analysis indicates that the optimal values for h 1 and h 2 are 96 and 171 farm-years, respectively, in the first and second steps of the estimation process. On average in all s, the corresponding adaptive bandwidths are 0.3302 and 0.5648 decimal degrees. These bandwidth values are small relative to the standard deviations of longitude and latitude in the data, 6 which prevents excessive smoothing of the location, providing strong evidence that the location plays an important role in production.
To formally assess whether our location-varying specification is supported by the data compared to the location-invariant alternative, we employ Ullah's (1985) nonparametric goodness-of-fit test. The results of the test reject the null hypothesis of location homogeneity at a 5% level of significance, providing evidence in favor of our specification of location variability. Table 2 reports the location-varying input elasticities. The input elasticity of materials is the largest, with a mean (median) value of 0.380 (0.380). The second-largest input elasticity is for land with a mean (median) input elasticity of 0.263 (0.243), while for capital the elasticity is 0.183 (0.201). Labor has an input elasticity at the mean (median) of 0.079 (0.090). We observe significantly different elasticity estimates between quartiles. Within the interquartile interval of their point estimates, the elasticities of capital, labor, land, and materials increase by 0.118, 0.068, 0.050, and 0.031, which correspond to changes of 99%, 110%, 23%, and 8%, respectively. The left panel summarizes point estimates of β κ (s i ) ∀ κ ∈ {K, L, N, M} with the corresponding two-sided 95% biascorrected confidence intervals in parentheses. The right panel reports their counterparts from a fixed-coefficient location-invariant model.

Production Function
The right panel of Table 2 reports the results of the fixed-coefficient location-invariant model (that is, not locationally varying), with the corresponding two-sided 95% biascorrected confidence intervals in parentheses. The fixed-coefficient location-invariant model, which assumes a constant production relationship across all locations, is estimated by allowing the bandwidths in both the first step (h 1 ) and the second step (h 2 ) to diverge towards infinity. This effectively assigns equal weights to all data points, irrespective of their location. When comparing the mean values of the locationally varying model to the fixed-coefficient model, some notable differences emerge. The coefficient for capital is relatively smaller in the fixed-coefficient model, while the coefficients for land are larger. On the other hand, the coefficients for materials and labor remain relatively similar between the two models.
From Figure 2, we can visualize the variation in the input elasticities of grain farmers in different locations in Norway. Location-invariant estimates (from the fixed-coefficient location-invariant model) are depicted by vertical lines. Consistent with the figures in Table 2, all distributions exhibit a wide spread, and the locationally homogeneous model (i.e., the location-invariant fixed coefficient model) appears to be unable to provide a reasonable representation of the production technology across different regions. Table 3 presents summary statistics of the estimated returns to scale (RTS) derived from our location-varying production function model. Additionally, Figure 3 provides a corresponding plot that visually displays these estimates. The mean (median) RTS is 0.926 (0.911), with an interquartile range of 0.178, which corresponds to a change of 21%. Figure 3 also illustrates that single-point RTS estimates with the fixed-coefficient location-invariant model (the vertical line) will be less representative estimates of the sample analyzed.  The left panel summarizes point estimates of ∑ κ β κ (s i ), with κ ∈ {K, L, N, M} with the corresponding two-sided 95% bias-corrected confidence intervals in parentheses. The counterpart estimate of the returns to scale from a fixed-coefficient location-invariant model is 1.074 (1.009, 1.151). The right panel reports the shares of locations in which location-specific point estimates are (i) statistically less than 1 (decreasing returns to scale), (ii) not significantly different from 1 (constant returns to scale), and (iii) statistically greater than 1 (increasing returns to scale). The former classification is based on a two-sided test, the latter on a one-sided test. In the right panel of Table 3, the fraction of Norwegian grain farms that exhibit decreasing, constant, or increasing RTS is reported. The classification is based on the RTS point estimates being statistically lower than, equal to, or larger than one, respectively, at the significance level 5%. In most of the locations in Norway with grain farming, we find that the farms exhibit constant RTS. These findings are consistent with other studies by Norwegian grain farmers over the period 1991 to 2005 (e.g., Lien et al. 2010). However, note that, in our study, more than 26% of farms provide evidence of decreasing returns to scale, and almost 5% of farms exhibit increasing returns to scale. Figure 4 shows the locational heterogeneity in production technology for Norwegian grain farming according to the plot of the RTS estimates (only in locations with grain farming). The map shows quite large differences, but there does not appear to be any systematic pattern in the level of RTS across the country. Considering that adjacent lands typically share similarities in unobserved factors like soil type and climate, we initially anticipated a gradual change in production technology in different locations. However, our findings do not align with this behavior. Despite identifying location-heterogeneous production functions, we did not observe any discernible patterns of productivity differences between locations. Therefore, while we did find support for the existence of diverse production functions in different areas, their distribution did not reveal any consistent trends or spatial correlations throughout the country.

Productivity Process
The left panel of Table 4 presents the estimate of the marginal effects, varying locationally, of the productivity determinants in the evolution process of ω it . The corresponding two-sided 95% bias-corrected confidence intervals are shown in parentheses. Additionally, the final columns of the left panel indicate the share of locations where location-specific point estimates are statistically positive or negative at the 5% significance level, determined through a one-sided test. The right panel of Table 4 displays the marginal effects of the productivity determinants in the fixed-coefficient location-invariant model. The left panel summarizes point estimates of λ j (s i ) ∀ j = 1, . . . , dim(X), with the corresponding two-sided 95% bias-corrected confidence intervals in parentheses. The reports also report a share of locations in which location-specific point estimates are statistically positive or negative via a one-sided test. The right panel reports the counterparts of a fixed-coefficient location-invariant model.
The spatial autoregressive coefficient of lagged productivity, as the measure of persistent productivity, is at the mean (median) 0.789 (0.835). This means that a farm's future productivity will on average increase by 0.789% if the farm's past productivity increases by 1%, ceteris paribus. However, we observe differences in productivity between locations/regions. Within the interquartile interval of their point estimates, lagged productivity increases by 0.145, which in turn corresponds to a 20% change. The upper left panel of Figure 5 also illustrates the variation between locations in the estimated lagged productivity, which roughly varies between 0.50 and 0.90, while most locations/regions have a large spatial autoregressive coefficient of around 0.80. The lagged productivity estimate of the location-invariant model with fixed coefficient is depicted by a vertical line (in Figure 5) and is far from the estimates of the location-varying model. As reported in Table 4, for farms in most locations (73.71%), the subsidy/income ratio has a significantly negative effect on productivity, while for 26.29% (100-73.71%) of the locations, the subsidy/income ratio has no effect on farm productivity. For the whole sample, a 1% point increase in the subsidy/income ratio is associated with a reduction in the next period's farm productivity by about 0.65% points on average. In this sense, our result supports Kumbhakar and Lien (2010). In a study of Norwegian grain farms during 1991-2006, they found that an increase in subsidy payment reduced production. Zhengfei and Lansink (2006) also found that subsidies had a negative impact on productivity growth in Dutch arable farming during the period 1990-1999. However, our result partly contrasts with the findings of Rizov et al. (2013). In their study on mixed farms in 15 EU countries from 1990 to 2008, Rizov et al. (2013) observed that subsidies had a negative impact on productivity prior to the implementation of the decoupling reform in 2003. However, after the decoupling reform, the effect of subsidies on productivity became positive in several countries. As discussed in Rizov et al. (2013), subsidies can both increase and reduce productivity, and the net effect is not obvious. As the upper right panel of Figure 5 illustrates, our locationally varying estimation model also exhibits quite a large locational variation in the effect of the subsidy/income ratio on productivity.
Point estimates of off-farm income share effects on productivity are negative in 32% of the locations, but statistically insignificant in approximately 67% of the locations (Table 4). These results are not unexpected. The impact of off-farm work on farm productivity is multifaceted. On the one hand, participating in non-farm work can provide farmers with valuable experiences and skills that enhance farm management practices and overall productivity. In addition, extra income from off-farm work may facilitate investments in technologies that increase farm output. On the other hand, reduced on-farm participation due to off-farm work may lead to less efficient use of resources, potentially resulting in lower output.
The influence of off-farm work on productivity can also vary between regions due to differences in agricultural and climatic conditions, as well as variations in off-farm job markets. Our empirical findings support this notion, as depicted in the lower left panel of Figure 5. In a study that focused on Norwegian grain farms from 1991 to 2005, Lien et al. (2010) discovered that the effect of off-farm work on productivity exhibits an inverted U shape. Initially, some off-farm work had a positive impact on productivity, while excessive off-farm work had a negative effect. In general, the relationship between off-farm work and farm productivity is complex, and its implications can vary depending on factors such as the nature of off-farm employment, regional characteristics, and the level of farmer participation in both on-farm and off-farm activities. Given off-farm work is almost the norm among today's Norwegian grain farmers (cf., Table 1), our results are more or less consistent with the findings of Lien et al. (2010). We also mention, as examples, that Goodwin and Mishra (2004) with U.S. family farms and Pfeiffer et al. (2009) with Mexican farms found that greater participation in off-farm labor markets decreased on-farm efficiency and productivity.
The effects of the debt/asset ratio are also negative on productivity for about two-thirds of the locations/regions, but statistically insignificant for about one-third. On average, a 1% point increase in the debt/asset ratio is associated with a reduction in the next period's productivity by about 0.22% points. In terms of a related study of Norwegian grain farms, Kumbhakar and Lien (2010) concluded that a higher debt/asset ratio suggested a decrease in technical efficiency. As a decrease in technical efficiency implies reduced productivity, their results are consistent with ours. Figures 6 and 7 illustrate the geographical variation in productivity estimates. However, unlike the expected gradual change or systematic pattern across different locations as shown in Figure 4 for the RTS estimates, the productivity estimate maps do not show any clear trends. This discrepancy suggests that our current approach of employing unobserved locationally heterogeneous production functions might not be the most appropriate method to address possible patterns in productivity, if any, across different locations. Further exploration and alternative methodologies may be necessary to better capture and understand the underlying factors contributing to the observed variations in productivity at different locations.
However, it is important to emphasize that this finding does not diminish the significance of our approach, as our primary objective is to investigate and understand heterogeneity. While our method might not directly reveal patterns in productivity across locations, it does shed valuable light on the presence of heterogeneity in the data. This insight is crucial in itself, as it highlights the diverse nature of productivity in different areas, which can be a critical aspect in various fields, such as regional economic development, policy formulation, and resource allocation. In this context, our approach remains valuable for providing a deeper understanding of the complexities and variations within the studied system, even if it does not directly address specific spatial patterns in productivity.

Concluding Remarks
By comparing farms, it is easy to observe that agriculture is a heterogeneous industry in terms of the natural land characteristics that determine natural advantage (such as soil type, fertility, the slope of the land, the climate, etc.) and that, as a consequence, there can be huge differences from region to region within a country (or other geographical unit). Furthermore, the interaction between site-specific environmental variables and farmer decision-making regarding technology can promote the development of locally specific varieties and technologies. As a result, a diverse technological landscape may emerge characterized by the existence of various spatial regimes in technologies. Together, these call for spatial analysis or, more specifically, for analyses that account for spatial dependency and/or spatial heterogeneity. In the agricultural economics literature, these are often ignored, 7 as a global model is often fitted to all the farms included in a given sample. When important and relevant relationships vary over space, global parameter estimates may be misleading and can lead to less reliable economic conclusions.
This paper seeks to bridge the existing gap in the literature by investigating firm/farmand location-specific heterogeneity. We introduce a semiparametric methodology that facilitates the identification of production functions, considering the diverse effects of the firm's/farm's production technology and productivity evolution. Inspired by the recent work of Malikov et al. (2022), our novel model explicitly incorporates spatial variation in the estimation of production function parameters, encompassing input elasticities and productivity parameters.
We investigate the efficacy of using longitude/latitude locations to capture variations between firms and locations within the Norwegian grain farming sector. Our methodology offers a practical tool for investigating how variations across locations contribute to regional or local productivity disparities and the underlying factors driving these differences. We find evidence of locationally heterogeneous production functions but no apparent pattern of productivity estimates across different locations. The lack of observable patterns in productivity estimates suggests that there could be other factors or variables that influence productivity variations, which our current approach may not fully capture. Therefore, it would be prudent to explore alternative methodologies that could better account for these underlying factors and provide more comprehensive insights into the spatial distribution of productivity in the studied locations.
In future research, there is ample potential to enhance our firm-and location-specific semiparametric production function approach. An important extension would involve incorporating observed spatial determinants in addition to the GPS coordinates currently used. By addressing our observation in this study that relying solely on longitude/latitude locations to account for spatial industry variations may not always be suitable, this expanded approach could offer a valuable solution. By integrating additional spatial information, such as soil types, climate data, or terrain characteristics, we can refine the analysis and capture a more comprehensive picture of the spatial heterogeneity present in the industry. This enhanced methodology would likely yield more accurate and nuanced insights into the complexities of location-specific productivity in various industries.