cvkreg2d {spgam}R Documentation

~~function to do ... ~~

Description

~~ A concise (1-5 lines) description of what the function does. ~~

Usage

cvkreg2d(h, pts, y, w = rep(1, length(y)))

Arguments

h ~~Describe h here~~
pts ~~Describe pts here~~
y ~~Describe y here~~
w ~~Describe w here~~

Details

~~ If necessary, more details than the description above ~~

Value

~Describe the value returned If it is a LIST, use

comp1 Description of 'comp1'
comp2 Description of 'comp2'

...

Warning

....

Note

~~further notes~~

~Make other sections like Warning with section{Warning }{....} ~

Author(s)

~~who you are~~

References

~put references to the literature/web site here ~

See Also

~~objects to See Also as help, ~~~

Examples

##---- 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
  }

[Package spgam version 1.0 Index]