I'm trying grnn package, and reproduced the example (
http://cran.r-project.org/web/packages/grnn/grnn.pdf), I tried the example
with another x input column in the dataset:

but I'm getting the following error  "Error in Ya * patterns1 :
non-conformable arrays", though I took care to pass an input of length 2

n <- 100
set.seed(1)

x1 <- runif(n, -2, 2)
x2 = x1^2
y0 <- x1 * x2

epsilon <- rnorm(n, 0, .1)
y <- y0 + epsilon
grnn <- learn(data.frame(y,x1, x2))
grnn <- smooth(grnn,sigma=0.1)
guess(grnn, c(2,4))

# Error in Ya * patterns1 : non-conformable arrays

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to