greybox
The package greybox contains functions for model building, which is currently done via the model selection and combinations based on information criteria. The resulting model can then be used in analysis and forecasting.
The list of included functions:
- alm - advanced linear regression model that implements likelihood estimation of parameters for Laplace, S, Folded Normaland Chi-Squared distributions. In a sense this is similar to glm, but with a different set of distributions.
- xregExpander - Function produces lags and leads of the provided data.
- stepwise - Function implements stepwise AIC based on partial correlations.
- combine - Function combines the regression models from the provided data based on IC weigths and returns the combined lm object.
- ro - rolling origin evaluation (see the vignette).
- rmc - Regression for Multiple Comparison of forecasting methods. Can be used, for example, when RelMAE is calculated for several forecasting methods and an analysis of statistical significance in accuracy of methods needs to be carried out. This can be especially useful when you have a lot of methods to compare. The test is faster than Nemenyi in this case and becomes more powerful and accurate.
- lmDynamic - linear regression with time varying parameters based on pAIC.
- determination - the function returns the vector of coefficients of determination (R^2) for the provided data. This is useful for the diagnostics of multicollinearity.
- qlaplace, dlaplace, rlaplace, plaplace - functions for Laplace distribution.
- qs, ds, rs, ps - functions for S distribution.
Future functions:
- nonlinearExpander - Function produces non-linear transformations of the provided data.
Methods already implemented:
- pointLik - point likelihood method for the time series models.
- pAIC - point AIC based on pointLik.
- summary - returns summary of the regression (either selected or combined).
- vcov - covariance matrix for combined models. This is an approximate thing. The real one is quite messy and not yet available.
- confint - confidence intervals for combined models.
- forecast - point and interval forecasts for the response variable.
- nParam - returns number of parameters of a model.
- getResponse - returns the response variable from the model.
- plot - plots the basic linear graph of actuals and fitted. Similar thing plots graphs for forecasts of greybox functions.
- AICc - AICc for regression with normally distributed residuals.
- BICc - BICc for regression with normally distributed residuals.
Installation
The stable version of the package is available on CRAN, so you can install it by running:
install.packages("greybox")
A recent, development version, is available via github and can be installed using "devtools" in R. First make sure that you have devtools:
if (!require("devtools")){install.packages("devtools")}
and after that run:
devtools::install_github("config-i1/greybox")