/* This is a demo fo the gauss for windows version of PANTOB. You should read the documentation for the old version before using this. Below, I explain the changes. The data was created by: 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; */ /* ***************************************************************** */ /* START OF PROGRAM */ dlibrary c:\pan06\bolib1.dll; #include c:\pan06\optmum.prc; #include pantob2.f ; #include wrtpt.f; /* This reads in the two program files. They should be located in the directory in which you work */ __output=0; _ptloss=1; _ptbw=0.0; _ptmet=-3; b0=zeros(7,1); /* the allowed values for _ptmet are 0, -1, -2, -3 the rest is as before */ /* this procedure does the estimation */ {b1,v1,f1,infile,met,yname,iname,xnames,n}=pantob1("fakeda1",1,2,3|4|5|6|7|8|9,b0); /* relative to the old program, there is one more output variable: n (number of individulas) */ output file=demo2.out reset; /* this procedure writes out the results */ wrtpt(b1,v1,f1,"fakedat",_ptmet,yname,iname,xnames,n); output off;