R/de.R

Defines functions de

Documented in de

#' density estimation
#' @export
#' @param y numeric variable
#' @param family char
#' @param px dimension
de <- function(y,family=c("joint","neighborhood","semi"),px=0) {
  family = match.arg(family)
  if (family=="semi"& px==0){
    stop("specify px")
  }
  res = switch(family,joint=density0.joint(y=y),
               neighborhood=density0.neighborhood(y=y),
               semi=density0.semi(y=y,px))
  res
}
haodongucsb/toyexample documentation built on April 12, 2022, 12:25 a.m.