get.p {rflowcyt} | R Documentation |
This function returns the p-value of rejecting the null hypothesis that the kernel density estimate given by x and h0 has at most m modes.
get.p(x,h0,m=1,num.sim=200)
x |
the data vector |
h0 |
the bandwidth for the gaussian kernel density estimate for the standardized data |
m |
the number iof modes we are trying to reject is the maximum |
num.sim |
the number of bootstrap simulations to determine this p-value |
returns the p-value of the test
Kevin Rader
B.W. Silverman (1981),Using Kernel Density Estimates to Investigate Multimodatlity. J.R. Statist. Soc. B,43,1,97-99.
set.seed(12345) x1<-matrix(rnorm(50),ncol=1) x2<-matrix(c(rnorm(25,mean=-2),rnorm(25,mean=2)),ncol=1) h1<-get.h(x1,m=1,prec=0.001) h2<-get.h(x2,m=1,prec=0.001) p1<-get.p(x1,h1,1,100) p2<-get.p(x2,h2,1,100) c(p1,p2)