% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lpbwdensity_fn.R
\name{bw_IMSE}
\alias{bw_IMSE}
\title{Internal function.}
\usage{
bw_IMSE(
  data,
  grid,
  p,
  v,
  kernel,
  Cweights,
  Pweights,
  massPoints,
  stdVar,
  regularize,
  nLocalMin,
  nUniqueMin
)
}
\arguments{
\item{data}{Numeric vector, the data.}

\item{grid}{Numeric vector, the evaluation points.}

\item{p}{Integer, polynomial order.}

\item{v}{Integer, order of derivative.}

\item{kernel}{String, the kernel.}

\item{Cweights}{Numeric vector, the counterfactual weights.}

\item{Pweights}{Numeric vector, the survey sampling weights.}

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

\item{stdVar}{Boolean, whether the data should be standardized for bandwidth selection.}

\item{regularize}{Boolean, Whether the bandwidth should be regularized.}

\item{nLocalMin}{Nonnegative integer, minimum number of observations in each local neighborhood.}

\item{nUniqueMin}{Nonnegative integer, minimum number of unique observations in each local neighborhood.}
}
\value{
Scalar: a single bandwidth.
}
\description{
Calculates integrated MSE-optimal bandwidth.
}
\keyword{internal}
