ISE_fstar: The ISE function in the kernel density estimation (KDE)...

Description Usage Arguments Details Value References See Also Examples

View source: R/OSCV_density.R

Description

Computing the ISE function for the Gaussian density estimator obtained from a random sample of size n generated from fstar.

Usage

1
ISE_fstar(h, n)

Arguments

h

numerical vector of bandwidth values,

n

sample size (number of data points generated from fstar).

Details

The integrated squared error (ISE) is a measure of closeness of the Gaussian density estimate computed from a data set generated from fstar to the true density.

Value

The vector of values of the ISE function for the correponsing vector of h values.

References

Savchuk, O.Y. (2017). One-sided cross-validation for nonsmooth density functions, arXiv:1703.05157.

See Also

fstar, sample_fstar.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
dev.new()
harray=seq(0.05,1.5,len=1000)
ISEarray=ISE_fstar(harray,100)
h_ISE=round(harray[which.min(ISEarray)],digits=4)
dev.new()
plot(harray,ISEarray,lwd=3,'l',xlab="h",ylab="ISE",main="ISE(h)",cex.main=2,cex.lab=1.7,
cex.axis=1.7)
legend(0.35,ISEarray[5],legend=c("n=100",paste("h_ISE=",h_ISE)),cex=1.8,bty="n")

## End(Not run)

Example output

Loading required package: mc2d
Loading required package: mvtnorm

Attaching package: 'mc2d'

The following objects are masked from 'package:base':

    pmax, pmin

dev.new(): using pdf(file="Rplots1.pdf")

OSCV documentation built on May 2, 2019, 6:44 a.m.

Related to ISE_fstar in OSCV...