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.

<strong>np</strong>udensbw 43bwsa bandwidth specification. This can be set as a bandwidth object returned froma previous invocation, or as a vector of bandwidths, with each element i correspondingto the bandwidth for column i in dat. In either case, the bandwidthsupplied will serve as a starting point in the numerical search for optimalbandwidths. If specified as a vector, then additional arguments will need tobe supplied as necessary to specify the bandwidth type, kernel types, selectionmethods, and so on. This can be left unset.... additional arguments supplied to specify the bandwidth type, kernel types, selectionmethods, and so on, detailed below.bwmethodbwscalinga character string specifying the bandwidth selection method. cv.ml specifieslikelihood cross-validation, cv.ls specifies least-squares cross-validation, andnormal-reference just computes the ‘rule-of-thumb’ bandwidth h j usingthe standard formula h j = 1.06σ j n −1/(2P +l) , where σ j is the standard deviationof the jth continuous variable, n the number of observations, P the orderof the kernel, and l the number of continuous variables. Note that when thereexist factors and the normal-reference rule is used, there is zero smoothing ofthe factors. Defaults to cv.ml.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 bandwidth object will be returned with bandwidthsset to those specified in bws. Defaults to TRUE.ckertypeckerorderukertypeokertypenmulticharacter string used to specify the continuous kernel type. Can be set as gaussian,epanechnikov, or uniform. Defaults to gaussian.numeric value specifying kernel order (one of (2,4,6,8)). Kernel order specifiedalong with a uniform continuous kernel type will be ignored. Defaults to2.character string used to specify the unordered categorical kernel type. Can beset as aitchisonaitken.character string used to specify the ordered categorical kernel type. Can be setas wangvanryzin.integer number of times to restart the process of finding extrema of the crossvalidationfunction from different (random) initial points.

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

Saved successfully!

Ooh no, something went wrong!