Package: greybox 2.0.9

greybox: Toolbox for Model Building and Forecasting

Implements functions and instruments for regression model building and its application to forecasting. The main scope of the package is in variables selection and models specification for cases of time series data. This includes promotional modelling, selection between different dynamic regressions with non-standard distributions of errors, selection based on cross validation, solutions to the fat regression model problem and more. Models developed in the package are tailored specifically for forecasting purposes. So as a results there are several methods that allow producing forecasts from these models and visualising them.

Authors:Ivan Svetunkov [aut, cre], Yves R. Sagaert [ctb]

greybox_2.0.9.tar.gz
greybox_2.0.9.zip(r-4.7)greybox_2.0.9.zip(r-4.6)greybox_2.0.9.zip(r-4.5)
greybox_2.0.9.tgz(r-4.6-x86_64)greybox_2.0.9.tgz(r-4.6-arm64)greybox_2.0.9.tgz(r-4.5-x86_64)greybox_2.0.9.tgz(r-4.5-arm64)
greybox_2.0.9.tar.gz(r-4.7-arm64)greybox_2.0.9.tar.gz(r-4.7-x86_64)greybox_2.0.9.tar.gz(r-4.6-arm64)greybox_2.0.9.tar.gz(r-4.6-x86_64)
greybox_2.0.9.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
greybox/json (API)

# Install 'greybox' in R:
install.packages('greybox', repos = c('https://config-i1.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/config-i1/greybox/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

forecastingmodel-selectionmodel-selection-and-evaluationregressionregression-modelsstatisticscpp

10.67 score 32 stars 36 packages 134 scripts 2.7k downloads 119 exports 17 dependencies

Last updated from:78271b1508. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK230
linux-devel-x86_64OK232
source / vignettesOK289
linux-release-arm64OK231
linux-release-x86_64OK194
macos-release-arm64OK127
macos-release-x86_64OK280
macos-oldrel-arm64OK102
macos-oldrel-x86_64OK295
windows-develOK161
windows-releaseOK154
windows-oldrelOK160
wasm-releaseOK195

Exports:accuracyactualsAICcaidaidCatalmassocassociationasymmetryBBICccalmcextremitycoefbootstrapcramerdalaplacedbcnormdetectdstdetectleapdetermdeterminationdfnormdgnormdlaplacedlogitnormdrectnormdsdsrbootdtplnormerrorTypeextractScaleextractSigmaextremityforecastGMRAEgraphmakerhamhmimplantis.almis.calmis.greyboxis.greyboxDis.occurrenceis.rmcis.rollingOriginis.scalelmCombinelmDynamicMAEMAPEMASEmcorMEmeasuresMISMPEMREMSEmultipliersnparamnvariateoutlierdummypAICpAICcpalaplacepbcnormpBICpcorpfnormpgnormpinballplaplaceplogitnormpointLikpolyprodprectnormpsptplnormqalaplaceqbcnormqfnormqgnormqlaplaceqlogitnormqrectnormqsqtplnormralaplacerAMErbcnormrfnormrgnormrlaplacerlogitnormrMAErmcbrMISRMSSErorrectnormrRMSErsrtplnormSAMEsCEsmsMISsMSEsPISspreadstepwisesticktableplottemporaldummyxregExpanderxregMultiplierxregTransformerxtable

Dependencies:askpasscurlgenericshttrjsonlitelatticemimenloptropensslpracmaR6Rcppstatmodsystexregxtablezoo

Greybox main vignette
Main functions | Model evaluation functions | Marketing analytics tools | Methods | Exogenous variables transformation tools | Distribution functions | Additional functions | xregExpander | stepwise | calm | References

Last update: 2026-06-24
Started: 2018-03-03

Augmented Linear Model
Supported distributions | Density functions of continuous distributions | Normal distribution | Laplace distribution | Asymmetric Laplace distribution | S distribution | Generalised Normal distribution | Logistic distribution | Student t distribution | An example of application | Density functions for continuous non-negative data | Box-Cox Normal distribution | Folded Normal distribution | Rectified Normal distribution | Density functions for continuous positive data | Log-Normal distribution | Inverse Gaussian distribution | Gamma distribution | Exponential distribution | Log-Laplace distribution | Log-S distribution | Log-Generalised Normal distribution | Continuous distributions on a specific interval | Logit-normal distribution | Beta distribution | Probability mass functions of discrete distributions | Poisson distribution | Negative Binomial distribution | Binomial distribution | Geometric distribution | Cumulative functions for binary variables | Cumulative Logistic distribution | Cumulative Normal distribution | Mixture distribution models | Scale model | Using different loss functions | Estimation process | References

Last update: 2026-02-18
Started: 2018-09-06

Rolling Origin
How can this be done? | What does this have to do with R? | Making things more ~~exciting~~ complicated | Making things even more ~~complicated~~ exciting | References

Last update: 2024-06-18
Started: 2018-04-30

Marketing analytics with greybox
Analysing the relation between the two variables in categorical scales | Cramer's V | Plotting categorical variables | Association between the categorical and numerical variables | Association between several variables | Measures of association | Partial correlations | Plots of association between several variables | Regression diagnostics

Last update: 2020-01-03
Started: 2019-01-06

Readme and manuals

Help Manual

Help pageTopics
Error measures for an estimated modelaccuracy.greybox accuracy.predict.greybox
Function extracts the actual values from the functionactuals actuals.alm actuals.default actuals.lm actuals.predict.greybox
Corrected Akaike's Information Criterion and Bayesian Information CriterionAICc BICc
Automatic Identification of Demandaid aidCat
Augmented Linear Modelalm
Measures of associationassoc association
Create Lagged or Lead Variables for Time Series RegressionB
Combine regressions based on information criteriacalm lmCombine
Coefficients of the model and their statisticscoef.alm coef.greybox confint.alm confint.scale summary.alm vcov.alm vcov.scale
Bootstrap for parameters of modelscoefbootstrap coefbootstrap.alm coefbootstrap.lm
Calculate Cramer's V for categorical variablescramer
Asymmetric Laplace DistributionALaplace dalaplace palaplace qalaplace ralaplace
Box-Cox Normal DistributionBCNormal dbcnorm pbcnorm qbcnorm rbcnorm
DST and Leap year detector functionsdetectdst detectleap
Coefficients of determinationdeterm determination
Folded Normal Distributiondfnorm FNormal pfnorm qfnorm rfnorm
The generalized normal distributiondgnorm pgnorm qgnorm rgnorm
Distribution functions of the greybox packageDistributions
Laplace Distributiondlaplace Laplace plaplace qlaplace rlaplace
Logit Normal Distributiondlogitnorm LogitNormal plogitnorm qlogitnorm rlogitnorm
Rectified Normal Distributiondrectnorm prectnorm qrectnorm rectNormal rrectnorm
S Distributionds ps qs rs SDistribution
Data Shape Replication Bootstrapdsrboot plot.dsrboot
Three Parameter Log Normal Distributiondtplnorm ptplnorm qtplnorm rtplnorm TPLNormal
Functions that extracts type of error from the modelerrorType
Functions to extract scale and standard error from a modelextractScale extractScale.default extractScale.greybox extractSigma extractSigma.default extractSigma.greybox
Linear graph construction functiongraphmaker
Grey boxgreybox-package greybox
Half moment of a distribution and its derivatives.asymmetry cextremity extremity ham hm
Implant the scale model in the location modelimplant
Greybox classes checkersis.alm is.calm is.greybox is.greyboxD is.occurrence is.rmc is.rollingOrigin is.scale
Combine regressions based on point information criterialmDynamic
Multiple correlationmcor
Error measuresErrors GMRAE MAE MAPE MASE ME MIS MPE MRE MSE rAME rMAE rMIS RMSSE rRMSE SAME sCE sMIS sMSE sPIS
Error measures for the provided forecastsmeasures
Dynamic multipliers from an ARDL modelmultipliers
Number of parameters and number of variates in the modelnparam nvariate
Outlier detection and matrix creationoutlierdummy outlierdummy.alm outlierdummy.default
Point AICpAIC pAICc pBIC pBICc
Partial correlationspcor
Pinball functionpinball
Plots of the fit and residualsplot.alm plot.greybox
Point likelihood valuespointLik
This function calculates parameters for the polynomialspolyprod
Forecasting using greybox functionsforecast.alm forecast.greybox predict.alm predict.greybox predict.scale
Regression for Multiple Comparison with the Bestplot.rmcb rmcb
Rolling Originro
Scale Modelsm sm.alm sm.default sm.lm
Construct scatterplot / boxplots for the dataspread
Stepwise selection of regressorsstepwise
Seasonality, Trend, and Irregular Contribution Kitplot.stick print.stick stick
Construct a plot for categorical variabletableplot
Dummy variables for provided seasonality typetemporaldummy temporaldummy.Date temporaldummy.default temporaldummy.POSIXt temporaldummy.ts temporaldummy.zoo
Exogenous variables expanderxregExpander
Exogenous variables cross-productsxregMultiplier
Exogenous variables transformerxregTransformer