These functions return a function to be used inside sim_distribution()
to simulate
spatially and temporally autocorrelated error.
sim_ays_covar(
sd = 2.8,
range = 300,
lambda = 1,
model = "matern",
phi_age = 0.5,
phi_year = 0.9,
group_ages = 5:20,
group_years = NULL
)
Variance (can be age-specific).
Decorrelation range.
Controls the degree of smoothness in the Matérn covariance process.
String indicating the correlation function to use: either "exponential"
or "matern"
.
Autocorrelation through ages. Can be a single value or a vector the same length as ages
.
Autocorrelation through years. Can be a single value or a vector the same length as years
.
A vector of ages to group together with shared space-age-year noise.
A vector of years to group together with shared space-age-year noise.
A function to be passed to sim_distribution()
as the ays_covar
argument.