DERLS_Woodbury: Distributed Exponentially Weighted Recursive Least Squares...

View source: R/DERLS_Woodbury.R

DERLS_WoodburyR Documentation

Distributed Exponentially Weighted Recursive Least Squares (DERLS) using Woodbury Identity

Description

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

Usage

DERLS_Woodbury(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 using the Woodbury Identity for efficient updates of the covariance matrix. The key steps include:

  1. Initial imputation of missing values.

  2. Recursive updates of the regression coefficients using the ERLS algorithm with the Woodbury Identity.

  3. Multiple independent runs to stabilize the coefficient estimates.

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

The Woodbury Identity is used to efficiently update the covariance matrix Pstar during each iteration, making the algorithm computationally efficient and suitable for large datasets.

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_Woodbury(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.