Both parametric and nonparametric approaches can be used to examine health care delivery productivity and technical efficiency. In productivity studies the interest lies mainly on returns to input usage, or elasticities. Such estimates are valuable from a policy perspective as they can guide the allocation of health care resources. In efficiency studies, researchers are interested in measuring how producers deviate from an estimate of the production function, viewed as the state-of-the-art technology frontier. Therefore, efficiency studies are useful in informing policies with a focus on minimizing waste [16].

Regardless of the focus, i.e. production or efficiency, these studies require the estimation of a production function, which begs the question of which method to use. An important methodological decision is choosing between parametric and nonparametric approaches. There is no consensus in the literature and pros and cons have been reported about both methods. Approaches based on parametric functions are simple and can be easily implemented. Under the proper assumptions, parametric approaches have desirable statistical properties (e.g. fast convergence rates, which is important in small samples). Nonparametric approaches are more flexible as no functional form is pre-specified and the shape of the relationship between health output and inputs is determined by the data. On the downside, nonparametric estimators have low convergence rates and require larger amounts of data to deliver estimation errors equivalent to those from correctly specified parametric counterparts [16].

### Model

We conceptualize the delivery of medical services in terms of a medical care production function [17]. We consider the following random production function for healthcare delivery:

$$ Y=f\left(K,L\right)+\varepsilon $$

(1)

where *Y* is the delivery of medical services (output) and is determined by two components. The first component is deterministic and depends on health care inputs, while the second is a random component. The deterministic portion of output is given by a production function *f* that depends on capital *K* and labor *L*. The random term *ε* captures unobserved determinants of output and is assumed to be zero-mean.

Our goal is to use data on *Y*, *K*, and *L* to estimate the elasticities of primary care delivery with respect to capital and labor, which are determined by, respectively,

\( \frac{\partial Y}{\partial K}\frac{K}{Y}\ \mathrm{and}\ \frac{\partial Y}{\partial L}\frac{L}{Y} \).

We are also interested in examining estimates of the conditional mean of output, *E*(*Y*| *K*, *L*). These estimates allow us to visualize partial prediction plots, which can be of great value to policy makers. These types of plots are a simple way to illustrate nonlinearities and, as a result, they help inform policy by highlighting complementarities between capital and labor (see Fig. 2).

### Estimation

Our approach follows closely the production function estimation described by Henderson and Parmeter [18].^{Footnote 1} We consider two approaches to estimate a cross-city primary care production function in Brazil. The first is a parametric approach based on a Cobb-Douglas production function. The second is a nonparametric approach where no functional form is specified for primary care production.

### Parametric model

This section presents a typically used parametric production model to establish a baseline for comparison with the nonparametric estimates. The Cobb-Douglas production function is arguably the most common parameterization of production in the literature and has been used to model production processes for more than one hundred years [19]. For the case of two inputs, capital and labor, the Cobb-Douglas model with an additively separable error term assumes the primary care function (1) takes the form

$$ Y=A{K}^{\alpha }{L}^{\beta }+\varepsilon $$

where *A* is a technology parameter, *α* is the elasticity of primary care output with respect to medical capital, and *β* is the elasticity of output with respect to the number of physicians. The typical approach to estimate our parameters of interest *α* and *β* is to log-linearize the model and use Ordinary Least Squares (OLS) to estimate the parameters in a log-linear regression. Nevertheless, it has been shown in the literature that such an approach can introduce bias [18, 20]. To avoid such a bias, we estimate *α* and *β* using Nonlinear Least Squares (NLS).

The NLS estimation procedure is as follows. To simplify notation, let *f*(*X*, *θ*) = *AK*^{α}*L*^{β}, where *X* = (*K*, *L*) and *θ* = (*A*, *α*, *β*). The nonlinear least squares estimator \( \hat{\theta} \) is the value of *θ* that minimizes the sum of the squared residuals [21]:

$$ \underset{\theta }{\min\ }\left(Y-f\left(X,\theta \right)\right)^{\prime}\left(Y-f\left(X,\theta \right)\right). $$

The problem can be solved numerically using the Gauss–Newton algorithm, and standard errors are computed using a wild bootstrap procedure [18].

### Nonparametric model

Consistent parametric estimation of the elasticities of capital and labor relies on the assumption that the parametric functional form chosen, in many cases the Cobb-Douglas, is the correct or true functional form. However, there is no consensus in the health economics literature regarding the correct functional form for the delivery of primary health care. Nonparametric estimation of function (1) allows us to avoid the bias of incorrectly imposing a certain parametric shape to the relationship between inputs *K* and *L* and output *Y*. In fact, one of the main advantages of the nonparametric approach is that it recovers the relationship between inputs and output directly from the data.

We use a Local-Linear Least Squares model (LLLS) to approximate the function *f*(*K*, *L*) in eq. (1).^{Footnote 2} The LLLS estimator is perhaps the most popular nonparametric regression estimator. To simplify notation, let *X* denote the input matrix (*K*, *L*). The LLLS estimator fits a line on the neighborhood of a point *X*_{0}, where the concept of “neighborhood” is determined by a bandwidth vector *h*. The estimator re-writes the original model by considering a Taylor approximation around *X*_{0}:

$$ Y=f\left({X}_0\right)+\left(X-{X}_0\right)\beta \left({X}_0\right)+\varepsilon, $$

where *β* is the gradient and is treated like a parameter to be estimated, and so is *f*(*X*_{0}). Denoting *a* = *f*(*X*_{0}) and *b* = *β*, the LLLS chooses *θ* = (*a*, *b*) to minimize the weighted sum of squared residuals:

$$ \underset{\theta }{\min}\left(Y-\overset{\sim }{X}\theta \right)^{\prime }K\left(X,{X}_0,h\right)\left(Y-\overset{\sim }{X}\theta \right), $$

where \( \overset{\sim }{X}=\left(1,X-{X}_0\right) \), 1 is a column vector of ones and \( K\left(X,{X}_0,h\right)=\frac{1}{\sqrt{2\pi }}{e^{-\left(\frac{1}{2}\right)\left(\frac{X-{X}_0}{h}\right)}}^2 \) is the Gaussian Kernel. When the Kernel is the identity matrix, the estimator reduces to the OLS estimator. By using Kernel weights we mitigate the effect of poor approximations of points far from *X*_{0}. Standard errors and confidence intervals can be computed using a wild bootstrap. To avoid issues with numerical optimization and facilitate estimation, we standardize the data by dividing each variable by their mean.

The final step required to implement the above LLLS nonparametric estimator is to choose bandwidths in *h*. Typically, the literature relies on data-driven methods to determine the appropriate set *h* [18]. We use least squares cross validation (LSCV) to determine the bandwidths in *h*. The idea is simple and relies on choosing *h* that minimizes the sum of the squared errors of the model prediction, which in turn depends on *h*. Formally, the bandwidths in *h* minimize \( \sum {\left(Y-\hat{Y}(h)\right)}^2 \).

In summary, the concept of the LLLS is to fit a linear model around the neighborhood of inputs *K* and *L*, where this neighborhood is determined by a bandwidth chosen using cross validation (LSCV). The nonparametric model moves along the distributions of *K* and *L* estimating local linear regressions, connecting the predicted outputs (or conditional mean) from these various regressions to generate the relationship between inputs and output.

The nonparametric estimates of the elasticities of capital and labor are computed as.

$$ \hat{\beta}(K)K/\hat{Y}\ \mathrm{and}\ \hat{\beta}(L)\ L/\hat{Y} $$

respectively, where \( \hat{\beta}(K) \) is the gradient of the conditional mean with respect to capital, \( \hat{\beta}(L) \) is the gradient of the conditional mean with respect to labor, and \( \hat{Y} \) is the fitted value. Standard errors for elasticities, returns to scale, the predictions are computed via wild bootstrap as it is consistent under both homoskedasticity and heteroskedasticity [18]. Estimation was done using the R software [22] using codes provided by Henderson and Parmeter [18].

### Data

Our analysis is based on a sample of SUS users from the 100 largest cities in Brazil. The data contains information about SUS medical care delivery, physical medical infrastructure, and supply of healthcare professionals, at the city-level, monthly, from 2012 to 2016. Preliminary examination of the data revealed that the two largest cities (São Paulo and Rio de Janeiro) represent extreme values when compared against the remainder 98. We therefore exclude these two cities from our analysis. Our working sample offers a fair representation of urban Brazil. Collectively, the 98 cities considered in this study account for approximately one third of Brazil’s total population.

The data comes from DATASUS – SUS IT department. DATASUS has several SUS databases that are publicly available for download.^{Footnote 3} Our output data were collected from the SIA database -- System of Outpatient Information (Sistema de Informação Ambulatorial – SIA). We measure primary care output as the number of doctor’s visits in the SUS system, for each city-month observation. The number of patient visits (per unit of time) is a typical measure of primary care output [11]. Our input data are from the CNES database -- National Registry of Healthcare Facilities (Cadastro Nacional de Estabelecimentos de Saúde – CNES). Our proxy for health capital infrastructure is the city’s number of clinics and similar health care delivery units. The city’s stock of labor is measured as the number of physicians working in the city’s SUS system.^{Footnote 4}

In the 98 cities considered in this study, from 2012 to 2016, the sample contains 274,175 distinct physicians, 11,203 distinct clinics, and 407,259,570 primary care consultations. Figure 1 shows the (city-month) average number of consultations, clinics, and doctors, along with the interquartile range (IQR), by year. The data show that the representative city-month observation hovers around 60 thousand consultations (with a slight decline from 2012 to 2016), just under 100 clinics (steady trend in the period), and approximately 1500 doctors (with a slight upward trend).