added code for generating model-based data

added code for generating mediators and outcomes from models. Added code
for tracking the intercept in the outcome model (d2)