new; cls; PROC bosec; local tm; tm=time; RETP(tm[1]*3600+tm[2]*60+tm[3]+tm[4]/100); ENDP; PROC(2)=probs(g,b,al); local p0,p1,d1,d2,d3,c1g1,c1g0,pr2,pr3 ,ct11,ct10,ct01,ct00,t,it,c2,c3,nseq,jj,c4,pr4,d4; nseq=16; t=4; p0=zeros(nseq,rows(al)); p1=p0; ct11=zeros(rows(al),t); ct10=ct11; ct01=ct11; ct00=ct11; it=1; do while it.le t; ct11[.,it]=cdfn(g+b[it]+al); ct01[.,it]=cdfn(b[it]+al); it=it+1; endo; ct10=1-ct11; ct00=1-ct01; jj=1; for d1 (0,1,1); /* prob of observed in first period condition on 0th period */ c1g1=(ct11[.,1]*d1+ct10[.,1]*(1-d1)); c1g0=(ct01[.,1]*d1+ct00[.,1]*(1-d1)); /* prob next period condition on observed this period */ pr2= ct11[.,2]*d1+ct01[.,2]*(1-d1); for d2 (0,1,1); c2=pr2*d2+(1-pr2)*(1-d2); pr3= ct11[.,3]*d2+ct01[.,3]*(1-d2); for d3 (0,1,1); c3=pr3*d3+(1-pr3)*(1-d3); pr4= ct11[.,4]*d3+ct01[.,4]*(1-d3); for d4 (0,1,1); c4=pr4*d4+(1-pr4)*(1-d4); p1[jj,.]=(c1g1 .*c2 .* c3.*c4)' ; p0[jj,.]=(c1g0 .*c2 .* c3.*c4)' ; jj=jj+1; endfor; endfor; endfor; endfor; RETP(p1,p0); ENDP; dlibrary c:\research\forgau95\sim_new\release\sim_new.dll; library pgraph; graphset; begwind; window(3,3,0); setwind(1); _pltype=6; _plwidth=2; _pcolor=1; ga=0.25; b_tru=0.1; #include c:\research\tamer-replicate\frhome\ttr4hlp.prg; #include c:\research\tamer-replicate\frhome\ttr4pl.prg; nextwind; res_ttr4a=res; save res_ttr4a; ga=0.5; b_tru=0.1; #include c:\research\tamer-replicate\frhome\ttr4hlp.prg; #include c:\research\tamer-replicate\frhome\ttr4pl.prg; nextwind; res_ttr4b=res; save res_ttr4b; ga=1; b_tru=0.1; #include c:\research\tamer-replicate\frhome\ttr4hlp.prg; #include c:\research\tamer-replicate\frhome\ttr4pl.prg; nextwind; res_ttr4c=res; save res_ttr4c; ga=0.25; b_tru=0.2; #include c:\research\tamer-replicate\frhome\ttr4hlp.prg; #include c:\research\tamer-replicate\frhome\ttr4pl.prg; nextwind; res_ttr4d=res; save res_ttr4d; ga=0.5; b_tru=0.2; #include c:\research\tamer-replicate\frhome\ttr4hlp.prg; #include c:\research\tamer-replicate\frhome\ttr4pl.prg; nextwind; res_ttr4e=res; save res_ttr4e; ga=1; b_tru=0.2; #include c:\research\tamer-replicate\frhome\ttr4hlp.prg; #include c:\research\tamer-replicate\frhome\ttr4pl.prg; nextwind; res_ttr4f=res; save res_ttr4f; ga=0.25; b_tru=0.3; #include c:\research\tamer-replicate\frhome\ttr4hlp.prg; #include c:\research\tamer-replicate\frhome\ttr4pl.prg; nextwind; res_ttr4g=res; save res_ttr4g; ga=0.5; b_tru=0.3; #include c:\research\tamer-replicate\frhome\ttr4hlp.prg; #include c:\research\tamer-replicate\frhome\ttr4pl.prg; nextwind; res_ttr4h=res; save res_ttr4h; ga=1; b_tru=0.3; #include c:\research\tamer-replicate\frhome\ttr4hlp.prg; #include c:\research\tamer-replicate\frhome\ttr4pl.prg; endwind; res_ttr4i=res; save res_ttr4i;