powered by
Exponentially Weighted Recursive Least Squares with Missing Value Imputation
ERLS(data, rho = 0.01, lambda = 0.95, nb = 100, niter = 1)
List containing:
Imputed response vector
Estimated coefficients
Linear regression dataset (1st column as Y, others as X)
Regularization parameter
Forgetting factor
Maximum iterations
Initial iteration count (typically 1)
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)
Run the code above in your browser using DataLab