ERLS: Exponentially Weighted Recursive Least Squares with Missing...

View source: R/ERLS.R

ERLSR Documentation

Exponentially Weighted Recursive Least Squares with Missing Value Imputation

Description

Exponentially Weighted Recursive Least Squares with Missing Value Imputation

Usage

ERLS(data, rho = 0.01, lambda = 0.95, nb = 100, niter = 1)

Arguments

data

Linear regression dataset (1st column as Y, others as X)

rho

Regularization parameter

lambda

Forgetting factor

nb

Maximum iterations

niter

Initial iteration count (typically 1)

Value

List containing:

Yhat

Imputed response vector

betahat

Estimated coefficients

Examples

set.seed(123)
data <- data.frame(
  y = c(rnorm(50), rep(NA, 10)),
  x1 = rnorm(60),
  x2 = rnorm(60)
)
result <- ERLS(data, rho = 0.01, lambda = 0.95, nb = 100, niter = 1)
head(result$Yhat)

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

Related to ERLS in DLMRMV...