An R package that allows modeling with partial weighted regression to remove over effect in time series models that are heavily loaded on the lag variable and to fit the model in a healthy state.
You can install the released version of XLS from CRAN with:
install.packages("XLS")
Or install the development version of XLS from Github with:
devtools::install_github("sametsoekel/eXtreme-Least-Squares")
Fit an eXtreme Least Squares Model:
library(XLS)
df <- datasets::airquality
ordered_df <- df[with(df,order(Month,Day)),]
model <- xls.fit(Ozone ~ Solar.R + Wind + Temp,na.omit(ordered_df),
error_weights = c(0.4,0.3,0.2,0.1),error_ahead_level = 4)