MyNixOS website logo
Description

Dynamically Weighted Modified Maximum Likelihood (DWMML) Ridge Regression.

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 of Sazak (2019) <doi:10.1080/00949655.2019.1571060> with ridge penalization to address both outlier sensitivity and variance inflation due to multicollinearity. The ridge parameter is selected automatically using the approach implemented in the 'ridgregextra' package (Karadag, Sazak, and Aydin, 2023) <https://CRAN.R-project.org/package=ridgregextra>, described further in Karadag, Sazak, and Aydin (2026) <doi:10.1080/02664763.2026.2655681>, which targets a variance inflation factor (VIF) close to but not below 1, removing the need for manual tuning. Returns comprehensive outputs (coefficients, fitted values, residuals, mean squared error (MSE), standard errors, R-squared, and adjusted R-squared) through a simple x/y interface.

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:

  • Weightedls.reg (sub-function): Given a data set and a user-supplied weight vector W, it returns the weighted least squares regression results (coefficients, fitted values, residuals, standard errors, and related diagnostics).
  • dwmmlR.reg (main function): Given x and y, it automatically determines the ridge parameter and returns the DWMML ridge regression results end-to-end.

Features

  • Robust ridge regression using the DWMML3 weighting procedure (dynamically downweights outliers while stabilizing estimates under high collinearity).
  • Asymptotically fully efficient under the normal distribution, with extreme robustness under outlier contamination, especially for large sample sizes and high correlations.
  • Automatic ridge parameter selection via ridgregextra (Karadağ et al., 2023; Karadağ, Sazak & Aydın, 2026), ensuring VIF values remain at or above 1 following Kutner et al. (2004); no manual tuning required.
  • Comprehensive outputs: coefficients, fitted values, residuals, model mean squared error (MSE), coefficient standard errors, R² and adjusted R² values.
  • Simple main entry point (dwmmlR.reg) with a familiar x/y interface.

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

  • Karadağ, F. and Sazak, H. S. (2022). "R Algorithm for Ridge Parameter Estimation in Ridge Regression." Why R? Turkey 2022 Conference, online, Verbal, Summary Text, p. 13. Link
  • Karadağ, F., Sazak, H. S., and Aydın, O. (2023). ridgregextra: Ridge Regression Parameter Estimation. R package version 0.1.1. CRAN
  • Kutner, M. H., Nachtsheim, C. J., Neter, J., and Li, W. (2004). Applied Linear Statistical Models.
  • Karadağ, F., Sazak, H. S., and Aydın, O. (2026). "ridgregextra: an alternative R package for ridge regression parameter estimation." Journal of Applied Statistics, 1–23. https://doi.org/10.1080/02664763.2026.2655681
  • Sazak, H. S. (2019). "The combined dynamically weighted modified maximum likelihood estimators of the location and scale parameters." Journal of Statistical Computation and Simulation, 89(5), 751–762. https://doi.org/10.1080/00949655.2019.1571060

Contact

For any questions, please contact:

Metadata

Version

0.1.1

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows