Yf_BC_conditionals: Conditional for Yf

Description Usage Arguments Examples

Description

Returns the conditional distribution and its derivative of the flux field given the flux field parameters and the mole-fraction observations

Usage

1
2
Yf_BC_conditionals(Z, Zinv, C_m, Qobs, B, X, Q_zeta, S_f_trans, lambda = 0,
  lambda_fix = NA, Pericchi = TRUE, ind = 1:nrow(S_f_trans))

Arguments

Z

matrix of mole fraction observations (of size m x 1)

C_m

observation incidence matrix (of size m x n_m)

Qobs

observation precision matrix (of size m x m)

B

source-receptor relationship matrix (of size n_m x n_f)

X

covariates matrix (of size n_f x p)

Q_zeta

precision matrix of discrepancy field (of size n_m x n_m). Should be sparse

S_f_trans

covariance matrix of flux field in transformed (Gaussian) space (of size n_f x n_f)

lambda

Box-Cox transformation parameter

ind

vector of indices on which to consider the flux (some unidentifiable grid cells may be omitted)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
n_f <- 20
n_m <- m_obs <- 100
cond_fns <- Yf_BC_conditionals(Z = 200 + matrix(rnorm(n_m,sd=100),n_m,1),
                               C_m = .symDiagonal(n_m),
                               Qobs = Diagonal(n_m),
                               B = matrix(rnorm(n_m*n_f),n_m,n_f),
                               X = matrix(rep(1,n_f)),
                               Q_zeta = n_m*Diagonal(n_m),
                               S_f_trans = Diagonal(n_f),
                               lambda = 0.1
                             )
Yf <- matrix(rpois(n_f,20),n_f,1)                              
cond_fns$logf(Yf)
cond_fns$gr_logf(Yf)

andrewzm/atminv documentation built on May 10, 2019, 11:14 a.m.