# NOT RUN {
n = 50; p = 5; sigma = 1;
x = matrix(rnorm(n*p),n,p) ; err = rnorm(n)
y = (x[,1]+1)^2 + sigma*err; ex=0.01 ; ey=0.01; candidate=0.01
epsx <- gcv(x,y,candidate,"ex", "categorical",1,1)
epsy <- gcv(x,y,candidate,"ey", "categorical",1,1)
# }
Run the code above in your browser using DataLab