bw_MSE: Internal function.

View source: R/lpbwdensity_fn.R

bw_MSER Documentation

Internal function.

Description

Calculates MSE-optimal bandwidths.

Usage

bw_MSE(
  data,
  grid,
  p,
  v,
  kernel,
  Cweights,
  Pweights,
  massPoints,
  stdVar,
  regularize,
  nLocalMin,
  nUniqueMin
)

Arguments

data

Numeric vector, the data.

grid

Numeric vector, the evaluation points.

p

Integer, polynomial order.

v

Integer, order of derivative.

kernel

String, the kernel.

Cweights

Numeric vector, the counterfactual weights.

Pweights

Numeric vector, the survey sampling weights.

massPoints

Boolean, whether whether point estimates and standard errors should be corrected if there are mass points in the data.

stdVar

Boolean, whether the data should be standardized for bandwidth selection.

regularize

Boolean, whether the bandwidth should be regularized.

nLocalMin

Nonnegative integer, minimum number of observations in each local neighborhood.

nUniqueMin

Nonnegative integer, minimum number of unique observations in each local neighborhood.

Value

Numeric vector: bandwidth sequence.


lpdensity documentation built on Oct. 6, 2024, 9:06 a.m.