program define sampling_ols version 7.0 if "`1'"=="?" { use data, clear global S_1 "ahat bhat" exit } gen y=1+2*x+(10*invnorm(uniform())) reg y x post `1' (_b[_cons]) (_b[x]) drop y end