simulate_data_exact: Simulate Geospatial data (x, y, z)

View source: R/simulate_data.R

simulate_data_exactR Documentation

Simulate Geospatial data (x, y, z)

Description

Simulate Geospatial data (x, y, z)

Usage

simulate_data_exact(
  kernel = c("ugsm-s", "ugsmn-s", "bgsfm-s", "bgspm-s", "tgspm-s", "ugsm-st", "bgsm-st"),
  theta,
  dmetric = c("euclidean", "great_circle"),
  n,
  seed = 0
)

Arguments

dmetric

A string - distance metric - "euclidean" or "great_circle"

n

A number - data size

seed

A number - seed of random generation

kernel:

string - kernel ("ugsm-s", "ugsmn-s", "bgsfm-s", "bgspm-s", "tgspm-s", "ugsm-st", "bgsm-st")

theta:

list of n parameters (estimated theta)

Value

a list of of three vectors (x, y, z)

Examples

seed <- 0 ## Initial seed to generate XY locs.
kernel <- "ugsm-s"
theta <- c(1, 0.1, 0.5)                                     #Params vector.
dmetric <- "euclidean" ## "euclidean" or "great_circle" distance.
n <- 1600 ## The number of locations (n must be a square number, n=m^2).
exageostat_init(hardware = list(ncores = 2, ngpus = 0, ts = 320, lts = 0, pgrid = 1, qgrid = 1)) ## Initiate exageostat instance
data <- simulate_data_exact(kernel, theta, dmetric, n, seed) ## Generate Z observation vector
data
exageostat_finalize() ## Finalize exageostat instance

ecrc/exageostatR documentation built on June 9, 2025, 9:06 p.m.