2. ESTIMATION AND NONPARAMETRIC FITS

As stated previous section, different ways to approximate nonparametric part will get the corresponding estimators of image. This section will present several macros to explain how to calculate the estimates.

2.1. KERNEL REGRESSION

Let image be a kernel function satisfying certain conditions, image a bandwidth parameter. The weight function is defined as

image
Then least squares estimator of image is defined as
image
where image with image and image with image, and the nonparametric estimator of g(t):
image

The detailed discussions on asymptotic theories of the estimators image and image are referred to Gao, Hong and Liang (1995) and Speckman (1988).

XploReplmk presents the estimates of the parameter image and the nonparametric part g(t) by using kernel method to handle g(t).

res.hbeta:  vector or scalar, the estimate of image
res.hsigma: scalar, the estimate of the variance of image
when it is homoscedastic

The next picture , "plmk-ex.xpl", gives an example of XploReXploRe code to generate a sample from the XploRePLM model, and then shows how to compute the XploRePLM estimates by XploReplmk. Saving the example as a file (plmk-ex.xpl) and then linking "Execute", the actual parameter estimates are shown in the second picture (XploRe_out).

An example by using XploReplmk

image

The estimate result of plmk-ex.xpl

image

Nonparametric fit by XploReplmk

image

Green curve stands for true value, blue for parametric fit and red for nonparametric fit..

2.2. LEAST SQUARES SPLINE

Suppose that g has m-1 absolutely continuous derivatives and m-th derivative that is square integrable and satisfies image for a specified C>0. Via a Taylor expansion, the partially linear model can be rewitten as

image
where image. By using a quadrature rule, Rem(t) can be approximated by a sum of the form
image
for some set of coefficients image and points image. Let
image
and set image. The least squares spline estimator is to minimize
image
Conveniently with matrix notations, denote image with image for image and image. and image. image are found as the solution to the minimizing of
image
If the problem has an unique solution, its form is the same as image in XploReplmp. Otherwise, we may use ridge idea to modify the estimator.

XploReplmls presents the estimates of parameter and non parametric function by fitting the nonparametric part with least squares spline.

2.3. PIECEWISE POLYNOMIAL

We assume that g are Hölder continuous smooth of order p(=m+r), that is, let r and M denote nonnegative real constants image, m is nonnegative integer such that

image
Now we describe piecewise polynomial approximation for the function image, defined in [0, 1]. Given a positive image, devide [0, 1] in Mn intervals with equal length image. The estimator has the form of a piecewise polynomial of degree m based on image the intervals, where the image coefficients are chosen by the method of least squares on the basis of the data.

Let image be the indicator function of the image-th interval, and image be the midpoint of the image-th interval, so that image or 0 according to image for image and image or not. Letimage be the m-order Taylor expansion of g(t) on image. Denote

image

Consider the piecewise polynomial approximation of g of degree m given by

image
Suppose we have n observing data image. Denote
image
and
image
Then
image
Hence we need to find image and image to minimize
image
Suppose the minimization problem has an unique solution. Then the estimators of b and image are
image
and image, where image and image. The estimate of g(t) can be described as
image
for a suitable z.

XploReplmp presents the estimates image and image.

res.hbeta:  vector or scalar, the estimate of image

The next picture , "plmp-ex.xpl", gives an example of XploReXploRe code to generate a sample from the XploRePLM model, and then shows how to compute the XploRePLM estimates by XploReplmp. Saving the example as a file (plmp-ex.xpl) and then linking "Execute", the actual parameter estimates are shown in the second picture(XploRe_out).

An example by using XploReplmp

image

The parameter estimate value is listed as follows

image

The result of nonparametric fitting with following picture

image

2.4. LOCAL POLYNOMIAL

Suppose that the image derivative of g(t) at the point image exists. We then approximate the unknown regression function g(t) locally by a polynomial of order p. A Taylor expansion given, for t in a neighborhood of image,

 image

To estimate image and g(t), we first estimate theimage's as functions of image, denoted image, by minimizing

 image
where h is a bandwidth controlling the size of the local neighborhood, and image with K a kernel function assigning weights to each datum. Then minimize
 image
Denote the solution of (7) by image. Fianlly let image be the estimates of image, and dnote by image image. It is clear from the Taylor expansion in (5) that image is an estimator for image, image. To estimate the entire function image we solve the above weighted least squares problem for all points image in the domain of interest.

It is more convenient to work with matrix notation. Denote by image the design matrix of T in problem (6). Denote

image
and put
image
Further, let image be the image diagonal matric of weights: image. Then the weighted least squres problems (6) and (7) can be rewritten as
image
and
image
with image. The solution vectors are provided by weighted least squares and are given by
image

XploReplmlorg is designed to impliment the above arguments in XploReXploRe. XploRelpregest is used to estimate nonparametric regression functions. Interpolation idea is employed to calculate the estimators of beta and g(t).

Considering the same example in previous sections, we here approximate the nonlinear part with the 2-nd local polynomial approximation. The results for parametric and nonparametric parts are listed as follows.

image

image


Method and Data 
Technologies   MD*TECH Method and Data Technologies
  http://www.mdtech.de  mdtech@mdtech.de