DBNscore: Calculating the BGe/BDe score of a single DBN
Description
This function calculates the score of a DBN defined by its compact adjacency matrix.
Acceptable data matrices are homogeneous with all variables of the same type: continuous,
binary or categorical. The BGe score is evaluated in the case of continuous data and the BDe score is evaluated for binary and categorical variables.
Usage
DBNscore(scorepar, incidence)
Value
the log of the BGe or BDe score of the DBN
Arguments
scorepar
an object of class scoreparameters, containing the data and scoring parameters; see constructor function scoreparameters
incidence
a square matrix, representing initial and transitional structure of a DBN; the size of matrix is 2*nsmall+bgn, where nsmall is the number of variables per time slice excluding static nodes and bgn is the number of static variables
the matrix entries are in {0,1} such that incidence[i,j] equals
1 if there is a directed edge from node i to node j in the DAG and
incidence[i,j] equals 0 otherwise