R/get_initial_extra.R

Defines functions get_initial_extra

#' Get initial values for the extra parameter (in four parameter geostatistical models)
#'
#' @param spcov_type The spatial covariance type
#'
#' @return An extra initial value
#'
#' @noRd
get_initial_extra <- function(spcov_type) {
  if (spcov_type == "matern") {
    initial_extra <- 2
  } else if (spcov_type == "cauchy") {
    initial_extra <- 1
  } else if (spcov_type == "pexponential") {
    initial_extra <- 0.8
  } else {
    initial_extra <- NULL # so it can be run with 3 parameter models without a logical statement
  }
  initial_extra
}

Try the spmodel package in your browser

Any scripts or data that you put into this service are public.

spmodel documentation built on April 4, 2025, 1:39 a.m.