DERLS | R Documentation |
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.
DERLS(data, rho, lambda, R, nb)
data |
A data frame where:
|
rho |
Regularization parameter. |
lambda |
Forgetting factor. |
R |
Number of independent runs to stabilize estimates. |
nb |
Number of iterations per run. |
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:
Initial imputation of missing values.
Recursive updates of the regression coefficients using the ERLS algorithm.
Multiple independent runs to stabilize the coefficient estimates.
Final prediction of missing values using the averaged coefficients.
The ERLS algorithm is particularly useful for online learning and adaptive filtering.
A list containing:
Imputed response vector.
Estimated coefficient vector.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.