model_pres_cov: Model-Preserving co-variation

View source: R/model_pres_cov.R

model_pres_covR Documentation

Model-Preserving co-variation

Description

Model-preserving co-variation for objects of class CI.

Usage

model_pres_cov(ci, type, entry, delta)

Arguments

ci

object of class CI.

type

character string. Type of model-preserving co-variation: either "total", "partial", row or column.

entry

a vector of length two specifying the entry of the covariance matrix to vary.

delta

multiplicative variation coefficient for the entry of the covariance matrix given in entry.

Details

Let the original Bayesian network have a Normal distribution \mathcal{N}(\mu,\Sigma) and let entry be equal to (i,j). For a multiplicative variation of the covariance matrix by an amount \delta, a variation matrix \Delta is constructed as

\Delta_{k,l}=\left\{ \begin{array}{ll} \delta & \mbox{if } k=i, l=j\\ \delta & \mbox{if } l=i, k=j \\ 0 & \mbox{otherwise} \end{array} \right.

A co-variation matrix \tilde\Delta is then constructed and the resulting distribution after the variation is \mathcal{N}(\mu,\tilde\Delta\circ\Delta\circ\Sigma), assuming \tilde\Delta\circ\Delta\circ\Sigma is positive semi-definite and where \circ denotes the Schur (or element-wise) product. The matrix \tilde\Delta is so constructed to ensure that all conditional independence in the original Bayesian networks are retained after the parameter variation.

Value

If the resulting covariance is positive semi-definite, model_pres_cov returns an object of class CI with an updated covariance matrix. Otherwise it returns an object of class npsd.ci, which has the same components of CI but also has a warning entry specifying that the covariance matrix is not positive semi-definite.

References

C. Görgen & M. Leonelli (2020), Model-preserving sensitivity analysis for families of Gaussian distributions. Journal of Machine Learning Research, 21: 1-32.

See Also

covariance_var, covariation_matrix

Examples

model_pres_cov(synthetic_ci,"partial",c(1,3),1.1)
model_pres_cov(synthetic_ci,"partial",c(1,3),0.9)
model_pres_cov(synthetic_ci,"total",c(1,2),0.5)
model_pres_cov(synthetic_ci,"row",c(1,3),0.98)
model_pres_cov(synthetic_ci,"column",c(1,3),0.98)



bnmonitor documentation built on June 7, 2023, 5:19 p.m.