Simulate age-year-space covariance
These functions return a function to use inside sim_distribution
.
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 )
sd
: Variance (can be age specific).range
: Decorrelation rangelambda
: Controls the degree of smoothness of Matern covariance processmodel
: String indicating either "exponential" or "matern" as the correlation functionphi_age
: Defines autocorrelation through ages. Can be one value or a vector of the same length as agesphi_year
: Defines autocorrelation through years. Can be one value or a vector of the same length as yearsgroup_ages
: Make space-age-year noise equal across these agesgroup_years
: Make space-age-year noise equal across these yearsReturns a function for use inside sim_distribution
.