[R] longer object length, is not a multiple of shorter object length in: kappa * gcounts

Liaw, Andy andy_liaw at merck.com
Tue Apr 19 02:37:58 CEST 2005


I suspect you set the bandwidth too small.  Consider:

> x <- sort(runif(100)) * 100
> min(diff(x))
[1] 0.001700642
> library(KernSmooth)
KernSmooth 2.22 installed
Copyright M. P. Wand 1997
> dx <- bkde(x, bandwidth=.001)
Warning message:
longer object length
        is not a multiple of shorter object length in: kappa * gcounts 

Andy

> From: Hui Han
> 
> Hi,
> 
> I was using a density estimation function as follows:
>  > est <- KernSmooth::bkde(x3, bandwidth=10)
> When setting bandwidth less than 5, I got the error "longer object 
> length,  is not a multiple of shorter object length in: kappa 
> * gcounts ".
> 
> I wonder if there is anybody who can explain the error for me?
> 
> Thanks!
> Hui
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
> 
>




More information about the R-help mailing list