Skip to contents

Sample stationary trajectories from light likelihood maps and calibrated movement components.

Usage

sampling_path(
  tag,
  iter,
  likelihood = "map_light",
  movement = list(method = "gamma", shape = 1.412246, scale = 8.909248, low_speed_fix =
    0.001, zero_speed_ratio = 0, move_stay_parameters = list(p_0 = 0.647893, p_inf =
    0.1318134, tau = 0.8624705), move_stay = function(t) {
     0.1318134 + (0.647893 -
    0.1318134) * exp(-t/0.8624705)
 }),
  component_weights = c(light = 1, movement = 1, route = 1),
  route_detour = 1,
  long_period_light_only = TRUE,
  chains = 1,
  warmup = floor(iter/4),
  thin = 1,
  block_interval = 2,
  thr_likelihood = 0.99,
  thr_gs = 2000/24,
  refresh = 10,
  workers = 1,
  seed = NULL,
  quiet = FALSE
)

Arguments

tag

GeoPressureR tag object containing likelihood maps.

iter

number of Gibbs iterations.

likelihood

tag field containing the light likelihood map.

movement

movement model containing a speed kernel and stay/move probabilities.

component_weights

named non-negative weights for the light, movement, and route components.

route_detour

non-negative multiplier of the empirical excess route distance; 1 retains the calibrated default.

long_period_light_only

whether unknown long periods are drawn from their light likelihood without movement updates.

chains

number of independent chains.

warmup

number of initial iterations to discard.

thin

interval between saved samples.

block_interval

interval between block updates; use 0 to disable them.

thr_likelihood

retained light-likelihood percentile.

thr_gs

maximum movement speed in km/h used for hard support.

refresh

progress update interval in iterations.

workers

number of parallel workers for independent chains.

seed

optional random seed.

quiet

whether to suppress progress messages.

Value

A data.frame with columns j, chain, stap_id, ind, lat, and lon. The result carries type = "sampling" and sampler settings in a sampling_parameters attribute.

See also

Examples

if (FALSE) { # \dontrun{
paths <- sampling_path(tag, iter = 1000, chains = 4, seed = 1)
} # }