List

Grey Prediction Model

Grey Prediction Model is a forecasting method based on grey system theory, suitable for handling small samples and uncertainty problems. It is located in SPSSAU -> Comprehensive Evaluation -> Grey Prediction Model.

SPSSAU Operations

Drag the analysis item (only one item) into the right-hand box and click 'Start'. Additionally, during analysis, the research sequence name (i.e., label) can be dragged into the 'Label' box. SPSSAU involves three parameters: Model, Shift Transformation, and Backward Prediction Periods.

Model: The default is GM(1,1).

Shift Transformation: This parameter is selected by default. Data usually need to pass the level ratio test. If they do not, SPSSAU will automatically add a constant value c to ensure the data meet the requirement before conducting grey prediction analysis.

Backward Prediction Periods: By default, it provides predictions for 12 backward periods, but users can customize this setting.

SPSSAU Data Format

GM(1,1) Model is typically used for forecasting with very small sample sizes. If the data include a time variable, it does not need to be included in the analysis item (it can be placed in the 'Label' item). However, when organizing data, they should generally be sorted in chronological order before inputting.

Algorithm

1.Data Preparation

First, gather the time series data to be predicted, usually represented as an array:

X = (x1,x2,...xn)

x1 is the initial value, and x2,...,xn are subsequent observations.

2.Shift Transformation

If 'Shift Transformation' is selected, the system first conducts the level ratio test using the formula:

λ=xi1xi

The values must fall within [e-2/(n+1),e2/(n+1)]. If not, SPSSAU will add a fixed number to the data sequence and then reapply the test. This fixed number is known as the shift transformation value. All subsequent calculations are based on the transformed data, but during final prediction, the shift value is subtracted.

3.Cumulative Generation Sequence (AGO)

AGO is performed to obtain a new sequence:

Y=(y1,y2,,yn) yk=i=1kxi(k=0,1,2,,n)

4.Establish the Grey Model

Using the cumulative sequence, the grey model is constructed as follows:

dydt+ay=b

Discretization yields:

yk+1yk+ayk=b

5.Parameter Estimation

The model parameters a and b are estimated using the least squares method. Define:

[y1y2yn1]=[0.5(y0+y1)10.5(y1+y2)10.5(yn2+yn1)1][ab]

6.Prediction Calculation

Using the estimated parameters a and b, future predictions are calculated with the formula:

y^k+1=(y1ba)eak+ba

y^k+1represents the predicted value at time k + 1.

7.Inverse Accumulation Generation

The predicted cumulative values are then converted back to original data scale:

x^k+1=y^k+1y^k

If shift transformation was applied, the shift value is subtracted:

x^k+1=y^k+1y^kshift

8.Model Evaluation Metrics

SPSSAU provides various evaluation metrics, as shown below:

Model Fit Metrics
Evaluation Metric Description
Residual Difference between actual and predicted values; the smaller, the better.
Relative Error Absolute residual divided by actual value; the smaller, the better.
Level Ratio Deviation Model fitting bias; the smaller, the better.
Posterior Difference Ratio (C) Precision test metric; calculated as residual variance / data variance; the smaller, the better.
Small Error Probability (p Value) Indicator of prediction accuracy; the larger, the better.
RMSE (Root Mean Square Error) Square root of the mean squared residual; the smaller, the better.

Residual

e=x^x

Relative Error

εi=|xix^i|xi×100%

Level Ratio Deviation

ρi=110.5a1+0.5a×λ, ρi represents level ratio deviation, a is development coefficient, and λ is level ratio.

Posterior Difference Ratio (C)

C=S2S1, C represents level ratio deviation.

S1 is sequence variance, calculated as: S1=1n1i=1n(xi1ni=1nxi)2

S2 is residual variance, calculated as: S2=1n1i=1n(|xixi^|1ni=1n|xixi^|)2

Small Error Probability (p Value)

p=P|eie¯|0.6745×S1,S1 represents sequence variance.

e¯=1n1i=2nei, ei represent residuals . The first value is not included in the calculation (as the residual is always zero at the first value).

RMSE (Root Mean Square Error)

RMSE=1n1i=2nei2

References

【1】The SPSSAU project (2024). SPSSAU. (Version 24.0) [Online Application Software]. Retrieved from https://www.spssau.com.

【2】周俊,马世澎. SPSSAU科研数据分析方法与应用.第1版[M]. 电子工业出版社,2024.