cvkreg2d {spgam} | R Documentation |
~~ A concise (1-5 lines) description of what the function does. ~~
cvkreg2d(h, pts, y, w = rep(1, length(y)))
h |
~~Describe h here~~ |
pts |
~~Describe pts here~~ |
y |
~~Describe y here~~ |
w |
~~Describe w here~~ |
~~ If necessary, more details than the description above ~~
~Describe the value returned If it is a LIST, use
comp1 |
Description of 'comp1' |
comp2 |
Description of 'comp2' |
...
....
~~further notes~~
~Make other sections like Warning with section{Warning }{....} ~
~~who you are~~
~put references to the literature/web site here ~
~~objects to See Also as help
, ~~~
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as function(h, pts, y, w = rep(1, length(y))) { # cross-validation for kernel regression n <- length(y) x1 <- pts[, 1] x2 <- pts[, 2] # dynload("cvker2d") result <- .Fortran("cvker2d", h = as.single(h), x1 = as.single(x1), x2 = as.single(x2), y = as.single(y), w = as.single(w), n = as.integer(n), cv = as.single(0)) ans <- result$cv ans }