Skip to contents

Independence Metropolis-Hastings update coherent with the stationary AR(1) initial condition used by the dynamic UV kernels. The proposal is the conjugate Normal implied by the transitions and the Normal(prior_mean, prior_sd^2) prior, drawn truncated to (-0.99, 0.99) via the inverse CDF; the acceptance ratio supplies the t = 1 stationary factor proportional to (1 - rho^2)^(nR / 2) * exp(-(1 - rho^2) * S1 / (2 * sigma^2)) that the Gaussian proposal omits. Defaults (prior_mean = 0, prior_sd = 1) preserve the historical behaviour; lame::lame() passes the user-set prior$rho_uv_mean / prior$rho_uv_sd explicitly.

Usage

sample_rho_uv(
  U_cube,
  V_cube,
  sigma_uv,
  rho_current,
  symmetric,
  prior_mean = 0,
  prior_sd = 1
)

Arguments

U_cube

3D array of U positions (n x R x T)

V_cube

3D array of V positions (n x R x T)

sigma_uv

Innovation standard deviation

rho_current

Current value of rho

symmetric

Whether network is symmetric

prior_mean

Prior mean for rho (default 0)

prior_sd

Prior SD for rho (default 1)

Value

Updated rho value