Displaying 1 result from an estimated 1 matches for "winn1".
Did you mean:
winnt
2003 Jul 17
0
Silverman modality test
...ength(modes))[modes==-2]
modes <- sum (modes)
return (modes)
}
hcrit <- function (x, n, e=.0001)
# Returns the minimal window width such that the kernel density estimate
# of x has n modes.
{
minw <- min (abs (diff (x)))
maxw <- (max (x) - min (x))/2
winN <- maxw
winN1 <- minw
while (abs(winN-winN1)>e)
{
modes <- nbmodes (x, winN)
winN1 <- winN
if (modes > n)
{
minw <- winN
winN <- (winN + maxw)/2
}
else
{
maxw <- winN
winN <- (winN - minw)/2...