calc_prec_matrix: Compute n by n covariance matrix W over n grid cells

Description Usage Arguments Value Author(s) Examples

View source: R/calc_prec_matrix.R

Description

This function computes the covariance matrix of the ensemble members for the measured variable, which is a fixed diagonal matrix with diagonal elements equal to the empirical variance of the corresponding ensemble memebers. Further work will allow W to be a more general matrix (e.g., based on a GMRF) with unknown parameters

Usage

1
calc_prec_matrix(neighborhood_matrix, gamma)

Arguments

neighborhood_matrix

an n by n neighborhood matrix for n grid cells

gamma

a real valued parameter in covariance matrix W

Value

an n by n covariance matrix

Author(s)

Pulong Ma <[email protected]>

Examples

1
2
3
4
5
n <- 30  # number of grid cells over the globe
neighborhood_matrix <- Matrix::sparseMatrix(1:n, 1:n, x=rep(1,n))
gamma <- 0.1
W <- calc_prec_matrix(neighborhood_matrix, gamma)
Matrix::image(W, xlab="", ylab="", cex=0.5, cex.lab=0.6)

mapn/DAbayes documentation built on May 21, 2017, 5:47 p.m.