10.07.2015 Views

The np Package - NexTag Supports Open Source Initiatives

The np Package - NexTag Supports Open Source Initiatives

The np Package - NexTag Supports Open Source Initiatives

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

72 <strong>np</strong>plregeydatezdatresidualsa one (1) dimensional numeric or integer vector of the true values of the dependentvariable. Optional, and used only to calculate the true errors. By default,evaluation takes place on the data provided by tydat.a q-variate data frame of points on which the regression will be estimated (evaluationdata). By default, evaluation takes place on the data provided by tzdat.a logical value indicating that you want residuals computed and returned in theresulting plregression object. Defaults to FALSE.DetailsValue<strong>np</strong>plreg uses a combination of OLS and no<strong>np</strong>arametric regression to estimate the parameter β inthe model Y = Xβ + Θ(Z) + ɛ.<strong>np</strong>plreg implements a variety of methods for no<strong>np</strong>arametric regression on multivariate (q-variate)explanatory data defined over a set of possibly continuous and/or discrete (unordered, ordered) data.<strong>The</strong> approach is based on Li and Racine (2003) who employ ‘generalized product kernels’ that admita mix of continuous and discrete datatypes.Three classes of kernel estimators for the continuous datatypes are available: fixed, adaptive nearestneighbor,and generalized nearest-neighbor. Adaptive nearest-neighbor bandwidths change witheach sample realization in the set, x i , when estimating the density at the point x. Generalizednearest-neighbor bandwidths change with the point at which the density is estimated, x. Fixedbandwidths are constant over the support of x.Data contained in the data frame tzdat may be a mix of continuous (default), unordered discrete(to be specified in the data frame tzdat using factor), and ordered discrete (to be specified inthe data frame tzdat using ordered). Data can be entered in an arbitrary order and data typeswill be detected automatically by the routine (see <strong>np</strong> for details).A variety of kernels may be specified by the user. Kernels implemented for continuous datatypesinclude the second, fourth, sixth, and eighth order Gaussian and Epanechnikov kernels, and theuniform kernel. Unordered discrete datatypes use a variation on Aitchison and Aitken’s (1976)kernel, while ordered datatypes use a variation of the Wang and van Ryzin (1981) kernel.<strong>np</strong>plreg returns a plregression object. <strong>The</strong> generic accessor functions coef, fitted,residuals, predict, and vcov, extract (or estimate) coefficients, estimated values, residuals,predictions, and variance-covariance matrices, respectively, from the returned object. Furthermore,the functions summary and plot support objects of this type. <strong>The</strong> returned object has the followingcomponents:evalxevalzmeanxcoefxcoeferrxcoefvcovbwevaluation pointsevaluation pointsestimation of the regression, or conditional mean, at the evaluation pointscoefficient(s) corresponding to the components β i in the modelstandard errors of the coefficientscovariance matrix of the coefficientsthe bandwidths, stored as a plbandwidth object

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!