The corpus copy only NAMES the Bayesian Information Criterion as a
gCastle GES scoring option (ch. 13, p. 348, citing Chickering 2003);
no BIC formula is printed there. The formula used here is the
standard Gaussian one, stated so nothing is attributed to the book
that the book does not say:
score(G) = sum_j [-n/2 (log(2 pi s2_j) + 1)] - (log n / 2) k.
Usage
morie_bicdag(data, dag, names = NULL)
Arguments
- data
numeric matrix, one row per observation
- dag
edge matrix or list(node = children)
- names
column names matching the DAG node labels
Value
list(score, loglik, k, penalty, n)
Examples
set.seed(1)
n <- 60
x <- rnorm(n)
y <- 0.8 * x + rnorm(n, 0, 0.5)
d <- cbind(x, y)
dag <- rbind(c("x", "y"))
r <- morie_bicdag(d, dag, names = c("x", "y"))
str(r, max.level = 1)
#> List of 5
#> $ score : num -123
#> $ loglik : num -113
#> $ k : int 5
#> $ penalty: num 10.2
#> $ n : int 60