select_bw: Select bandwidth

Description Usage Arguments Value Author(s)

Description

This function computes a bandwidth with the selected method and it also plots the corresponding function to minimize (MISE, AMISE, CV, etc.).

Usage

1
2
3
4
select_bw(smp, method = c("CV", "NR")[1], kernel = "flat", h0 = NULL,
  error_smp = NULL, error_dist = "None", error_scale_par = NULL,
  resolution = 128, error_proc = "all", panel_proc = "keep_first",
  truncation_bound = NULL, bw_interval = NULL)

Arguments

smp

It is either a vector of size n or a nxl matrix (for repeated observations; l per each individual).

method

Method used to select the bandwidth. The currently available methods are "CV" (cross-validation) and "NR" (normal reference). Cross-validation is the default.

kernel

Kernel whose Fourier transform has bounded support. There are currently 5 kernel programmed: "sinc", "triangular", "triw", "tric" and "flat". See vignette for further details and examples. Flat-top kernel is the default.

h0

Optional argument used as initial value to look for the optimal value.

error_smp

Optional vector of errors. It is necessary to approximate the error distribution if it is unknown.

error_dist

Three possible values are accepted. c("Normal", "Laplace", "None").

error_scale_par

Scale parameter matching the standard deviation. It is NULL by default and it is required if (and only if) error_dist is normal or Laplace and no sample of error is provided nor contaminated sample comes in panel structure.

resolution

Number of points to approximate integral in inversion formula, also to estimate the density (if grid was not given).

error_proc

This is required only for panel data structure. It refers to the way errors are processed. See process_differences for further details.

panel_proc

It defined what will be the contaminated sample (only) for panel data. "keep_first" will use the first column as sample while "take_aver" will take the average of contaminated samples per individual.

truncation_bound

It truncates the integrand in deconvolution formula when the denominator is smaller than this bound.

bw_interval

A bivariate vector with the limits where the function to minimize is going to be plotted.

Value

A list with the initial value, the computed value and the result of the minimization algorithm.

Author(s)

Guillermo Basulto


gbasulto/kerdec documentation built on June 5, 2019, 10:58 a.m.