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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>np</strong>cdensbw 25na.actionxdatydatbwsprocess.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 explanatory data on which bandwidth selection will beperformed. <strong>The</strong> datatypes may be continuous, discrete (unordered and orderedfactors), or some combination thereof.a q-variate data frame of dependent data which bandwidth selection will be performed.<strong>The</strong> datatypes may be continuous, discrete (unordered and ordered factors),or some combination thereof.a bandwidth specification. This can be set as a conbandwidth object returnedfrom a previous invocation, or as a p+q-vector of bandwidths, with each elementi up to i = p corresponding to the bandwidth for column i in xdat, and eachelement i from i = p+1 to i = p+q corresponding to the bandwidth for columni − p in ydat. In either case, the bandwidth supplied will serve as a startingpoint in the numerical search for optimal bandwidths. If specified as a vector,then additional arguments will need to be supplied as necessary to specify thebandwidth type, kernel types, selection methods, and so on. This can be leftunset.... additional arguments supplied to specify the bandwidth type, kernel types, selectionmethods, and so on, detailed below.fastautobwmethodbwscalinga logical value specifying whether a significantly faster, memory intensive procedureshould be used when doing least-squares cross-validation. Recommendedfor datasets of moderate size. Use of this on datasets of size larger than 1000observations will result in decreased performance. For more information see thethe auto argument. Defaults to FALSE.a logical value specifying whether to allow the code to attempt to automaticallyselect the fastest routine, using a heuristic, to compute the least-squares crossvalidationfunction. Defaults to TRUE.which method to use to select bandwidths. cv.ml specifies likelihood crossvalidation,cv.ls specifies least-squares cross-validation, and normal-referencejust computes the ‘rule-of-thumb’ bandwidth h j using the standard formulah j = 1.06σ j n −1/(2P +l) , where σ j is the standard deviation of the jth continuousvariable, n the number of observations, P the order of the kernel, and lthe number of continuous variables. Note that when there exist factors and thenormal-reference rule is used, there is zero smoothing of the factors. Defaults tocv.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.

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

Saved successfully!

Ooh no, something went wrong!