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)
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.
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.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.dwmmlR.reg) with a familiar x/y interface.Make sure you have devtools installed first:
install.packages("devtools")
Then install the package:
devtools::install_github("filizkrdg/dwmmlRidge")
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).
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
For any questions, please contact: