changed jags_implementation.r for Mac
adding updated code for figs and tables