Smoothing is based on prediction in a linear mixed model (“Kriging”) with non-zero residual variance. The correlation function for the random effect is the Matern function with argument the Euclidian distance between scaled coordinates (x/scale). The Matern function also has a smoothness parameter. These parameters are by default estimated by GCV. For large data sets (say >2000 rows), it is strongly recommended to select a subset of the data using GCVptnbr
, as GCV will otherwise be very slow.
calcGCV(sorted_data=data, data, CovFnParam = NULL, GCVptnbr = Inf,
topmode = FALSE, verbose = FALSE, cleanResu = "",
force=FALSE, decreasing=FALSE,
verbosity = blackbox.getOption("verbosity"),
optimizers = blackbox.getOption("optimizers"))
A list with the following elements
Scale parameters and smoothness parameter of the Matern correlation function
Ratio of residual variance over random effect variance
Estimate of root residual variance
and possibly other elements.
Global options CovFnParam
is modified as a side effect.
A data frame with both predictor and response variance, sorted and with attributes, as produced by prepareData
Obsolete, for Migraine back-compatibility, should not be used.
Optional fixed values of scale factors for each predictor variable. Smoothness should not be included in this argument.
Maximum number of rows selected for GCV.
Controls the way rows are selected. For development purposes, should not be modified
Whether to print some messages or not. Distinct from verbosity
Distinct from verbose
. See verbosity
in blackbox.options
A connection, or a character string naming a file for some nicely formated output. If ""
(the default), print to the standard output connection.
Boolean. Forces the analysis of data without pairs of response values for given parameter values.
A vector of) character strings, from which the optimization method is selected. Default is nloptr
with its own "NLOPT_LN_BOBYQA"
method. See the source of the function for other methods (the latter being subject to change with little notice).
Boolean. Use TRUE if you want the result to be used in function maximization rather than minimization.
Golub, G. H., Heath, M. and Wahba, G. (1979) Generalized Cross-Validation as a method for choosing a good ridge parameter. Technometrics 21: 215-223.
# see example on main doc page (?blackbox)
Run the code above in your browser using DataLab