Usage
# first and second moments' estimation
bn.moments(data, R = 200, m = nrow(data), algorithm,
algorithm.args = list(), reduce = NULL, debug = FALSE)
# descriptive statistics
bn.var(x, method)
# Monte Carlo test for entropy
bn.var.test(x, method, R, B, debug = FALSE)
Arguments
data
a data frame containing the variables in the model.
R
a positive integer, the number of bootstrap replicates (in
bn.moments
) or the number of Monte Carlo samples (in
bn.var.test
).
m, B
a positive integer, the size of each bootstrap (in
bn.moments
) or Monte Carlo (in bn.var.test
) replicate.
algorithm
a character string, the learning algorithm to be
applied to the bootstrap replicates. Possible values are gs
,
iamb
, fast.iamb
, inter.iamb
, mmpc
,
hc
, tabu
algorithm.args
a list of extra arguments to be passed to
the learning algorithm.
x
a covariance matrix or an object of class mvber.moments
(the return value of the bn.moments
function).
method
a character string, the label of the statistic used
in bn.var
or bn.var.test
. Possible values are
tvar
(total variance), gvar
(generalized
variance
), nvar
(
reduce
a character string, either first
or second
.
If first
all the arcs with first moment equal to zero are
dropped; if if second
all the arcs with zero variance
are dropped.
debug
a boolean value. If TRUE
a lot of debugging output
is printed; otherwise the function is completely silent.