The snreg package offers a set of methods for conducting regression
analysis when the model errors follow a skew‑normal distribution.
The snreg package implements the framework developed in
Oleg Badunenko and Daniel J. Henderson (2023). “Production analysis with
asymmetric noise”. Journal of Productivity Analysis, 61(1), 1–18. DOI ![]()
R commands snreg and snsf estimate models with skew-normal errors
written and maintained by Oleg Badunenko (oleg.badunenko@brunel.ac.uk).
The R package snreg computes Owen’s T function using C code written
by John Burkardt. This implementation, distributed under the MIT
license, is publicly accessible at
https://people.sc.fsu.edu/~jburkardt/c_src/owen/owen.html.
Install
devtoolsfrom CRAN (if you haven’t already):
# Install only if not already installed
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}Install the
snregpackage from GitHub. In this code, you are installing thesnregpackage created byOlegBadunenko.
# Install only if not already installed
if (!requireNamespace("snreg", quietly = TRUE)) {
remotes::install_github("OlegBadunenko/snreg", dependencies = TRUE, build_vignettes = FALSE)
} else {
message("Package 'snreg' is already installed; skipping.")
}library(snreg)- Works identically across R, RStudio, Windows, Mac, and Linux.
- Some GitHub packages may already be available in environments like
npsf. - If installation fails, common causes include missing build tools, incorrect repo names, or network restrictions.
This article guides through the code and illustrates the functionality of the package using
a subset of the banking data (
banks07) available in the package.