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.

102 <strong>np</strong>regbwsubsetna.actionxdatydatbwsenvironment from which the function is called.an optional vector specifying a subset of observations to be used in the fittingprocess.a function which indicates what should happen when the data contain NAs. <strong>The</strong>default is set by the na.action setting of options, and is na.fail if that isunset. <strong>The</strong> (recommended) default is na.omit.a p-variate data frame of regressors which bandwidth selection will be performed.<strong>The</strong> datatypes may be continuous, discrete (unordered and orderedfactors), or some combination thereof.a one (1) dimensional numeric or integer vector of dependent data, each elementi corresponding to each observation (row) i of xdat.a bandwidth specification. This can be set as a rbandwidth object returnedfrom a previous invocation, or as a vector of bandwidths, with each elementi corresponding to the bandwidth for column i in xdat. In either case, thebandwidth supplied will serve as a starting point in the numerical search foroptimal bandwidths. If specified as a vector, then additional arguments willneed to be supplied as necessary to specify the bandwidth type, kernel types,selection methods, and so on. This can be left unset.... additional arguments supplied to specify the bandwidth type, kernel types, selectionmethods, and so on, detailed below.regtypebwmethodbwscalinga character string specifying which type of kernel regression estimator to use.lc specifies a local-constant estimator (Nadaraya-Watson) and ll specifies alocal-linear estimator. Defaults to lc.which method to use to select bandwidths. cv.aic specifies expected Kullback-Leibler cross-validation (Hurvich, Simonoff, and Tsai (1998)), and cv.ls specifiesleast-squares cross-validation. Defaults to cv.ls.a logical value that when set to TRUE the supplied bandwidths are interpretedas ‘scale factors’ (c j ), otherwise when the value is FALSE they are interpretedas ‘raw bandwidths’ (h j for continuous datatypes, λ j for discrete datatypes). Forcontinuous datatypes, c j and h j are related by the formula h j = c j σ j n −1/(2P +l) ,where σ j is the standard deviation of continuous variable j, n the number of observations,P the order of the kernel, and l the number of continuous variables.For discrete datatypes, c j and h j are related by the formula h j = c j n −2/(2P +l) ,where here j denotes discrete variable j. Defaults to FALSE.bwtype character string used for the continuous variable bandwidth type, specifying thetype of bandwidth to compute and return in the bandwidth object. Defaultsto fixed. Option summary:fixed: compute fixed bandwidthsgeneralized_nn: compute generalized nearest neighborsadaptive_nn: compute adaptive nearest neighborsbandwidth.computea logical value which specifies whether to do a numerical search for bandwidthsor not. If set to FALSE, a rbandwidth object will be returned with bandwidthsset to those specified in bws. Defaults to TRUE.ckertypecharacter string used to specify the continuous kernel type. Can be set as gaussian,epanechnikov, or uniform. Defaults to gaussian.

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

Saved successfully!

Ooh no, something went wrong!