Description Usage Arguments Value Author(s) Examples

View source: R/calc_prec_matrix.R

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

1 | ```
calc_prec_matrix(neighborhood_matrix, gamma)
``` |

`neighborhood_matrix` |
an n by n neighborhood matrix for n grid cells |

`gamma` |
a real valued parameter in covariance matrix W |

an n by n covariance matrix

Pulong Ma <[email protected]>

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.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.