This function computes a block covariance matrix for a bivariate spatial model with age-structured parameters.
compute_cov(
gamma,
sigma2,
phi,
u_dist,
n_x,
tau2_1 = 1,
tau2_2 = 1,
age_param_data
)
A sparse symmetric matrix of dimension 2n_x × 2n_x
Correlation parameter between the two spatial processes
Variance parameter for the spatial processes
Range parameter for the spatial correlation
Distance matrix between locations
Number of spatial locations
Variance parameter for first process (default = 1)
Variance parameter for second process (default = 1)
List containing age-structured parameters:
b1: Vector of age parameters for first process
b2: Vector of age parameters for second process
c: Vector of cross-process age parameters