SVC_mle_control: Set Parameters for 'SVC_mle'

View source: R/SVC_mle.R

SVC_mle_controlR Documentation

Set Parameters for SVC_mle


Function to set up control parameters for SVC_mle. In the following, we assume the GP-based SVC model to have q GPs which model the SVCs and p fixed effects.



## Default S3 method:
SVC_mle_control( = c("exp", "sph", "mat32", "mat52", "wend1", "wend2"),
  tapering = NULL,
  parallel = NULL,
  init = NULL,
  lower = NULL,
  upper = NULL,
  save.fitted = TRUE,
  profileLik = FALSE,
  mean.est = c("GLS", "OLS"),
  pc.prior = NULL,
  extract_fun = FALSE,
  hessian = TRUE,
  dist = list(method = "euclidean"),
  parscale = TRUE,

## S3 method for class 'SVC_mle'
SVC_mle_control(object, ...)



Further Arguments yet to be implemented

Name of the covariance function of the GPs. Currently, the following are implemented: "exp" for the exponential, "sph" for spherical, "mat32" and "mat52" for Matern class covariance functions with smoothness 3/2 or 5/2, as well as "wend1" and "wend2" for Wendland class covariance functions with kappa 1 or 2.


(NULL or numeric(1))
If NULL, no tapering is applied. If a scalar is given, covariance tapering with this taper range is applied, for all Gaussian processes modeling the SVC. Only defined for Matern class covariance functions, i.e., set either to "exp", "mat32", or "mat52".


(NULL or list)
If NULL, no parallelization is applied. If cluster has been established, define arguments for parallelization with a list, see documentation of optimParallel. See Examples.


(NULL or numeric(2q+1+p*as.numeric(profileLik)))
Initial values for optimization procedure. If NULL is given, an initial vector is calculated (see Details). Otherwise, the vector is assumed to consist of q-times (alternating) range and variance, the nugget variance and if profileLik = TRUE p mean effects.


(NULL or numeric(2q+1+p*as.numeric(profileLik)))
Lower bound for init in optim. Default NULL calculates the lower bounds (see Details).


(NULL or numeric(2q+1+p*as.numeric(profileLik)))
Upper bound for init in optim. Default NULL calculates the upper bounds (see Details).


If TRUE, calculates the fitted values and residuals after MLE and stores them. This is necessary to call residuals and fitted methods afterwards.


If TRUE, MLE is done over profile Likelihood of covariance parameters.


If profileLik = TRUE, the means have to be estimated seperately for each step. "GLS" uses the generalized least square estimate while "OLS" uses the ordinary least squares estimate.


(NULL or numeric(4))
If numeric vector is given, penalized complexity priors are applied. The order is ρ_0, α_ρ, σ_0, α_σ to give some prior believes for the range and the standard deviation of GPs, such that P(ρ < ρ_0) = α_ρ, P(σ > σ_0) = α_σ. This regulates the optimization process. Currently, only supported for GPs with of Matérn class covariance functions. Based on the idea by Fulgstad et al. (2018) doi: 10.1080/01621459.2017.1415907.


If TRUE, the function call of SVC_mle stops before the MLE and gives back the objective function of the MLE as well as all used arguments. If FALSE, regular MLE is conducted.


If TRUE, Hessian matrix is computed, see optim. This required to give the standard errors for covariance parameters and to do a Wald test on the variances, see summary.SVC_mle.


List containing the arguments of dist or nearest.dist. This controls the method of how the distances and therefore dependency structures are calculated. The default gives Euclidean distances in a d-dimensional space. Further editable arguments are p, miles, R, see respective help files of dist or nearest.dist.


Triggers parameter scaling within the optimization in optim. If TRUE, the optional parameter scaling in optim.control in function SVC_mle is overwritten by the initial value used in the numeric optimization. The initial value is either computed from the data or provided by the user, see init argument above or Details below. Note that we check whether the initial values are unequal to zero. If they are zero, the corresponding scaling factor is 0.001. If FALSE, the parscale argument in optim.control is let unchanged.


The function then extracts the control settings from the function call used to compute in the given SVC_mle object.


If not provided, the initial values as well as the lower and upper bounds are calculated given the provided data. In particular, we require the median distance between observations, the variance of the response and, the ordinary least square (OLS) estimates, see init_bounds_optim.

The argument extract_fun is useful, when one wants to modify the objective function. Further, when trying to parallelize the optimization, it is useful to check whether a single evaluation of the objective function takes longer than 0.05 seconds to evaluate, cf. Gerber and Furrer (2019) doi: 10.32614/RJ-2019-030. Platform specific issues can be sorted out by the user by setting up their own optimization.


A list with which SVC_mle can be controlled.


Jakob Dambon

See Also



control <- SVC_mle_control(init = rep(0.3, 10))
# or
control <- SVC_mle_control()
control$init <- rep(0.3, 10)

# Code for setting up parallel computing
# exchange number of nodes (1) for detectCores()-1 or appropriate number
cl <- makeCluster(1, setup_strategy = "sequential")
  cl = cl,
# use this list for parallel argument in SVC_mle_control
parallel.control <- list(cl = cl, forward = TRUE, loginfo = TRUE)
# SVC_mle goes here ...
stopCluster(cl); rm(cl)

varycoef documentation built on Sept. 18, 2022, 1:07 a.m.