makebugs function

Make BUGS model from fitted DAG