Hi, There is a small bug in the kernel() function. Everything is fine when we use the format:
kernel("name",m,r) but if we want the first argument to be a vector, which is useful is we are interested in using a method not implemented in kernel(), the default value of m is wrong. For example, if we do: s <- rep(1/11,6) k <- kernel(s) we get the error message Error in kernel(s) : 'coef' does not have the correct length The problem is that the default value, which is not indicated in the help file, violate the condition that length(coef) must be equal to (m+1). Therefore, the first line of the function, which is: function (coef, m = length(coef) + 1, r, name = "unknown") { should be changed to function (coef, m = length(coef) - 1, r, name = "unknown") { bests -- *Pierre Chaussé* Assistant Professor Department of Economics University of Waterloo [[alternative HTML version deleted]]
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel