prefitCV: Covariance parameter estimation for cross-validation

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/qsOpt.R

Description

The function constructs a list of covariance models of statistics in order to estimate the prediction error variances by a cross-validation (CV) approach at unsampled points.

Usage

1
2
prefitCV(qsd, reduce = TRUE, type = c("cv", "max"), control = list(),
  cl = NULL, verbose = FALSE)

Arguments

qsd

object of class QLmodel

reduce

if TRUE (default), reduce the number of covariance models to refit

type

type of prediction variances, "cv" (default), see qle

control

control arguments for REML estimation passed to nloptr

cl

cluster object, NULL (default), of class "MPIcluster", "SOCKcluster", "cluster"

verbose

if TRUE, print intermediate output

Details

Using the CV-based approach (see vignette) for estimating the prediction variances might require a refit of covariance parameters of each statistic based on leaving out a certain number of sample points. The covariance models can be refitted if 'fit' equals TRUE and otherwise are simply updated without fitting which saves some computational resources. The number of points left out is dynamically adjusted depending on the number of sample points in order to prevent the main estimation algorithm to fit as many models as there are points already evaluated.

For CV the number n_c of covariance models still to fit, that is, the number of partitioning sets of sample points, is limited by n_c≤q n, with maximum k sampling points deleted from the full sample set with overall n sample points such that n=n_c k (see vignette for further details).

Value

A list of certain length depending on the current sample size (number of evaluated points). Each list element corresponds to a (reduced) number of sample points with at most k points (see details) left out for fitting the covariance models.

Author(s)

M. Baaske

See Also

QLmodel

Examples

1
2
3
4
5
6
  data(normal)
  
  # without re-estimation of covariance parameters, default is TRUE
  qsd$cv.fit <- FALSE  
  cvm <- prefitCV(qsd)
  

mbaaske/qle documentation built on Feb. 3, 2018, 11:02 a.m.