[R] NA/NaN values in bnlearn package R

Marco Scutari marco.scutari at gmail.com
Mon Jun 9 12:56:38 CEST 2014

Dear Alexsandro,

On 9 June 2014 02:27, Alexsandro Cândido de Oliveira Silva
<acos at dpi.inpe.br> wrote:
> So, how could I deal with the data and get the conditional probability
> distribution?

As of the current release (3.5), all functions in bnlearn require
complete data so that error message is expected. However, you can
estimate the CPTs from incomplete data using table() and prop.table()
and assemble them in a fitted BN with custom.fit(). On the other hand,
maybe it would be better to write an EM wrapper around bn.fit() to
make the best of the dependence structure of the data?


Marco Scutari, Ph.D.
Research Associate, Genetics Institute (UGI)
University College London (UCL), United Kingdom

More information about the R-help mailing list