Compute the precision matrix for multivariate model

precision_matrix_multivariate(
  p,
  operator_list,
  rho,
  theta = NULL,
  Q = NULL,
  scale = NULL
)

Arguments

p

dimension, should be integer and greater than 1

operator_list

a list of ngme_operator object (length should be p)

rho

vector with the p(p-1)/2 correlation parameters rho_11, rho_21, rho_22, ... rho_p1, rho_p2, ... rho_p(p-1)

theta

parameter for Q matrix (length of 1 when p=2, length of 3 when p=3)

Q

orthogonal matrix of dim p*p (provide when p > 3)

scale

A vector of length p with constants to multiply each operator matrix with

Value

the precision matrix of the multivariate model

Details

The general model is defined as $D diag(L_1, ..., L_p) x = M$. D is the dependence matrix, it is paramterized by $D = Q(theta) * D_l(cor_mat)$, where $Q$ is the orthogonal matrix, and $D_l$ is matrix controls the cross-correlation. See the section 2.2 of Bolin and Wallin (2020) for exact parameterization of Dependence matrix.

References

Bolin, D. and Wallin, J. (2020), Multivariate type G Matérn stochastic partial differential equation random fields. J. R. Stat. Soc. B, 82: 215-239. https://doi.org/10.1111/rssb.12351

Examples

rho <- c(-0.5, 0.5,-0.25) #correlation parameters
operator_list <- list(ar1(1:5, rho=0.4), ar1(1:5, rho=0.5), ar1(1:5, rho=0.6))
precision_matrix_multivariate(3, operator_list, rho, theta=c(1,2,3))
#> 15 x 15 sparse Matrix of class "dgCMatrix"
#>                                                                        
#>  [1,]  1.3906250 -0.5562500  .          .          .          0.4513514
#>  [2,] -0.5562500  1.6131250 -0.5562500  .          .         -0.2271007
#>  [3,]  .         -0.5562500  1.6131250 -0.5562500  .          .        
#>  [4,]  .          .         -0.5562500  1.6131250 -0.5562500  .        
#>  [5,]  .          .          .         -0.5562500  1.3906250  .        
#>  [6,]  0.4513514 -0.2271007  .          .          .          1.3281250
#>  [7,] -0.1816805  0.5450416 -0.2271007  .          .         -0.6640625
#>  [8,]  .         -0.1816805  0.5450416 -0.2271007  .          .        
#>  [9,]  .          .         -0.1816805  0.5450416 -0.2271007  .        
#> [10,]  .          .          .         -0.1816805  0.4542013  .        
#> [11,] -0.4181080  0.2577699  .          .          .          0.3179182
#> [12,]  0.1718466 -0.5327244  0.2577699  .          .         -0.1601086
#> [13,]  .          0.1718466 -0.5327244  0.2577699  .          .        
#> [14,]  .          .          0.1718466 -0.5327244  0.2577699  .        
#> [15,]  .          .          .          0.1718466 -0.4296165  .        
#>                                                                        
#>  [1,] -0.1816805  .          .          .         -0.4181080  0.1718466
#>  [2,]  0.5450416 -0.1816805  .          .          0.2577699 -0.5327244
#>  [3,] -0.2271007  0.5450416 -0.1816805  .          .          0.2577699
#>  [4,]  .         -0.2271007  0.5450416 -0.1816805  .          .        
#>  [5,]  .          .         -0.2271007  0.4542013  .          .        
#>  [6,] -0.6640625  .          .          .          0.3179182 -0.1601086
#>  [7,]  1.6601563 -0.6640625  .          .         -0.1921303  0.4162824
#>  [8,] -0.6640625  1.6601563 -0.6640625  .          .         -0.1921303
#>  [9,]  .         -0.6640625  1.6601563 -0.6640625  .          .        
#> [10,]  .          .         -0.6640625  1.3281250  .          .        
#> [11,] -0.1921303  .          .          .          1.3125000 -0.7875000
#> [12,]  0.4162824 -0.1921303  .          .         -0.7875000  1.7850000
#> [13,] -0.1601086  0.4162824 -0.1921303  .          .         -0.7875000
#> [14,]  .         -0.1601086  0.4162824 -0.1921303  .          .        
#> [15,]  .          .         -0.1601086  0.3202172  .          .        
#>                                       
#>  [1,]  .          .          .        
#>  [2,]  0.1718466  .          .        
#>  [3,] -0.5327244  0.1718466  .        
#>  [4,]  0.2577699 -0.5327244  0.1718466
#>  [5,]  .          0.2577699 -0.4296165
#>  [6,]  .          .          .        
#>  [7,] -0.1601086  .          .        
#>  [8,]  0.4162824 -0.1601086  .        
#>  [9,] -0.1921303  0.4162824 -0.1601086
#> [10,]  .         -0.1921303  0.3202172
#> [11,]  .          .          .        
#> [12,] -0.7875000  .          .        
#> [13,]  1.7850000 -0.7875000  .        
#> [14,] -0.7875000  1.7850000 -0.7875000
#> [15,]  .         -0.7875000  1.3125000