rndseed 1013; outfile= "fakeda1"; vnames = { y id x1 x2 x3 x4 x5 x6 x7 }; create fout=^outfile with ^vnames,9,8; n=1000; beta=1|0|0|0|2|0|0; i=1; do while i<=n; a=rndn(1,1); no=int(rndu(1,1)*4+1); no=2; ii=zeros(no,1)+i; x=rndn(no,7); y=0+a+x*beta+rndn(no,1)*2; y=y.*(y.>0); call writer(fout,y~ii~x); i=i+1; endo; closeall;