sim_ays_covar: Simulate age-year-space covariance

View source: R/sim_dist.R

sim_ays_covarR Documentation

Simulate age-year-space covariance

Description

These functions return a function to use inside sim_distribution.

Usage

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
)

Arguments

sd

Variance (can be age specific).

range

Decorrelation range

lambda

Controls the degree of smoothness of Matern covariance process

model

String indicating either "exponential" or "matern" as the correlation function

phi_age

Defines autocorrelation through ages. Can be one value or a vector of the same length as ages

phi_year

Defines autocorrelation through years. Can be one value or a vector of the same length as years

group_ages

Make space-age-year noise equal across these ages

group_years

Make space-age-year noise equal across these years

Value

Returns a function for use inside sim_distribution.


PaulRegular/surveyTestr documentation built on Sept. 21, 2023, 7:44 p.m.