makebugsGroup function

Make BUGS model from fitted DAG with grouping