ols.recovery.Rd
This function performs ordinary least squares (OLS) regression, estimating the coefficients that best fit the response variable \(Y\) given the predictor matrix \(X\). The fitted values \(\hat{Y}\) are then returned.
ols.recovery(Y, X)
A numeric vector \(\hat{Y}\) containing the fitted values from the OLS regression.
The function first converts the input matrix X
to a data frame to remove any duplicate columns, ensuring that the matrix used for regression is unique in terms of predictors. It then applies OLS regression by solving the normal equations to estimate the coefficients \(\beta\). The fitted values \(\hat{Y}\) are computed as \(X \beta\).
Other recovery:
glmnet.recovery()
,
pls.recovery()
,
simple.recovery()
,
spls.recovery()