\name{get.p} \alias{get.p} %- Also NEED an '\alias' for EACH other topic documented here. \title{Test if the kernel density estimate given by x and h0 has at most m modes } \description{ 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. } \usage{ get.p(x,h0,m=1,num.sim=200) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{x}{ the data vector } \item{h0}{ the bandwidth for the gaussian kernel density estimate for the standardized data} \item{m}{ the number iof modes we are trying to reject is the maximum } \item{num.sim}{ the number of bootstrap simulations to determine this p-value } } \value{ returns the p-value of the test } \references{B.W. Silverman (1981),Using Kernel Density Estimates to Investigate Multimodatlity. J.R. Statist. Soc. B,43,1,97-99.} \author{ Kevin Rader } \seealso{ \code{\link{get.h}}, \code{\link{emp.f}}, \code{\link{get.num.modes}}} \examples{ 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) } \keyword{distribution}