get.p {rflowcyt} | R Documentation

## 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)

### Arguments

`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

### Value

returns the p-value of the test

### Author(s)

Kevin Rader

### References

B.W. Silverman (1981),Using Kernel Density Estimates to Investigate Multimodatlity. J.R. Statist. Soc. B,43,1,97-99.

### See Also

`get.h`, `emp.f`, `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)

[Package rflowcyt version 1.8.0 Index]