estimate_anisotropy: Estimate 2D variogram anisotropy parameters for kriging using...

View source: R/estimate_anisotropy.R

estimate_anisotropyR Documentation

Estimate 2D variogram anisotropy parameters for kriging using 10-fold cross-validation

Description

Uses the coldpool::kriging_loocv() interface.

Usage

estimate_anisotropy(
  x,
  kriging_formula = variable_name ~ 1,
  folds = 10,
  variogram_model,
  starting_values = NULL,
  vgm_width = NULL,
  nm = Inf,
  seed = 19673
)

Arguments

x

A data.frame containing variables to be interpolated and latitude and longitude coordinates.

kriging_formula

Formula to use for kriging. Default (kriging_formula = variable_name ~ 1) is ordinary kriging without covariates. Formula for the gstat interface (see ?gstat::gstat). Covariate example: kriging_formula = variable_name ~ BOTTOM_DEPTH

folds

1L numeric vector indicating how many folds to use for cross-validation.

variogram_model

Character vector indicating which variogram model to use for interpolation. Valid options are exponential (exp), circular (cir), gaussian (gau), Bessel (bes), Matern (mat), or Stein's Matern (ste).

starting_values

Optional. Starting value of anisotropy parameters to use for optimization. See: ?gstat::vgm.

vgm_width

Optional. Width of variogram breaks.

nm

Maximum number of nearest neighbor observations to use for interpolation.

seed

RNG seed (set.seed(seed)) to use for anisotropy estimation based on cross-validation.

variable_name

1L character vector indicating which varible to interpolate (e.g. 'TEMPERATURE')

latitude_name

1L character vector indicating the name of the latitude column (e.g., 'LATITUDE')

longitude_name

1L character vector indicating the name of the longitude column (e.g., 'LONGITUDE')

input_crs

Character vector indicating the coordinate reference system for x (default = "WGS84")

interpolation_crs

Coordinate reference system to use for interpolation.

only_return_anisotropy

For internal use. Default = FALSE


afsc-gap-products/coldpool documentation built on Feb. 25, 2024, 9:44 p.m.