sensi.tbn: Compute a tbn Sensitivity to coefficients modification

Description Usage Arguments Value Examples

Description

Computes the sensitity of a Tweedie Bayesian network induced by a modification of the coefficient matrix. This sensistivity relies on the Kulback-Liebler divergence between the joint probability distributions induced by the original and the modified Tweedie bayesian networks.

Usage

1
sensi.tbn(beta, phi, p, db, X)

Arguments

beta

a lower triangular matrix of the Tweedie Bayesian network coefficients.

phi

a vector of dispersion parameters.

p

a vector of power parameters.

db

an upper-triangular matrix of coefficients modification.

X

a data frame containing the variables of the model.

Value

This function returns a double corresponding to the Tweedie Bayesian network sensitivity.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
beta = matrix(0,ncol=5,nrow=5)
beta[1,1] = 1;
beta[2,1] = 0.5
beta[3,1] = -0.5; beta[3,2] = -0.7;beta[3,3] = -1.2
beta[4,1] = -2; beta[4,3] = -1
beta[5,1] = 0.2; beta[5,4] = 1; beta[5,5] = -2
db = matrix(0,ncol=5,nrow=5)
db[2,2] = 0.1 # adding an arc from X1 to X2.
sensi.tbn(beta, c(1,2,1.5,1,1), c(2,2,3,2,0), db, X)

## End(Not run)

km20/tbn documentation built on May 29, 2019, 11:44 a.m.