Spline-Fourier’s Method for Modelling Inflation in Indonesia

Regression method is a statistical method for modelling dependent variable with independent variable. Nonparametric regression is an approach to regression analysis that is suitable for data that have an unknown curve shape. Modelling by using nonparametric regression method does not require any assumptions. Spline and Fourier methods are some of the estimators in nonparametric regression. The spline method requires optimal knots to obtain the best model. The most commonly used method to determine the optimal knots is Generalized Cross Validation (GCV). The Fourier method is a method based on the cosine and sinus series. The Fourier method is particularly suitable for data that experience repetitive patterns. This study modeled the Inflation rate in Indonesia from January 2007 to August 2017. The dependent variable is inflation rate, while the independent variable is time. From the result, linear spline regression estimation with three knots that generates R square of 60%. The best Fourier model is Fourier with K = 100 that generates R square of 80.12%. The best Spline model is with 9 knots generates R square of 87.65%, so, for inflation modelling in Indonesia, the spline regression model generates a simpler model with better R-square than Fourier regression.


Introduction
Regression is a statistical method that is used to model the relationship between the dependent variable with the independent variable. Regression modelling can be done with three approaches, that is parametric, nonparametric and semiparametric. The parametric regression is a regression model with a known curve shape. The parametric regression can be done as simple regression or multiple regression. This regression is very strict with the assumption, such as normally distributed residuals, homocedasticity and non autocorrelation. Therefore, this regression is very easy to use, but strict with assumption. Nonparametric regression is a regression model with unknown curve shape. Meanwhile, semiparametric regression is a regression model with one or more known curves pattern, while the other curves pattern is unknown. The pattern intended here is the pattern between the dependent variable with the independent variable. So, it can be said that semiparametric regression model is a combination of parametric and nonparametric regression [1].
Some methods that are associated with nonparametric regression models are Spline regression and Fourier regression. The spline regression is a regression model based on the Spline function [2]. The Spline function is a segmented polynomial function. In spline regression modelling, the best model is determined by splines orde and knots. There are some commonly used orde in spline, such as linear, quadratic, cubic or more. As for the determination of knot is by using Generalized Cross Validation (GCV) method.
Fourier regression is a regression model with Fourier series approach, which is a series of sine and cosine functions. The Fourier series fits very well with the pattern of data that undergoes repeated cycles. Unlike spline regression, the determination the best Fourier model is based only on the number of K [3]. K is the number of sine or cosine functions that are formed.
Inflation data is time series data that is observed for several time periods. Inflation data form a fluctuating pattern over time. Modelling of inflation data by using regression model is very useful to know the movement pattern of inflation rate. Therefore, this research will model inflation data with spline regression and Fourier regression approach 2 Literature review

Nonparametric regression
Regression model is a model that explains the relationship between independent variables with dependent variable. Simple linear regression and multiple linear regression are two kind of parametric regression. Simple linear regression is a form of parametric regression with one independent variable, while multiple linear regression is a form of parametric regression with more than one independent variables. Regression model in general is as follows: with i y is a dependent variable while t is independent variable. Meanwhile, nonparametric regression is a regression model with unknown curve shape. In general, equation 1 can be changed into: is an unknown curve of regression function while ti is an independent variable. The function curve ( ) i t η is assumed to be smooth in a given function space [1].

Fourier regression model
Fourier Regression one of the approaches in nonparametric regression based on Fourier series, that a series of sine or cosine functions. Fourier regression is particularly suitable for data that has repetitive patterns in a given period. The Fourier series functions was expressed in equation 3 [3].
The form of equation (1) can be expressed in matrix: approached by using Fourier series as follows [4]: The estimation of nonparametric regression model is by using OLS (Ordinary Least Square) as follows: 12 is a nonparametric regression estimator by using the Fourier series approach [5].

Spline regression
Spline regression is a nonparametric regression approach based on spline function. The spline function is a segmented polynomial, so it has a high flexibility. In general, the spline regression model can be expressed in equation 13: where β is constants and k1, k2, …,kr are knots, m is the orde of the spline regression model and r is the number of knos. Equation (13) can be expressed in matrix form as follows [6]: There are several methods to select optimal knot and the most commonly used method is Generalized Cross Validation (GCV). GCV function is defined as: A(k) is the projection matrix at the k-th knot; yi is the i-th response variable. I is the matrix identity. The selection of optimal knot is by the minimum value of GCV.

Results and discussion
The data used in this study is year on year inflation data of Indonesia. This study used inflation data from January 2007 to August 2017. Figure 1 shows the scatterplot of inflation data in Indonesia.

Modelling inflation in Indonesia by using fourier regression
The next step is modelling inflation rate data in Indonesia by using Fourier series. The dependent variable is the inflation rate, while the independent variable is time. In Fourier regression modelling, determining the optimal K is very important. K is an integer. The more K values indicates the more model parameters in the Fourier regression. Figure 2 shows the result of parameter estimation using Fourier series. It can be concluded that if a model has many K values, the Fourier regression models become more complex. The   Figure 2, the estimation value that is close to the actual data is K = 120, but the required parameter is 121. As for the number of K = 1 does not produce a good model estimation. It has been experimented for the number of K ranging from 2, 4, and 5 but the estimation is not as good as K = 1. Based on Table 1, for K = 1 to K = 60, the R 2 value is not very good. For K = 70, the R 2 value is above 50%, but the increase of R 2 value for K = 70 to K = 80 is not very significant. For K = 90 to K = 100, there is a significant increase in R 2 value. For the following example, take K = 5. The estimation Fourier regression model is: The next step is modeling inflation rate data by using spline truncated regression.

Modelling inflation in Indonesia by using spline truncated
In spline truncated modelling, the most important step is to determine the optimal knot. The method for selecting optimal knot in this study is GCV method. This study limits the selection of optimal knot only up to 3 knots. The orde used in this study is linear, quadratic and cubic.
The GCV values for various knots and orde were presented in Table 2. Based on Table 2, the best spline model is linear with three knots. The following is the result of parameter estimation. The linear spline model with three knot generated R 2 value of 60% and MSE of 1.9684. The scatterplot of linear spline model estimation with three knots can be seen in Figure 3. Basically, to determine the optimal knot on the spline regression, it will be very easy if the orde is linear. We can see the changes of the data on the scatterplot. Based on Figure 1, the value that experience change is on the 21-st, 34-th ,50-th, 62-nd, 80-th, 92-nd, 104-th, 116-th, and 126-th observation. So it can be determined that it has nine knots. The estimation results by using nine knots can be seen in Figure 4.

Conclusion
Inflation modelling in Indonesia by using Fourier regression resulted in a more complex model estimation compared to spline regression. Fourier regression modelling requires K = 100 to obtain an R 2 value of 80.12%. It means Fourier regression requires 101 parameters to model. While spline regression requires only 11 parameters to obtain the inflation model with R 2 of 87.65%. The linear spline model with three knots yields R 2 of 60%. Fourier regression models need to be studied in the recurring determination so that the optimal Fourier regression model will be obtained. Model Fourier can be applied to model CO, NO and another ambient air. So that it is usefull to create low carbon city as a Sustainable city.