BNET Procedure

Example 5.4 Markov Blanket

This example uses the HMEQ sample data set that is available in the Sampsio library to learn a Markov blanket Bayesian network, which is specified by STRUCTURE=MB:

data mylib.hmeq;
   set sampsio.hmeq;
run;
 proc bnet data=mylib.hmeq indeptest=MI mialpha=0.2 structure=MB nbin=5
         missingint=IMPUTE missingnom=LEVEL
         outnetwork=mylib.network;
     target Bad;
     input Reason Job Delinq Derog Ninq/level=nominal;
     input Loan Mortdue Value Yoj Clage Clno Debtinc/level=interval;
 run;

The following statements produce Output 5.4.1, which shows the network structure. In the structure, Bad is a parent of Delinq and Derog, Delinq and Ninq are the other parents of Derog, and Ninq is the other parent of Delinq.

 proc print data=mylib.network noobs label;
     var _parentnode_ _childnode_;
     where _type_="STRUCTURE";
 run;

Output 5.4.1: Markov Blanket Network Structure

Parent NodeChild Node
BADDELINQ
NINQDELINQ
BADDEROG
DELINQDEROG
NINQDEROG


Last updated: August 06, 2026