Pure Mathematics for Theoretical Computer Science

Using a Semi-Parametric Regression Model to Estimate a Function of the Quantity of Date Production in Iraq

Kareem K. Aazer
Volume 3, Issue 1, pp. 16–20 (2024)
DOI: https://doi.org/10.54216/PMTCS.030104
Online: https://www.americaspg.com/journal/40/article/2630

Abstract

The semi-parametric referral model is one of the important developments that used the analysis of their independent effect on other variables, which produces prediction issues. It is known that the semi-parametric referral model combines direct referral models, whose variables are linear, with analmic conversion models, whose variables are non-linear. In this, it was done. The research presents the production function of the quantity of dates, which is affected by the multiplicities. Some of them control parameters such as heart rate and settings of fruiting palm trees, and some of them behave nonlinearly, such as humidity, temperature, wind, and others, and we take the variable to determine the air temperature. It has been observed that the mean square error of the semi-parametric regression model is less than the mean square error of the parametric regression model, which assumes that all variables behave linearly. This proves the validity of the results in the case of using sample sizes for a set of data generated through simulation experiments, which showed that the regression models are semi-parametric.

Keywords: Parametric regression; nonparametric regression; semi-parametric regression; date production quantity.

1. INTRODUCTION

distribution of errors (the error distribution is unknown). The semi-parametric model has two cases: the first is called the partial linear model, which depends on both the parametric regression model and the nonparametric regression model. In the second case, the regression model is called the combined regression model, which combines a parametric regression function with a nonparametric regression function in the presence of a merging parameter, which gives added weight to both the parametric and nonparametric models. The combined model depends on the value of the merging parameter. It is between zero and one, which determines whether the model is correct, incorrect, or close to correct [1, 2].

The semi-parametric regression method has gained wide popularity recently, due to its advantage in combining parametric regression functions with nonparametric regression functions in one, which is a feature that made the new model bypass the problem of dimensionality in the case of completely nonparametric models, and also provided a larger environment. The application is one of those in the case of parametric regression models because the latter may be affected by some independent (explanatory) variables that do not have a known parametric distribution. Also, sometimes the function under study may not be fully represented because some of the variables behave parametrically and others non-parametrically. Also, there are often doubts about the homogeneity of error variances, especially in those cases where variables are represented spatially or temporally, in addition to not knowing the

2. THE THEORETICAL SIDE

The semi-parametric regression model, which was proposed by researchers Robinson in 1988 and Paul Speckman in 1988, is a combination of the parametric regression function with the nonparametric regression function. Therefore, it is a special case of the additive regression model. Because it consists of two functions, it is called the partial linear regression function [3, 4, 5, 6]. The explanatory variables in the parametric part are binary or discrete explanatory variables, and they are often referred to as

X′ i = (xi1,xi2,...,xip),

while the nonparametric part is estimated according to one of the following methods:

1. Kernel regression. 2. Spline approximation. 3. Piecewise polynomial. 4. Local polynomial techniques.

In this aspect, the multiple linear regression function was taken in the parametric part, and in the nonparametric part, a local polynomial smoother was chosen. The average partial linear regression is written in the following formula:

E(Yi | Xi,Ti) = X′ iβ +g(Ti). (2-1)

Here, Yi is the dependent variable,

X′ i = (xi1,xi2,...,xip), Ti = (ti1,ti2,...,tip), β = (β1,β2,...,βp)′,

where β is the estimated feature vector and g(Ti) is the anonymous bootstrap function.

2.1 Local Polynomial Smoother

The local polynomial smoother is one of the best common methods for estimating the kernel, as it is used with both fixed and random designs. The local linear regression smoother is also highly efficient compared to various other smoothers. When choosing the kernel function and bandwidth, it is 100% suitable among all available or possible graders [7].

Assuming a polynomial of order P, the Taylor expansion of m(T) can be written as follows:

m(T) = α0 +α1(Ti −t)+α2(Ti −t)2 +···+αP(Ti −t)P.

By performing sequential differentiation, we get m′(T) = α1 +2α2(Ti −t)+3α3(Ti −t)2

+···+PαP(Ti −t)P−1,

m′′(T) = 2α2 +6α3(Ti −t)

+···+P(P−1)αP(Ti −t)P−2, ...

m(P)(T) = P!αP.

Suppose that m(t) = α0,

m′(t) = α1,

m′′(t) = 2α2 =⇒ m′′(t)

2 = α2,

m(P)(t) = P!αP =⇒ αP = m(P)(t)

Thus, m(T) = α0 +α1(Ti −t)+α2(Ti −t)2 +···+αP(Ti −t)P p ∑ j=1 αj(Ti −t)j. (2-11) m(T) =

The semi-parametric regression model is then

Yi = X′ iβ +m(Ti)+εi p ∑ j=1 αj(Ti −t)j +εi. (2-12)

Yi = X′

By squaring both sides of the above equation, entering the sum, and multiplying by Kh(Ti −t) [4, 8], p ∑ j=1 n ∑ i=1 n ∑ i=1

Yi −X′ iβ −

αj(Ti −t)j i Kh(t −Ti) =

×Kh(t −Ti), i = 1,2,...,n; j = 1,2,..., p.

The scaled kernel

Kh(·) = 1 is a real, symmetric, definite, continuous function, and its integral is equal to one,

R K(u)du = 1. Referring to the bandwidth parameter, the aforementioned equation is converted into matrix form as follows:

  Y1 α = [α0,α1,...,αp]′, Y = , 

... Yn

1 T1 −t ··· (T1 −t)P ... ... ... ... 1 Tn −t ··· (Tn −t)P

,

Kh(t −T1) ··· 0 ... ... ... 0 ··· Kh(t −Tn)

= diagKh(t −Ti).

After converting equation (2-12) into a matrix, it is written as follows:

Y = Xβ +Tα +ε. (2-13) The weighted least squares (WLS) method was used as follows:

∂ε′Wε ∂α′ = −T′W(Y−Xβ −Tα) = 0.

Therefore,

bα = (T′WT)−1T′W(Y−Xbβ LP). (2-14)

As for αj, its estimate is found using the least squares method, and we extract an estimate of β [9, 10]:

ε′ε = (Y−Xβ −Tα)′(Y−Xβ −Tα), ∂ε′ε ∂β ′ = −X′(Y−Xbβ −Tbα) = 0.

Hence,

X′Xbβ = X′Y−X′Tbα. (2-15)

Substitution gives

X′Xbβ = X′Y−X′T(T′WT)−1T′W(Y−Xbβ LP), X′Xbβ = X′Y− � −X′T(T′WT)−1T′WXbβ LP  ,

X′T(T′WT)−1T′WY

Writing

R = I−T(T′WT)−1T′W, the last expression becomes

X′RXbβ LP = X′RY,

bβ LP = (X′RX)−1X′RY. (2-16)

The arithmetic mean is obtained by using equation (2-16) as follows:

and industrial importance. Palm cultivation is widespread in areas with a desert climate, and since Iraq’s climate is semi-desert, it is a good place for palm cultivation. Date production is affected by several factors, including price and number of palm trees, along with climatic conditions such as humidity, wind, amount of water, and temperature. Data were collected for the years from 1980 to 2020, so the sample size is 41, and the following variables were taken: the quantity of production, which represents the dependent variable Y, and the independent variables are the number of fruit palms X1, which represents the first independent variable, and the price rate as the second independent variable X2, in addition to the dependence of the quantity of production on a nonparametric variable, which is the temperature variable t.

3.1 Statistical Metrics

Table 1. shows the statistical measures for the variables included in the research.
Table 1. shows the statistical measures for the variables included in the research.
+(X′RX)−1X′Rε.

Furthermore,

I−T(T′WT)−1T′W

�  RTα = Tα = Tα −Tα = 0, (X′RX)−1X′RTα = 0.

Therefore, bβ LP = β +(X′RX)−1X′Rε. (2-17) When the expectation is entered, the above equation becomes

E(bβ LP) = β.

As for the variance, it can be found from equation (2-17):

bβ LP −β = (X′RX)−1X′Rε.

By squaring both sides of the equation,

h (bβ LP −β)(bβ LP −β)′i

V-COV(bβ LP) = E

= (X′RX)−1X′R′RX(X′RX)−1σ2

3. THE PRACTICAL ASPECT

Palm cultivation is considered one of the most important agricultural crops in Iraq because of its economic, nutritional,

Table 1. Statistical measures for the variables included in the research.
Table 1. Statistical measures for the variables included in the research.

Production quantity (y) 251440 931540 5.8847e+05 1.8586e+05 Price rate (x1) 191 984000 3.7219e+05 2.9339e+05 Preparation of fruit palms (x2) 1413700 159111900 1.5605e+07 2.3253e+07 Temperature average (t) 2.687 30.300 27.6877 4.2368

When using simulation experiments to apply what was presented in the theoretical aspect, the following semi-parametric regression model was used:

Yi = sin(πt)+xi1β1 +xi2β2 +εi.

Assuming that Y represents a random variable, the variables xi1 and xi2 were generated according to the standard normal distribution, while the variable t was generated according to the distribution. Two parameter settings were assumed: (β1,β2) = (0.5,0.25) and (β1,β2) = (2,−3). The error is normally distributed,

εi ∼N(0,σ2).

The simulation experiments were carried out using three sample sizes: n = 30, 50, and 100. Table 2 shows the estimated values for the different sample sizes.

Table 2. Estimated values for different sample sizes.
Table 2. Estimated values for different sample sizes.

(0.5,0.25) 30 0.5970 0.3164 2.89e+03 1.7559 0.4298 −0.851 −0.0255 34.6056 50 0.5595 0.2456 2.10e+03 1.0569 0.4015 0.192 −0.2505 27.6355 100 0.4583 0.2728 2.69e+03 0.4457 0.4856 0.277 0.1332 102.2379 (2,−3) 30 1.9753 −3.0461 1.742e+03 0.9328 1.8866 −3.225 −0.3892 21.0481 50 1.8902 −3.2589 3.25e+03 1.1472 2.0142 −3.476 0.0622 46.6195 100 2.0316 −3.4133 4.253e+0 0.4279 1.9906 −3.030 0.2962 121.7104 bβ LP = (X′RX)−1X′RY. Substituting equation (2-13) into equation (2-16), it results:

(a) n = 30, β1 = 0.5, β2 = 0.25. (b) n = 50, β1 = 0.5, β2 = 0.25. (c) n = 100, β1 = 0.5, β2 = 0.25.

Figure 1. Drawings for each of the sample sizes and default values in the simulation experiments.
Figure 1. Drawings for each of the sample sizes and default values in the simulation experiments.

(d) n = 30, β1 = 2, β2 = −3. (e) n = 50, β1 = 2, β2 = −3. (f) n = 100, β1 = 2, β2 = −3.

We notice from Figure 1 that the curve of the semi-parametric regression function varies depending on the sample sizes and the default values of the parameters in the simulation experiments.

If real data is used to estimate the semi-parametric regression function and compare it with the ordinary regression function, the mean square error is shown in Table 3.

Table 3. Estimated parameter values and mean square errors extracted from real-world data.
Table 3. Estimated parameter values and mean square errors extracted from real-world data.

β0 = 551577.674

6.9558e+44 β1 = 0.001 β2 = 0.106 β3 = −76.432 h = 0.0800

4.3569e−14 β1 = 0.0796 β2 = 0.0011

We note from Table 3 the estimated values of the parameters using the ordinary least squares method in the event that the variables are assumed to behave parametrically, as the mean square error is 6.9558e+44. However, if we make the first variable and the second variable linear, and the third variable non-linear, it behaves nonparametrically; the mean square error is 4.3569e−14. We note that the PLM estimation method outperformed OIS because it gave a lower mean square error.

4. CONCLUSION

From what was mentioned in the practical aspect, it is clear that the semi-parametric regression model has flexibility in describing data in the case of simulation experiments and in the case of real data compared to the semi-parametric model. We also note that the semi-parametric regression model has shown better results in the case of using sample sizes for a set of data generated by the method of simulation experiments. Also, the semi-parametric regression model is better in the prediction process because it has the lowest mean square error compared to the usual least squares method.

References

  1. P. L. Gozalo, “A consistent model specification test for nonparametric estimation of regression function models,” Econometric Theory, vol. 9, pp. 451–477, 1993.
  2. A. K. Han, “Non-parametric analysis of a generalized regression model: The maximum rank correlation estimator,” Journal of Econometrics, vol. 35, pp. 303–316, 1987.
  3. J. Fox, An R and S-Plus Companion to Applied Regres- sion. Sage, 2002.
  4. W. González-Manteiga and R. Cao, “Testing the hy- pothesis of a general linear model using nonparametric regression estimation,” Test, vol. 2, pp. 161–188, 1993.
  5. T. Juhl, “A nonparametric test of the predictive regres- sion model,” Journal of Business & Economic Statistics, vol. 32, pp. 387–394, 2014.
  6. K. Jeong, W. K. Härdle, and S. Song, “A consistent non- parametric test for causality in quantile,” Econometric Theory, vol. 28, pp. 861–887, 2012.
  7. T. Choi and M. J. Schervish, “On posterior consistency in nonparametric regression problems,” Journal of Multivariate Analysis, vol. 98, pp. 1969–1987, 2007.
  8. R. L. Eubank, C.-S. Li, and S. Wang, “Testing lack-of- fit of parametric regression models using nonparametric regression techniques,” Statistica Sinica, pp. 135–152, 2005.
  9. P. L. Gozalo and O. B. Linton, “Testing additivity in generalized nonparametric regression models with estimated parameters,” Journal of Econometrics, vol. 104, pp. 1–48, 2001.
  10. J. X. Zheng, “A consistent nonparametric test of para- metric regression models under conditional quantile restrictions,” Econometric Theory, vol. 14, pp. 123–138, 1998.