dwmmlRidge: An R Package for the DWMML Ridge Regression

This R package implements the dynamically weighted modified maximum likelihood ridge (DWMMLR) regression estimator: a robust and multicollinearity-aware linear regression estimator that combines the DWMML3 weighting procedure with ridge penalization. The method targets two common hurdles in linear modeling simultaneously: sensitivity to outliers and inflated variance due to multicollinearity.

The DWMML estimators were originally introduced by Sazak (2019) for univariate location and scale estimation, where three variants were proposed — DWMML1, DWMML2, and DWMML3 — differing in their balance between efficiency and robustness. The DWMML3 estimators, being asymptotically fully efficient and extremely robust, were selected for adaptation to ridge regression in this package. The ridge parameter k is selected automatically via the approach implemented in the ridgregextra R package (Karadağ and Sazak, 2022; Karadağ et al., 2023; Karadağ, Sazak & Aydın, 2026), which targets variance inflation factor (VIF) values close to but not below 1 as addressed in Kutner et al. (2004). This automatic and principled approach for selecting the ridge parameter enhances model interpretability and stability. This package offers a robust ridge regression solution adept at addressing issues of multicollinearity and outliers, providing DWMMLR estimates without requiring manual adjustment of the ridge parameter.

Functions

There are two functions in this package:

Features

Installation

Installing the development version from GitHub

Make sure you have devtools installed first:

install.packages("devtools")

Then install the package:

devtools::install_github("filizkrdg/dwmmlRidge")

Installing from CRAN

install.packages("dwmmlRidge")

When you install dwmmlRidge, the required Styperidge.reg package will be installed automatically via dependencies. For example data, you can install and load the isdals package (it contains the bodyfat data set).

Example Usage

library(isdals)
data(bodyfat)

x <- bodyfat[, -1]
y <- bodyfat[, 1]

## Run dwmmlR.reg to get ridge regression results
## using the DWMML ridge regression estimator
dwmmlridge <- dwmmlR.reg(x, y)
dwmmlridge$MSE
dwmmlridge$stdbeta

## Run Weightedls.reg to fit a weighted least squares regression
## using x, y, and W (weights); returns coefficients, fitted values,
## residuals, standard errors, and diagnostics
n <- nrow(x)
W <- runif(n, min = 0, max = 1)

weightedlsreg <- Weightedls.reg(x, y, W)
weightedlsreg$MSE
weightedlsreg$stdbeta

References

Contact

For any questions, please contact: