DERLS: Distributed Exponentially Weighted Recursive Least Squares...

View source: R/DERLS.R

DERLSR Documentation

Distributed Exponentially Weighted Recursive Least Squares (DERLS)

Description

Impute missing values in the response variable Y using distributed ERLS method. Multiple independent runs are performed to stabilize coefficient estimates. Missing values are imputed recursively and refined over multiple iterations.

Usage

DERLS(data, rho, lambda, R, nb)

Arguments

data

A data frame where:

First column:

Response Y (with possible NAs)

Remaining columns:

Predictors X

rho

Regularization parameter.

lambda

Forgetting factor.

R

Number of independent runs to stabilize estimates.

nb

Number of iterations per run.

Details

This function implements the Distributed Exponentially Weighted Recursive Least Squares (DERLS) method for imputing missing values in the response variable Y. The key steps include:

  1. Initial imputation of missing values.

  2. Recursive updates of the regression coefficients using the ERLS algorithm.

  3. Multiple independent runs to stabilize the coefficient estimates.

  4. Final prediction of missing values using the averaged coefficients.

The ERLS algorithm is particularly useful for online learning and adaptive filtering.

Value

A list containing:

Yhat

Imputed response vector.

betahat

Estimated coefficient vector.

Examples

set.seed(123)
n <- 60
data <- data.frame(
  Y = c(rnorm(n - 10), rep(NA, 10)),  # 50 observed + 10 missing
  X1 = rnorm(n),
  X2 = rnorm(n)
)
result <- DERLS(data, rho = 0.01, lambda = 0.95, R = 3, nb = 50)
head(result$Yhat)  # inspect imputed Y
result$betahat      # inspect estimated coefficients

DLMRMV documentation built on Aug. 8, 2025, 6:27 p.m.

Related to DERLS in DLMRMV...