Jeffreys.GBN
returns the Jeffreys divergence between an object of class GBN
and its update after a standard parameter variation.
Usage
# S3 method for GBN
Jeffreys(x, where, entry, delta, ...)
Arguments
- x
object of class
GBN
.- where
character string: either
mean
orcovariance
for variations of the mean vector and covariance matrix respectively.- entry
if
where == "mean"
,entry
is the index of the entry of the mean vector to vary. Ifwhere == "covariance"
, entry is a vector of length 2 indicating the entry of the covariance matrix to vary.- delta
numeric vector, including the variation parameters that act additively.
- ...
additional arguments for compatibility.
Value
A dataframe including in the first column the variations performed and in the second column the corresponding Jeffreys divergences.
Details
Computation of the Jeffreys divergence between a Bayesian network and the additively perturbed Bayesian network, where the perturbation is either to the mean vector or to the covariance matrix.
References
Goergen, C., & Leonelli, M. (2018). Model-preserving sensitivity analysis for families of Gaussian distributions. arXiv preprint arXiv:1809.10794.
Examples
Jeffreys(synthetic_gbn,"mean",2,seq(-1,1,0.1))
#> Variation Jeffreys
#> 1 -1.0 3.00
#> 2 -0.9 2.43
#> 3 -0.8 1.92
#> 4 -0.7 1.47
#> 5 -0.6 1.08
#> 6 -0.5 0.75
#> 7 -0.4 0.48
#> 8 -0.3 0.27
#> 9 -0.2 0.12
#> 10 -0.1 0.03
#> 11 0.0 0.00
#> 12 0.1 0.03
#> 13 0.2 0.12
#> 14 0.3 0.27
#> 15 0.4 0.48
#> 16 0.5 0.75
#> 17 0.6 1.08
#> 18 0.7 1.47
#> 19 0.8 1.92
#> 20 0.9 2.43
#> 21 1.0 3.00
Jeffreys(synthetic_gbn,"covariance",c(3,3),seq(-1,1,0.1))
#> Variation Jeffreys
#> 1 -1.0 NA
#> 2 -0.9 NA
#> 3 -0.8 NA
#> 4 -0.7 NA
#> 5 -0.6 NA
#> 6 -0.5 NA
#> 7 -0.4 NA
#> 8 -0.3 NA
#> 9 -0.2 NA
#> 10 -0.1 2.500000e-01
#> 11 0.0 -5.773160e-15
#> 12 0.1 8.333333e-02
#> 13 0.2 2.500000e-01
#> 14 0.3 4.500000e-01
#> 15 0.4 6.666667e-01
#> 16 0.5 8.928571e-01
#> 17 0.6 1.125000e+00
#> 18 0.7 1.361111e+00
#> 19 0.8 1.600000e+00
#> 20 0.9 1.840909e+00
#> 21 1.0 2.083333e+00