search for: modelk

Displaying 1 result from an estimated 1 matches for "modelk".

Did you mean: model
2010 Apr 25
1
function pointer question
...i] y_i <- data.y[-i] yhat <- fnc(x=x_i,y=y_i) score <- score + (y_i - yhat)^2 } score <- score/n return(score) } I would like to use it like this: ## ## Estimator function using Gaussian Kernel ## gaussiankernel <- function(x,y,h) { modelks <- ksmooth(x,y,kernel="normal",bandwidth=h,x.points=x) yhat <- modelks$y return(yhat) } scoreks <- loocv(data,gaussiankernel(h=0.5)) I expected this to work but it doesn't :( basically I wanted to take advantage of the named parameters so I could pass the partially s...