R/hopt.be.R

Defines functions hopt.be

Documented in hopt.be

hopt.be<-function(xin)
{
  n<-length(xin)
  h<-bw.SJ(xin) #pilot bandwidth for the kernel estimate
  DensityEst <- kde(xin,xin, h, Epanechnikov)
  Rhatfx <- mean(DensityEst) #estimate R(f)
  Rhatfxthird <- mean(DensityEst^3) #estimate R(f)
  banduse<- (1/sqrt(n))*sqrt((Rhatfx * 0.2571)/(Rhatfxthird * 0.345)) #based on the epanechnikov kernel
  banduse
}

Try the L2DensityGoFtest package in your browser

Any scripts or data that you put into this service are public.

L2DensityGoFtest documentation built on Feb. 16, 2023, 9:24 p.m.