Abstract

Comment by Clara Bertinelli Salucci and Riccardo De Bin
We would like, first of all, to congratulate the author on this excellent article, which addresses the important topic of modelling and inference in the presence of inequality constraints. In our recent work at the interface of statistics and physics, we have realised how this setting arises naturally in many situations and therefore endorse the author’s opinion that constrained modelling really matter. As we saw in the article, the presence of constraints complicates the fitting procedures. Furthermore, special care is needed when making inference. When constraints restrict the parameter space, indeed, classical inferential tools no longer apply in their standard form, thus requiring a deeper investigation of the underlying asymptotic theory.
For example, consider the simple hypothesis test system
with
Hypothesis testing
These constraint-induced distributional peculiarities of the test statistics based on large-sample theory seem relevant in the framework described in this article. As emphasised by the author, shape constraints on a smooth component
Let us first consider constraints enforcing positivity: Imposing
Consider the test statistics presented in Wood (2025, 3.3.3) and referred to in this article: Under the assumption that
Similar considerations hold in the case of monotonicity and convexity constraints. Monotone increase can be imposed via
Bootstrap-based testing offers an alternative to asymptotic hypothesis testing. As in the asymptotic setting, however, the presence of parameter constraints must be accounted for, requiring tools specifically designed for boundary problems (Cavaliere et al., 2017).
Confidence intervals
The issues discussed above are not limited to hypothesis testing, but also have important implications for the construction and interpretation of confidence intervals: When parameters are subject to inequality constraints, standard Wald-type confidence intervals based on asymptotic normality may exhibit poor coverage properties, particularly when the true parameter lies on or near the boundary of the parameter space. This point is clearly acknowledged by the author, who notes that parts of the parameter space may be effectively excluded by confidence intervals derived under regular asymptotic assumptions. Such behaviour is a direct consequence of the nonstandard asymptotic distribution of constrained estimators, which typically involves mixtures of truncated or degenerate distributions rather than a neat Gaussian limit. A natural question is whether a more explicit characterization of the asymptotic distribution of the estimators under the relevant boundary regimes could be exploited to construct confidence intervals with improved coverage. In principle, confidence sets derived from the appropriate mixture distributions, analogous to those arising in likelihood ratio testing, may provide a theoretically grounded result. However, their practical implementation in this specific framework might be challenging.
As well presented in the article, an alternative is represented once again by bootstrap methods. It is important to stress that the procedure considered by the author is not a plain implementation of standard bootstrap schemes, which have been shown to be first-order inconsistent in the presence of inequality constraints (Andrews, 2000). In this context, the author’s choice to resample score contributions rather than the constrained estimator itself is a well-justified strategy that avoids boundary-induced inconsistency issues. Andrews (2000) also discusses alternative approaches, such as subsampling and suitably modified bootstrap schemes, which may yield pointwise asymptotically valid inference in specific settings. These methods aim to approximate the nonstandard boundary asymptotic behaviour of the estimator, while the approach adopted in this article relies on a local Gaussian approximation and is then supplemented by an explicit bias correction.
Final remark
As a final remark, we would like to mention that the interaction between penalties and constraints may lead to interesting results. As an alternative to model selection through hypothesis testing, Nielsen and Rahbek (2024) showed that a sparsity-inducing penalisation such as smoothly clipped absolute deviation (SCAD), by forcing the zero coefficients to be exactly zero, leads the remaining coefficient estimators to have the usual Gaussian asymptotic distribution and retain
Comment by Rosa M. Crujeiras
I would like to begin by sincerely thanking Simon Wood for this outstanding and generous contribution. Shape Constrained Additive Smooth Models is a technically rigorous, conceptually elegant and highly practical article that brings much-needed coherence to a topic of long-standing importance in applied statistical modelling. The article addresses a fundamental limitation of unconstrained smooth additive models: While flexible smooths are powerful, they can easily produce estimates that are scientifically implausible or difficult to interpret. By embedding shape constraints—such as monotonicity, convexity or positivity—directly into penalized spline representations, the author provides a unified framework in which prior scientific knowledge can be incorporated without sacrificing model flexibility or computational stability. Importantly, the framework allows constrained and unconstrained smooth terms to coexist within the same model.
A central strength of the article lies in its computational strategy. By expressing shape constraints as linear restrictions on spline coefficients, the author establishes a clear and elegant connection between smooth additive modelling and classical linear and quadratic programming. Apart from the computational part and the nice connection with quadratic and linear programming, I have been particularly interested in the inference proposals under shape constraints, which must obviously be handled with appropriate caution. My comments will focus primarily on this aspect.
As the author indicates, for interval estimation, treating constraints as fixed lead to under-coverage, whereas ignoring constraints (basing intervals on the unconstrained covariance matrix) lead to over-coverage, two issues that can be intuitively understood. In what follows, I would like to point out some issues for further research on this framework.
Formal treatment of the sampling variability of the active set. Section 5.1 correctly diagnoses the core difficulty: Treating the active set as fixed leads to severe under-coverage, because it ignores the fact that which constraints are binding is itself a random quantity depending on the data. Ignoring the constraints altogether leads to over-coverage. The bootstrap navigates between these extremes implicitly—each replicate may converge to a different active set—but without any theoretical guarantee. What is missing is an asymptotic distributional theory for
The bootstrap approach. The proposed approach in Section 5.2 is a bootstrap, corrected for smoothing bias using the scalar adjustment δj derived from the difference between the Bayesian and frequentist covariance matrices—a strategy rooted in Nychka (1988). On average across all scenarios and sample sizes the method achieves nominal 0.95 coverage, compared to 0.965 for intervals that ignore the constraints entirely. However, the simulation results in Figure 5 of the original article by Wood reveal that this average masks substantial over-coverage and slow convergence specifically in the location–scale models (Gaussian and Gamma). The correction δj is computed without accounting for the constraints, so it captures the smoothing bias as if the estimation were unconstrained. When the active set varies across bootstrap replicates—sometimes a constraint is binding, sometimes not—the effective smoothing bias changes in nature and a single scalar correction cannot adequately track it.
Scalability to large data and large models. Mentioned briefly in the conclusions, we may elaborate a bit more on this issue. The active-set quadratic programming algorithm is
A view from functional data analysis (FDA). Viewing the smooth components in Wood’s framework as functional data objects offers a theoretically appealing avenue for confidence interval construction, though it comes with non-trivial limitations that temper its immediate practical promise. On the positive side, treating each estimated smooth fj as a realization of a Gaussian process—with mean and covariance kernel
In closing, I would like to thank Simon Wood once again for this impressive and thoughtfully crafted article that will be for sure a substantial contribution to both the methodology and practice of additive modelling. I am grateful for the opportunity to engage with such clear, rigorous and impactful work.
Comment by Maria Durbán
I enjoyed reading this article and was pleased to be invited to comment on it. Simon Wood offers a clear and thought-provoking discussion of shape constraints in models with additive smooth components, bringing together a range of ideas that are often treated separately in practice. In particular, the article provides a useful perspective on how constraints such as monotonicity or convexity can be expressed and handled within the GAM framework, and on the computational tools needed to fit such models reliably.
In my comments, I take up some of these ideas from a slightly different angle, focusing on an optimization-based view of shape-constrained smoothing that is closely related to the cone-based formulations discussed in the article. Rather than presenting an alternative to Simon’s approach, the aim is to highlight how similar geometric ideas can be combined with explicit smoothness penalties to handle a wide class of constraints and to reflect on a few applied settings where constraint-based methods seem particularly natural. I close with some general remarks prompted by the article.
Shape-constrained generalized additive models via conic optimization
Simon discusses in his article the cone projection framework developed by Meyer (2013, 2018), in which shape constraints are enforced by projecting the data vector onto a convex cone defined by the desired restrictions. In this approach, the fitted function satisfies the shape constraints by construction and estimation can be interpreted geometrically as a projection onto the constraint set. A characteristic feature of this framework is that regularisation is induced entirely by the shape constraints themselves: No additional smoothness penalty is introduced and the estimator corresponds to the least-squares projection onto the constraint cone.
Here, we draw attention to a related approach that builds on Meyer’s framework while incorporating explicit smoothness regularisation. Recent work by Navarro-García et al. (2023, 2024) proposes an optimization-based framework for shape-constrained generalized additive models that retains the geometric interpretation of shape constraints as convex restrictions, but embeds them within a penalised spline formulation. This allows shape and smoothness to be handled separately within a single convex optimization problem.
As in standard P-spline methodology, the unknown regression function is represented as a linear combination of B-spline basis functions and estimated by minimising a penalised least squares criterion, with smoothness controlled through a quadratic penalty on the spline coefficients. Shape constraints such as non-negativity, monotonicity and curvature are imposed by exploiting the fact that the fitted spline is a piecewise polynomial. On each knot interval, the spline can be rewritten explicitly as a low-degree polynomial whose coefficients depend linearly on the B-spline coefficients. This representation allows one to rely on a characterization of non-negative polynomials due to Bertsimas and Popescu (2002), yielding necessary and sufficient conditions for enforcing shape constraints in a convex, characterization-based form.
Let
with coefficient vector
For cubic B-splines, the fitted function f is a continuous piecewise cubic polynomial. On each knot interval
with the coefficients (αq, βq, γq, δq) depending linearly on the spline coefficients β.
The shape constraints are then imposed directly on these local polynomial pieces. For a given interval q, the spline coefficients determine the corresponding polynomial and a pair of fixed matrices,
Putting these constraints together over all knot intervals and over the relevant covariate dimensions when needed, leads to a closed convex cone
In other words,
The framework extends naturally to generalized additive models by replacing the least squares term with a convex negative log-likelihood and to multivariate smooth functions through tensor-product spline bases. In these cases, the cone
A possible limitation of this approach is that smoothing parameters are chosen based on the unconstrained fit. In practice, this does not seem to have a major impact in my experience, but it would be interesting to hear Simon’s perspective on this issue.
Final comments
Reading the article also brings to mind a few other applied settings where constraint-based ideas seem particularly helpful. One example is forecasting, and especially mortality forecasting. In this case, one often works with several age-specific or cohort-specific curves over time and extrapolations based on unconstrained smoothers can sometimes lead to awkward behaviour, such as mortality curves crossing in the future. Introducing shape constraints directly into the modelling step offers a simple way of avoiding these issues, rather than fixing them after the fact and helps to keep forecasts coherent across ages and time horizons. This seems particularly relevant when forecasts are used for planning or policy and it would be interesting to see how Simon’s approach deals with such constraints in a forecasting context.
Another area where similar ideas come up naturally is the estimation of production functions. These describe how inputs such as labour and capital combine to produce output. In particular, the function relating the inputs and the outputs has to be non-decreasing, concave and such that it envelops the decision-making units. Here, in principle, the constraints should not applied to individual smooth components, but to their combined effect, which raises the question of how this type of joint restriction could be handled within Simon’s framework.
Comment by Irène Gijbels
The author is to be congratulated for this very nice article on additive smooth modelling where the components possibly satisfy some shape constraints. It was with great pleasure that I read this excellent work. When using spline basis approximation, imposing the shape constraints leads to linear programming problems, while fitting the additive model results into sequential quadratic programming. I first formulate some general comments and then in following subsections discuss some more specific research issues.
The article starts with a nice set of examples showing a diversity of shape constraint issues in applications. The examples also reveal several open questions. When in a preliminary stage a model has been selected, this likely is done under unconstrained estimation. This brings up the question whether constrained estimation is not preferably also in a preliminary model selection step. A related question is whether model selection and estimation steps should not be done simultaneously. Further, what to be done if a curve seems to exhibit some clearly different shapes in distinct regions. For example a curve can be flat (no influence of the covariate) in a subdomain (region), but having a clear non-linear behaviour outside that region.
When using B-spline basis expansions for a smooth function and imposing the shape constraint via a linear (in) equality on the coefficients, the estimator satisfies the constraint only in a finite set of values. However, depending on the degree of the B-spline and the imposed constraint the validity of the constraint may hold in whole the domain. Consider a B-spline basis with K + 1 equispaced knot points (denoted ξ0, · · ·, ξK) and let q denote the degree of the basis functions. Denoting the basis functions by bj(·; q), for For a quadratic spline, monotonicity in the knot points ξ0, · · ·, ξK is equivalent to monotonicity on the whole domain [ξ0, ξK]. For a cubic spline, convexity in the knot points ξ0, · · ·, ξK is equivalent to convexity on the whole domain [ξ0, ξK].
See Ahkim et al. (2017) and in particular Lemma 2 therein.
To be noted is also that when the constraint is formulated in terms of a linear functional, the proposed approach is to use a discrete approximation to the functional. The accuracy of such a discrete approximation depends on choices of some parameters and this impacts also how general (in the domain) the imposed constraint is satisfied.
Shape constraints and interaction terms
If additive models are dictated to include interaction terms, shape constrained estimation becomes a more tricky issue. The author mentions that a simple re-parametrization approach may be not possible if constraints are required on more than one marginal. Avoiding constraint redundancy can be part of a solution here and how this is to be avoided is explained when a positivity constraint is imposed on two margins. An interaction term however may exhibit the possible behaviour that in different components (margins) different type of constraints (should) hold. An example is a bivariate function f(x, y) for which the function
Varying coefficient models and shape constraints
In case of longitudinal data, the response variable y and the covariates (x1, · · ·, xd), may evolve over (say) time t and for each subject i in the study, observations of y(t) and (x1(t), · · ·, xd(t)) may be available on different time points, denoted
where
The use of varying coefficient models goes beyond the study of longitudinal data (where the dynamics is on a time scale). Indeed, this kind of model has been used extensively to describe dynamic effects of one (or more) variables on other variables in various scientific areas. See, for example, Fan and Zhang (2008) and references therein and recent articles such as Delgado and Arteaga-Molina (2021), and Yang et al. (2023). In the latter article, containing an application in a medical context, the interest is also in finding regions with zero-effects and a smooth effect outside these regions.
The use of varying coefficient models also goes beyond the interest of investigating the conditional mean. Indeed, conditional quantile regression is of particular interest in medical studies, where the startup of a medical treatment, might depend on the distributional response exceeding a certain threshold. See, for example, Andriyana et al. (2014). Particular challenges in quantile regression for longitudinal data (or beyond), are the non-crossing of quantile curves or homoscedasticity versus heteroscedasticity. A homoscedasticity setting can be translated into constancy of a (unknown) variability function (that also can be modelled using B-spline approximation). See Andriyana et al. (2018).
It would be interesting to see to which extent the presented framework can deal with these research items.
Shape constrained additive smooth models and beyond
The article focuses on additive models with smooth component functions. The order q of the B-spline representation seems to be taken the same for each univariate function or for each component in a tensor product setting. In applications though the component functions can show different degrees of smoothness and even might not be smooth. Effects of covariates might be linear or highly non-linear or piecewise linear (non-differentiable functions) or even presented by a discontinuous function (for example different constant effects in different regions). This raises the question to what extent the overall framework presented by the author can be extended to accommodate components in the additive model that exhibit various degrees of smoothness or even non-smooth and smooth components. Partial answers for the first issue might be to consider B-splines of various degrees, as well as different penalty functions.
Comment by Thomas Kneib
Reading articles by Simon Wood is always a great enjoyment and an excellent opportunity to acquire new insights alike. It has therefore been a pleasure to be asked to contribute to the discussion of this article, focussing on shape constraints (such as monotonicity or convexity constraints) applicable in a wide range of models comprising additive predictors composed of smooth functions. It turns out that linear (in)equality constraints on the coefficients of a basis expansion yield a very general class of constraints and Simon offers insights into the construction and handling of such constraints as well as appropriate fitting methods including the determination of the smoothing parameter. In the following, I will discuss an alternative approach for achieving constraints based on an additional penalty term and a possible extension of Simon’s framework to the consideration of orthogonality constraints which can also be expressed as linear equality constraints on basis coefficients of smooth terms.
Constraints based on extra penalties
As noted in Simon’s article, a monotonically increasing sequence of B-spline basis coefficients
An alternative approach that may be easier to augment to existing implementations can be based on an additional penalty term that encourages the linear inequality constraints. More precisely, consider a penalty term based on asymmetric differences defined as
where
Adding this penalty term (additionally to the usual smoothness penalty) to the optimization criterion of interest will then encourage the monotonicity constraint, if a large penalty parameter λ is assigned to the asymmetric differences. Fitting the model in an iterative procedure such as Fisher scoring will then include updating the definition of the weights vj such that the penalty for the constraint only becomes effective when needed and will leave the estimate unchanged otherwise.
While being conceptually simple, this approach of course comes with the disadvantage that the constraint is not strictly ensured, but only encouraged by the penalty. The level of encouragement depends on the value of the penalty parameter assigned to the penalty for the constraint. Still, the extra penalty approach can be effectively used not only for monotonicity constraints, but also for a variety of other constraints. This has first been noted by Eilers (2005) and Bollaerts et al. (2006) and has later been put into a unified framework by Hofner et al. (2016). For example, using a similar type of weights as above applied to second order differences allows to include concavity and convexity constraints. One can also formulate boundary constraints for constant or linear extrapolations beyond the range of observed covariate values or define constraints for tensor product smooths. While the framework presented in Hofner et al. (2016) is based on functional gradient descent boosting, it can readily be used in penalized maximum likelihood frameworks as well.
Constraints based on orthogonality in function spaces
While Simon’s article focusses on shape constraints, the framework of linear constraints can also be natively used for orthogonality constraints. For example, to render additive models identifiable, one is often interested in making all function estimates orthogonal to a constant effect, but one may similarly be interested to make the estimates orthogonal to linear effects or to remove main effects from a tensor product interactions.
As shown in
that defines the type of functions the effect of interest f(x) should be orthogonal to. In this formulation, Ha(x), a = 1, …, A are a set of basis functions generating the function space
The linear constraints are then derived from assuming orthogonality of any basis function Bj(x) involved in the definition of the effect f(x) to any basis function of the constraint space Ha(x), i.e.
This leads to the constraint matrix
which can directly be fed into Simon’s optimization procedures.
As discussed in
All these effects are, by construction, intermingled in the tensor product interaction and are then also assigned a single smoothness parameter. The orthogonal decomposition yields nicely interpretable effects and also provides additional flexibility by allowing for separate smoothness parameters for all nonlinear effects. While the work in
Closing remarks
Finally, I would like to briefly touch a general issue related to the incorporation of constraints into model fitting. While I completely concur with Simon’s presentation, an alternative view may be that violations of constraints that would be expected based on theoretical considerations could also be seen as indications of either model misspecification or problematic observations. The former might then call for modifications of the model, rather than the addition of constraints, while the latter may question the validity of the available sample for answering the scientific question of interest and I would be interested in learning about Simon’s thoughts on these aspects.
Comment by Nikolaus Umlauf
Reading Simon Wood’s article on shape-constrained additive smooth models was, as always, both enjoyable and stimulating. The article provides a remarkably clear and general framework for incorporating linear equality and inequality constraints into penalized spline-based additive models and demonstrates convincingly how quadratic programming combined with the extended Fellner–Schall method yields a practically usable solution. This contribution also connects to a broader literature on constrained regression and shape-constrained smoothing; see, for example, Hofner et al. (2016) and Meyer (2018). More generally, modern developments of generalized additive models increasingly extend beyond mean regression towards models for entire conditional distributions (Wood, 2025).
In this comment I would like to focus on a perspective that is only touched upon briefly but, in my view, deserves particular emphasis: The role of shape constraints in distributional regression models, such as generalized additive models for location, scale and shape (GAMLSS; Stasinopoulos and Rigby, 2007; Stasinopoulos et al., 2024) and related distributional regression approaches (Umlauf and Kneib, 2018; Kneib, 2013). While shape constraints are often motivated by interpretability in mean regression, their role in multi-parameter distributional models extends beyond interpretability and becomes structural.
This perspective is particularly natural in the context of distributional regression frameworks where multiple parameters of the response distribution are modeled as functions of covariates simultaneously. In such models, the interaction between smooth predictors across distributional parameters can strongly influence the implied distributional shape, making structural constraints on individual components or derived quantities potentially valuable (Umlauf et al., 2018; Kneib et al., 2019).
Constraints beyond the mean
In classical GAM settings, shape constraints are typically imposed on the conditional mean function, for example to enforce monotonicity or convexity based on theoretical knowledge. In distributional regression, however, several parameters of the response distribution are modeled simultaneously, for example
where each predictor
Within Simon’s framework, imposing shape constraints on these predictors is conceptually straightforward. Monotonicity or convexity can be enforced separately for smooth terms in the mean, scale or shape predictors by applying linear constraints to the corresponding coefficient vectors.
However, in such multi-parameter settings, unconstrained smooth terms for scale, skewness or tail parameters may produce distributional shapes that are mathematically admissible but scientifically implausible. Examples include: Decreasing variance where variability is expected to increase, highly oscillatory scale functions compensating for misspecification of the mean or also implausible tail behaviour induced by overly flexible shape parameters.
In these situations, constraints are not merely aesthetic refinements. Rather, they encode structural information about the data-generating mechanism and help prevent unrealistic distributional behaviour. This suggests that in distributional regression, shape constraints may be useful not only for improving interpretability of individual effects, but also for promoting coherent distributional behaviour.
Constraints and weak identifiability in multi-parameter models
A second point concerns the interaction between constraints and weak identifiability. In GAMLSS-type models, different distributional parameters may partially compensate each other. For example:
A decreasing mean combined with increasing variance may generate a similar likelihood as a flatter mean with smaller variance. Shape parameters may absorb effects that could alternatively be captured by scale. In hazard-based models, wiggliness in the baseline hazard may trade off against time-varying covariate effects.
Such phenomena do not necessarily imply formal non-identifiability, but they often lead to weakly identified models in finite samples. Penalization partially mitigates this issue by discouraging overly complex functions. However, smoothing penalties alone do not prevent certain structurally implausible combinations of effects.
Shape constraints can therefore act as structural regularizers, restricting the parameter space in ways that reduce confounding across distributional components. Examples include (a) enforcing monotonicity of a variance function, (b) imposing concavity on a mean effect where diminishing returns are expected or also (c) restricting curvature of tail parameters.
In this sense, constraints complement smoothing penalties: While penalties control local complexity, constraints restrict global behaviour and directionality. In multi-parameter models, this distinction can become particularly important.
Constraints on derived quantities
An additional subtlety arises from the fact that in distributional regression, smooth terms are not usually the quantities of primary interest. Instead, they influence derived quantities such as quantile functions, hazard functions, survival probabilities or also tail probabilities.
In contrast to separate quantile regressions, quantiles in distributional regression cannot cross for fixed covariate values, since they are derived from a single parametric distribution. Nevertheless, parameter-wise shape constraints do not necessarily imply corresponding shape properties of derived functionals.
To illustrate this point, consider a Gaussian model with
so that the τ-quantile is
where
Differentiating with respect to x yields
Suppose that both μ(x) and σ(x) are increasing; that is,
However, for lower quantiles with τ < 0.5, we have zτ < 0. In this case the term
This illustrates a more general phenomenon: Shape constraints imposed separately on distribution parameters do not generally propagate to derived distributional functionals. In many distributional regression models, structural properties such as monotonicity of quantile or hazard functions depend on interactions between several distributional parameters, rather than on the behaviour of individual predictors alone.
Cross-parameter constraints
Perhaps the most intriguing extension concerns constraints that involve multiple distributional parameters simultaneously. Many scientifically motivated restrictions are not separable across parameters. Examples include (a) shape restrictions on a fixed quantile curve, (b) monotonicity of a hazard function depending jointly on location and scale and (c) structural constraints ensuring unimodality or specific tail behaviour.
In particular, constraints on derived quantities such as quantiles or hazards typically induce nonlinear relationships between several coefficient vectors, which are not directly covered by the current linear constraint formulation. Such restrictions translate into joint constraints on several coefficient vectors, thereby coupling predictors across distributional parameters. In the current framework, constraints are typically imposed within a single smooth term. Extending this idea to cross-parameter constraints would require a joint formulation across multiple coefficient blocks.
From a computational perspective this would still lead to a constrained optimization problem, although the resulting constraints will in general no longer be linear in the coefficients. Conceptually, however, this shifts constraints from being local to a single effect toward representing global distributional restrictions.
Developing systematic approaches for incorporating such joint constraints within penalized likelihood frameworks for distributional regression could substantially expand the practical scope of shape-constrained modelling.
Concluding remarks
Simon Wood’s article provides a powerful and general computational foundation for shape-constrained additive modelling. From the perspective of distributional regression, constraints are not merely tools for improving interpretability. They can reduce weak identifiability between distributional components, stabilize estimation in multi-parameter settings and encode structural information about the implied distribution.
More broadly, the discussion above suggests that in distributional regression the most meaningful shape restrictions may not always act on individual model components, but on the implied distributional functionals themselves. Understanding how such constraints propagate through multi-parameter models and how they can be incorporated into computationally efficient estimation procedures appears to be a promising direction for future research.
Rejoinder by Simon N. Wood
Thanks to all the discussants for their substantial and thought provoking contributions. I can find little to disagree with in any of them. I particularly agree with Clara Bertinelli Salucci, Riccardo De Bin and Rosa Crujeiras that interval estimation and testing is the area most in need of improvement and where theory that really deals with the uncertainty in the active set represents the most interesting challenge. As Clara Bertinelli Salucci and Riccardo De Bin have noticed, the discussion of p-values in my article is cursory and the constraints considerably complicate the null distributions involved. In the software, I have actually computed p-values as if the model were unconstrained, but in the same way that this makes confidence intervals somewhat too wide, it is bound to result in suboptimal power. Rosa Crujeiras discusses a rich set of ideas for developing improved intervals, which I hope will persuade someone to rise to the challenge. The points about the scalar bias correction are of course correct, but it would be very interesting to see how big the effects are in reality. On scalability, it is worth noting that the bootstrap is perhaps slightly less costly than implied. Sequential QP estimation of the full model involves a number of O(np2) steps (where typically p = o(n1 / 3)) while each bootstrap replicated involves a single O(p3) step.
Maria Durbán’s trick for getting necessary and sufficient shape constraint conditions for splines is very nice. On the subject of joint constraints—any linear constraint on the parameters can be handled by the methods—but the software currently only implements term-wise constraints (out of laziness, rather than any fundamental problem).
I agree with Irène Gijbels that in many cases one would want to include shape constraints in the initial analysis up front, rather than following my introductory examples, in which this was only done after an initial unconstrained fit. But this has to be a case-by-case decision, as Thomas Kneib’s final comments emphasise: If we constrain, there is always the danger that we bludgeon the model into compliance with our pre-conceptions, in defiance of the data. So for every case, such as the COVID example or the examples discussed by Nikolas Umlauf, where the constraint is essential for sane inference, there are others where the shape constrained model really should be compared to its unconstrained equivalent. On simultaneous model selection and fitting, the framework does allow the inclusion of null space penalties for this purpose, but this is of course only one of the approaches that one might want to take to this issue. The comments on the interval over which the constraints hold are also important. Of course for B-splines we anyway need to explicitly modify the basis for sensible extrapolation outside the interval covered by the inner knots. With cubic B-splines we might simply insist on linear extrapolation from the function value and slope at the appropriate knots: Extending monotonicity constraints to the extrapolation is then easy. On interactions, the approach actually already allows different shape constraints on different directions of tensor product smooths of arbitrary dimension. The highlighting of shape constrained varying coefficient models is valuable, I think: Varying coefficient terms are examples of the general linear functionals of smooths covered by the framework and in software are specified using by variables. The challenges of crossing quantiles (estimated non-parametrically) are more difficult. On different orders of smoothness, the framework and software allows different orders of spline and penalty, with mixtures possible within interaction terms as well as between terms. Piecewise linear terms are also available, as are Gaussian Markov random fields which are piecewise constant. That said, there are many more types of term that could be implemented.
Thomas Kneib’s discussion of imposing constraints via penalties is particularly interesting with regard to alternative routes to better calibrated inference, discussed above and Nikolaus Umlauf’s discussion of constraints on derived quantities. Inference based on this approach requires a somewhat different starting point to that required by the active set or cone-projection methods and might provide an alternative route to better justified intervals, while non-linear constraints are more readily incorporated via penalties. The orthogonality constraints example with Smoothing-Spline-ANOVA type smooth interactions is very interesting, but I suspect that absorbing the resulting equality constraints upfront is probably preferable to directly using the methods covered in my article (without inequality constraints to worry about, the linear and quadratic programming machinery is probably overkill).
I found Nikolaus Umlauf’s comments about the role of constraints in distributional regression particularly illuminating. I had not thought about these issues before, but the notion of structural regularization in the face of weak identifiability or the structural encoding of essential features of the data gathering process seem rather important. The constraints on derived quantities problem is also a big challenge in this area: The article’s framework allows linear constraints linking different terms and different predictors, but many target derived quantities are indeed not on the linear predictor scale. Other interesting constraints even on single terms are also non-linear: For example the restriction that a smooth should be unimodal. Such non-linear constraints will perhaps inevitably lead back to the penalization approach discussed by Thomas Kneib. That said, my guess is that, when constraints are linear, an approach such as the one described in my article is likely to have some advantages in terms of stability and simplicity.
Footnotes
Declaration of Conflicting Interests
The authors declared no potential conflicts of interest with respect to the research, authorship and/or publication of this article.
Funding
The authors received no financial support for the research, authorship and/or publication of this article.
