50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

tinyVAST (version 1.0.1)

simulate_sfnetwork: Simulate GMRF for stream network

Description

Simulate values from a GMRF using a tail-up exponential model on a stream network

Usage

simulate_sfnetwork(sfnetwork_mesh, theta, n = 1, what = c("samples", "Q"))

Value

a matrix of simulated values for a Gaussian Markov random field arising from a stream-network spatial domain, with row for each spatial random effect and n columns, using the sparse precision matrix defined in Charsley et al. (2023)

Arguments

sfnetwork_mesh

Output from sfnetwork_mesh

theta

Decorrelation rate

n

number of simulated GMRFs

what

Whether to return the simulated GMRF or its precision matrix

References

Charsley, A. R., Gruss, A., Thorson, J. T., Rudd, M. B., Crow, S. K., David, B., Williams, E. K., & Hoyle, S. D. (2023). Catchment-scale stream network spatio-temporal models, applied to the freshwater stages of a diadromous fish species, longfin eel (Anguilla dieffenbachii). Fisheries Research, 259, 106583. tools:::Rd_expr_doi("10.1016/j.fishres.2022.106583")