Nonnegative generalized linear model

Is it possible that all the parameters of a generalized linear model are constrained to be non-negative? If so, when? Any examples?

• (though I don't really understand the question) – Stéphane Laurent Aug 11 '14 at 7:42

Well, it is certainly possible, but mostly only some coefficients will be restricted. A glm (generalized linear model) have a linear predictor $$\eta(x)=\beta^T x$$ and the parameter vector $$\beta$$ then plays the same role as in linear regression, so restrictions can apply in the same way as with linear regression.

An example is Linear model with constraints on coefficients in terms of ratios, although the method used there with a glm would lead to a nested optimization. Another example is Looking for function to fit sigmoid-like curve, where a monotone spline is fit, which could also be combined with a glm. The non-negativity restrictions there is used to impose monotone increasing, if the same coefficients had been required to be nonpositive the result would have been monotone decreasing.

This last example is an example of shape-restricted splines, there is now an R package (actually multiple) implementing those ideas. cgam implements them in the setting of gam's (generalized additive models), a generalization of glm's. An example from that package's helpfile is:

library(cgam)
data(kyphosis, package="gam")

# regress Kyphosis on Age, Number, and Start under the restrictions:
# "concave", "increasing and concave", and "decreasing and concave"

fit <- cgam(Kyphosis ~ conc(Age) + incr.conc(Number) + decr.conc(Start),
family = binomial(), data = kyphosis)