Penalized Maximum Likelihood Estimation of Semiparametric Generalized Linear Models with Application to Climate Temperature Data

Global temperature change is an important indicator of climate change. Climate time series data are characterized by trend, seasonal/cyclical as well as irregular components. Adequately modeling these components cannot be overemphasized. In this paper, we have proposed an approach of modeling temperature data using semiparametric additive generalized linear model. We have derived a penalized maximum likelihood estimation of the additive component of the semiparametric generalized linear models, that is, of regression coefﬁcients and smooth functions. A statistical modeling with real time series data set was conducted on temperature data. The study has provided indications on the gain of using semiparametric modeling in situations where a signal component can be additively decomposed in to trend, cyclical and irregular components. Thus, we recommend semiparametric additive penalized models as an option to ﬁt time series data sets in modelling the different component with different functions to adequately explain the relation inherent in data.


Introduction
A systems or a signal is defined by a set of entities, named as components that are jointly connected. These connections are accountable for defining the various relationships and dependencies among all components. The relationships and the dependencies are often unknown. Therefore, the knowledge of the components and understanding their connections according to [1], is an important way to modeling the system in order to improve decision making, forecasting, controlling system among other things. Climate change effects on individual regions varies over time according to [2], and therefore, societies need conscious effort to mitigate or adapt to changes.
A key to effective managerial decision-making will be forecasts of climate change that are accurate and cost effective. Global temperature change is an important indicator of climate change, although by no means the only one, [3]. Also, global temperature is a popular metric for describing the state of global climate. However, its effects are felt locally, but the global distribution of climate response to many global climate changes is reasonably congruent in climate models, suggesting that the global metric measure is useful [4]. Climate change is far from intangible, it is presently defining the course of people's lives. Africa experienced extreme weather events and more irregularity in weather patterns, leading to serious outcomes for the people, who depend on land and some water bodies to survive, [5] Most natural time series signals are composed of trend as well as seasonality (or periodicity) components which described their observed sequence, and extracting these components are a crucial subject or problem in many scientific arenas. Additive models are generally employed in offering identically flexible and real explanations of relationship in modeling, such as regression modeling. In the literature, several studies assumed a linear relationship in the modeling are too limiting. Yet, the regression models normally adopt independent errors. However, there are numerous applications in which the data are correlated such as time series data in natural sciences and as well as the environmental science settings. To overcome the drawback of a parametric estimation, we employ the semiparametric generalized linear modeling approach, where we model the trend non-parametrically by cubic spline smoothing and the seasonal/cyclical by Fourier function. The study, proposed a one-dimensional curve setting to consider formulating a functional relationship of modeling the components using semiparametric generalized linear models framework. These components are to be estimated using different function to establish the functional relationships inherent in the time series signal. Generally, spline smoothing is one of the nonparametric methods regularly used in practice for function estimation where requirement of assumption about the shape of the unknown function is not needed. The trend component will be adequately estimated by using the cubic spline. The Fourier function comes in handy and well suited to model signals that exhibits some seasonal/cyclical components. In this regard, the knowledge of climatic variables is indispensable. The time series analysis of climatic variables is a way to learn evolution of climate change and its effects on the socio-economic development of the society.

Materials and Methods
Researchers such as [6,7], originated the estimation of the trend and seasonality components from a one dimensional time series signal in Economics. This was followed by further prescribed advances in statistics, see [8,9,10,11,12]. The structural time-series model was formilized and described as the classical way of decomposition by [12,13], According to [14], and [15] owing to the increasing global warming in the world, analyzing greenhouse gas emissions is an essential concern. To estimate future emissions, the following time series analysis models: moving average method, exponential smoothing method, and exponential smoothing with trend method were used to estimate greenhouse gas emissions. For suitability of their models, they performed a statistical analysis on their results based on mean error, mean absolute error and root mean square values to assess the performance of the formulated models. An indication of modeling climatic factors using time series analysis concepts, even though the complex evolution of greenhouse gas emissions such as periodic or otherwise oscillatory nature were not considered in this approach.
Another study by [16], considered a generalized structural time-series modeling framework to analyzed the monthly records of mean temperature, one of the best central environmental factors, using classical stochastic processes, using the SARIM A(0, 1, 2)(0, 1, 1) 12 model and obtain a mediumterm (10 years) forecast of the mean temperature in Erbil, community in Iraq, they predicted that the average temperature in Erbil, Iraq, will be stable for the next 10 years. Temperature could be seen as a localized climatic factor, concerted effort are required locally or globally to minimized the impact of climate , hence the need to scale this study globally. Succinctly, global mean surface temperature is widely used in the climate literature as a measure of the impact of human activity on the climate system , as a consequent, [17], employed the generalized least squares estimator, which they indicated has the capabilities to moderates most of the inaccuracy associated with the use of a naive area weighted average.
A study on the detection and future projection of climate change in the city of Rio de Janeiro by, [18], posited that, the average change in annual maximum (minimum) air temperatures may range between 2 • C and 5 • C (2 • C and 4 • C) above the current weather values in the late 21st Century. They also indicated that, the warm (cold) days and nights are becoming more (less) frequent each year, and for the future climate (2100) it has been projected that about 40% to 70% of the days and 55% to 85% of the nights will be hot, leading to no longer cold days and nights.
Also, a study by [19], on the trends and periodicities in the annual and seasonal temperature time series at fifteen weather stations within Ontario Great Lakes Basins were analyzed, for the period 1941-2005, where the researchers employed Fourier series analysis, t-test, and Mann-Kendall test, the study reveals that the extreme minimum temperature is increasing annually and seasonally, with statistically significant at many stations. Several researchers such as [20,21] used a Deterministic-Stochastic Combine approaches to modeled the surface temperature.
Given the Climate time series observations, y = (y 1 , · · · , y n ) collected on an ordered increasing time t = (t 1 , · · · , t n ), we formulate a functional relationship that describe the characteristics of the data-set. For a given sequence of the pairs observations {( that describes the relation between t and y = (y 1 , · · · , y n ). The modeling of the surface temperature T t is given by equa- where L t represents the trend component, C t is the cyclical or periodic component, and E t , the stochastic term.

Modeling the trend component using splines models
A spline model is a piece-wise well-defined function with the separable pieces joined together employing continuity and smoothness constraints. They are worthwhile in explaining the relationship between a response variable and one or more independent variables when the relationship involves a curve or flexible model. The segments of a spline function are usually low order polynomials of up to third degree and the polynomial segments connect at a set of finite points known as knots.
Definition 1. Let a < t 1 < · · · < t k < b be fixed points called knots. Let t 0 = a and t k+1 = b. Generally, splines functions are piecewise polynomials joined together smoothly at the knots. Formally, a spline function of order m, is a realvalued function on the closed interval [a, b].
Let L t in equation (1) be a natural cubic spline function. On each interval, [t i , t i+1 ], i = 1, · · · , m − 1, where, L t is given by a different cubic polynomial, l i ,defined as 474 Penalized Maximum Likelihood Estimation of Semiparametric Generalized Linear Models with Application to Climate Temperature Data Such that, (ii) l has m − 2 continuous derivatives and the (m − 1)st derivative is a step function with jumps at the knots. For orders represented by m = 2r,the function l is a natural spline function of order 2r if, in addition to (i) and (ii), it satisfies the natural boundary conditions From equation (2) since L t is natural cubic spline, the following must hold, Now we introduce the following notations From the definition of natural cubic spline, we have, γ 1 = γ m = 0.
We know l i to be a linear function of the form: where h i = t i+1 − t i , for i = 1, · · · , m − 1. Integrating,equation(4) twice,we obtain l i as: We need the conditions l i (t) = z i and l i (t i+1 ) to determine C 1 and C 2 , giving rise to Now, using the condition l i−1 (t i ) = l i (t i ), we obtain From equation (7), corresponds to the following system of equations These matrices are simplified as z = (z 1 , · · · , z m ) ∈ R m ,γ = (γ 2 , · · · , γ m−1 ) ∈ R m−2 Where Q is a tridiagonal (m − 2) × m matrix given by; as Here equation (8) is solved for γ , and γ 2 , · · · , γ m−1 is then plugged into equation (7).
We can specify a natural cubic spline by giving its value and second derivative at each knot t i .
Which defines the curve natural cubic spline, l fully. Letting l be a cubic interpolation spline interpolating the data {(t i ; y i )} t=1··· ,m , it consists of piecewise cubic polynomials l i such that, We are left with two degrees of freedom. The natural cubic spline is the cubic interpolation spline that furthermore enforces, l (t i ) = l (t m ) = 0 In general, we want the resulting function to exhibit some degree of smoothness. The general approach to a formal generalization of this is to introduce the roughness measure, which clearly measure the total curvature of the smoothing function. A fundamental results in spline theory is that the natural cubic spline (the cubic spline imposing, l (t i ) = l (t m ) = 0 ensures the smoothest fit by minimizing equation (14)  Theorem 2.2. With l denoting the natural cubic interpolation spline, we have for any interpolation function f ∈ C 2 such that P (f ) ≥ P (l), where P (l) is defined in equation (14), with equality if and only if f = l.
Proof. Since l ∈ C 2 is a cubic spline, we have that, Considering second term, we see that, using partial integration, the continuity of the derivatives up to and including second order, and (15). Recall the definition of τ , making the second term zero. Remaining with, We note that by letting, This immediately allows us to conclude, with equality if and only if l = f .
Using standard notation proposed by [24,22], the roughness measure, given that K = Q T R −1 Q, Q and R are defined as in equation (10)and equations (13) respectively. Thus we have proven the theorem under the boundary conditions (16), which was exactly the defining property of the natural cubic spline.

Modeling the Periodicity/Seasonality
The periodicity term, C t , defined by equation (1) as with A as the amplitude, ϕ the phase, f the frequency of the sinusoidal wave in cycle per unit time, and k as the order of the sinusoids. The right hand side of equation (18), is a nonlinear function of the phase variable, ϕ. Using the following trigonometric identity

cos (A + B) = cos (A) cos (B) − sin (A) sin (B)
Then, equation (18), can written in a form by [23] as where M k = A k cos ϕ k and N k = −A k sin ϕ k . The values of M k and N k are obtained using the least squares estimate proposed by [23] 476 Penalized Maximum Likelihood Estimation of Semiparametric Generalized Linear Models with Application to Climate Temperature Data

Method of estimation
Using the idea of semi-parametric modeling as espoused by several authors under various degree of generality, for example see [24,25,26,27,28,29]. In this paper we consider the semiparametric generalized linear models as where where Z i and t i are both possibly vector-valued, are two sets of functions for the i th response and the p−vectorβ and function l are to be estimated. We consider a one-dimensional t and the roughness of the curve l(t t ) by its integrated squared second derivative. Gien that [24], the link function G is defined as In the literature, several authors considered the used of penalized likelihood in generalized linear models, see, [25,29,24,27,26,28,30,31,32,33] The penalized log-likelihood of the semi-parametric generalized linear models is defined as from equation (23), equations (17) and also from equation (23) to be maximized over l and β.Hence, our penalized loglikelihood of the semi-parametric generalized linear models is defined as Letβ andl be estimates of β and l respectively. Let U be n − vector score function, A be an n × n information matrix.
Let also, the matrices of partial derivatives of function in equation (21) with respect to β and l to be define as The to solution to the maximum penalized likelihood estimates (β,ł) is from the modified likelihood, D T U = 0, E T U = λKl, which are nonlinear, hence the iterative solution via the Newton-Raphson algorithms with the expected second derivatives which iteratively replacing the trial estimates (β, l), at which U , A,D and E are evaluated by (β new , l new ), where equivalently equation (25) is written as [34], showed that where S = (A + λK) −1 A will always converged.

Model Diagnostics and selection of smoothing parameter
The goodness-of-fit of the model is assessed by deviance and its appropriate degrees of freedom is by 35], and the smoothing parameter is choosing via automatic algorithms of the generalized cross-validation,[36]

Data
This study adopts a secondary data on monthly temperature from the World Bank Climate Change Knowledge Portal (CCKP), an online tool that provides access to comprehensive global and country data information related to climate change and development on temperature of Ghana for period 1901 to 2016. The open R source is employed in analyzing the data.

Results and Discussion
From the Figure (1), we study the patterns of the monthly temperature for the period 1901 to 2016. The plot shows that, the data is characterized with an increasing trend and a periodic oscillations. To further understand these characterization,the sample autocorrelation and sample partial autocorrelation plots are presenting in Figure (2) below. The sample autocorrelation and sample partial autocorrelation plots, Figure (2), indicates the presents of trend and cyclical patterns, hence the oscillations observed therein. Figure 2. A critical observation of the ACF and PACF shows that the monthly temperature data is characterised with nonstationary tendencies as a results of the trend and the seasonal or cyclical variation inherent in the temperature data To model the system, we first obtain the frequencies that adequately explains the cyclical patterns of the temperature data using the spectral analysis by ploting the periodogram to identify clearly the number of harmonic frequencies that describes periodic components in the Figure(3) as the frequency components to be used in equation (18)   From the observations in Figure 1 and Figure3, we fitted the temperature date with our proposed penalized maximum likelihood estimation of the semiparametric generalized linear models to obtain the fitted curve. The fitted curve and the temperature data are plotted in Figure 5. The fitted curve adequately fits the temperature data. Also, a plot of the distribution of residuals indicates that the residuals are approximately normally distributed or a white noise.

Conclusions
In this paper, we have proposed an approach of inference and diagnostics for the semiparametric additive generalized linear model. Specifically, we have derived a penalized maximum likelihood estimation of the additive component of the semiparametric generalized linear models, that is, of regression coefficients and smooth functions. Lastly, we have conducted a statistical modeling with real time series data set(Temperature data). The study has provided indications on the gain of using semiparametric modeling in situations where a Temperature data components can be additively decomposed in to various components, other component contributing differently to 478 Penalized Maximum Likelihood Estimation of Semiparametric Generalized Linear Models with Application to Climate Temperature Data the model. Thus, we recommend semiparametric additive penalized models as an option to fit time series data sets (Temperature data) in modelling the different component with different functions to adequately explain the relation inherent in time series data set.