Project Status: Active – The project has reached a stable, usable state and is being activelydeveloped Codecov test coverage Total Downloads CRAN status license AppVeyor build status R build status status

Smooth Effects on Response Penalty for CLM

A regularization method for the cumulative link models (CLM). The ‘serp’ function applies the ‘smooth-effect-on-response penalty’ (SERP) on the estimates of the general CLM, causing all subject-specific effects associated with each variable in the model to shrink towards a unique global effect. Fitting is done using a modified Newton’s method. Several standard model performance and descriptive methods are also available. See Ugba et al., 2021 and Tutz and Gertheiss, 2016 for more details.


Consider the cumulative logit model of the wine dataset, where the rating of wine bitterness is predicted with the two treatment factors, temperature and contact.

## The unpenalized non-proportional odds model returns unbounded estimates, hence,
## not fully identifiable.
f1 <- serp(rating ~ temp + contact, slope = "unparallel",
           reverse = TRUE, link = "logit", data = wine)
## The penalized non-proportional odds model with a user-supplied lambda gives 
## a fully identified model with bounded estimates. A suitable tuning criterion
## could as well be used to select lambda (e.g., cv) 
f2 <- serp(rating ~ temp + contact, slope = "penalize",
           link = "logit", reverse = TRUE, tuneMethod = "user",
           lambda = 1e1 ,data = wine)
## A penalized partial proportional odds model with one variable set to 
## global effect is also possible.
f3 <- serp(rating ~ temp + contact, slope = "penalize",
           reverse = TRUE, link = "logit", tuneMethod = "user",
           lambda = 2e1, globalEff = ~ temp, data = wine)
## The unpenalized proportional odds model with constrained estimates. Using a 
## very strong lambda in f2 will result in estimates equal to estimates in f4.
f4 <-  serp(rating ~ temp + contact, slope = "parallel",
            reverse = FALSE, link = "logit", data = wine)


The released version of serp can be installed from CRAN with:


or the development version from GitHub with:

# install.packages("devtools")




Ugba, E. R., Mörlein, D. and Gertheiss, J. (2021). Smoothing in Ordinal Regression: An Application to Sensory Data. Stats, 4, 616–633.

Tutz, G. and Gertheiss, J. (2016). Regularized Regression for Categorical Data (With Discussion and Rejoinder). Statistical Modelling, 16, 161-260.