ERLS | R Documentation |
Exponentially Weighted Recursive Least Squares with Missing Value Imputation
ERLS(data, rho = 0.01, lambda = 0.95, nb = 100, niter = 1)
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) |
List containing:
Yhat |
Imputed response vector |
betahat |
Estimated coefficients |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.