The snreg package offers a set of methods for conducting regression analysis when the model errors follow a skew‑normal distribution.
The framework
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).
Acknowledgments
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.
📦 Installing snreg R Package from GitHub
1. Install the devtools package
Install
devtoolsfrom CRAN (if you haven’t already):
# Install only if not already installed
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}2. Install the package from GitHub
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.")
}💡 Notes & Tips
- 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.
Illustration and Uses
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.