Type: | Package |
Title: | Fitting and Forecasting of Grey Model |
Version: | 0.1.0 |
Maintainer: | Mrinmoy Ray <mrinmoy4848@gmail.com> |
Description: | Testing, Implementation and Forecasting of Grey Model (GM(1, 1)). For method details see Hsu, L. and Wang, C. (2007). <doi:10.1016/j.techfore.2006.02.005>. |
License: | GPL-3 |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.1 |
Depends: | R (≥ 2.10) |
NeedsCompilation: | no |
Packaged: | 2021-09-12 08:03:59 UTC; Rajeev-PC |
Author: | Mrinmoy Ray [aut, cre], Rajeev Ranjan kumar [aut, ctb], K.N. Singh [ctb], Ramasubramanian V. [ctb], Kanchan Sinha [ctb] |
Repository: | CRAN |
Date/Publication: | 2021-09-13 12:30:02 UTC |
Grey Model Fitting
Description
The GM function fit GM (1, 1) model for time series data.
Usage
GM(data)
Arguments
data |
Input univariate time series (ts) data. |
Details
In situations where there are limited observations available for modelling, grey modelling may be employed (Hsu and Wang, 2007). Using the OLS approach, this function calculates the parameters (a and b) of the GM (1, 1) model. Additionally, this function returns the model's fitted values and different evaluation criteria.
Value
a |
Grey model parameter |
b |
Grey model parameter |
MAE_Grey |
Mean Absolute Error (MAE) of fitted Grey model |
MAPE_Grey |
Mean Absolute Percentage Error (MAPE) of fitted Grey model |
MSE_Grey |
Mean Square Error (MSE) of fitted Grey model |
RMSE_Grey |
Root Mean Square Error (RMSE) of fitted Grey model |
fitted |
Fitted values of Grey model |
References
Hsu, L. and Wang, C. (2007). Forecasting the output of integrated circuit industry using a grey model improved by the Bayesian analysis. Technological Forecasting and Social Change, 74, 843–853.
Mao, M. and Chirwa, E. C. (2006). Application of grey model GM(1, 1) to vehicle fatality risk estimation. Technological Forecasting and Social Change, 73, 588–605.
See Also
GM_test, fcast_grey
Examples
xt <- c(640,724,813,1145,1509,2122,1883,2413,2834,4235,7144,5269)
GM(xt)
Grey Model Test for Data Suitability
Description
The GM_test function test the suitability of data for Grey modelling.
Usage
GM_test(data)
Arguments
data |
Input univariate time series (ts) data. |
Details
On the considered time series data, this function computes the ratio sequence. The data is suitable for grey modelling if the sequence value falls between 0.1345 and 7.389 (Hsu and Wang, 2007).
Value
Test_Result |
If the data is suitable for grey modelling, “data is suitable for Grey modelling” will be printed; otherwise, “data is not suitable for Grey modelling” will be printed. |
References
Hsu, L. and Wang, C. (2007). Forecasting the output of integrated circuit industry using a grey model improved by the Bayesian analysis. Technological Forecasting and Social Change, 74, 843–853.
See Also
GM, fcast_grey
Examples
xt <- c(640,724,813,1145,1509,2122,1883,2413,2834,4235,7144,5269)
GM_test(data=xt)
Grey Model Forecast
Description
The fcast_grey function computes the h step ahead forecast values.
Usage
fcast_grey(data, h=3)
Arguments
data |
Input univariate time series (ts) data. |
h |
The forecast horizon. |
Details
This function returns the fitted Grey model's h step ahead forecasted values.
Value
Forecasted_value |
h step ahead forecasted values of the fitted Grey Model. |
References
Hsu, L. and Wang, C. (2007). Forecasting the output of integrated circuit industry using a grey model improved by the Bayesian analysis. Technological Forecasting and Social Change, 74, 843–853.
Ou, S. (2012). Forecasting agricultural output with an improved grey forecasting model based on the genetic algorithm. Computer and Electronics in Agriculture, 85, 33–39.
Wang, C. and Hsu, L. (2008). Using genetic algorithms grey theory to forecast high technology industrial output. Applied Mathematics and Computation, 195, 256–263.
See Also
GM, GM_test
Examples
xt <- c(640,724,813,1145,1509,2122,1883,2413,2834,4235,7144,5269)
fcast_grey(data=xt)