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=8; t=3; 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); p1[jj,.]=(c1g1 .*c2 .* c3)' ; p0[jj,.]=(c1g0 .*c2 .* c3)' ; jj=jj+1; 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\ttr3hlp.prg; #include c:\research\tamer-replicate\frhome\ttr3pl.prg; nextwind; res_ttr3a=res; save res_ttr3a; ga=0.5; b_tru=0.1; #include c:\research\tamer-replicate\frhome\ttr3hlp.prg; #include c:\research\tamer-replicate\frhome\ttr3pl.prg; nextwind; res_ttr3b=res; save res_ttr3b; ga=1; b_tru=0.1; #include c:\research\tamer-replicate\frhome\ttr3hlp.prg; #include c:\research\tamer-replicate\frhome\ttr3pl.prg; nextwind; res_ttr3c=res; save res_ttr3c; ga=0.25; b_tru=0.2; #include c:\research\tamer-replicate\frhome\ttr3hlp.prg; #include c:\research\tamer-replicate\frhome\ttr3pl.prg; nextwind; res_ttr3d=res; save res_ttr3d; ga=0.5; b_tru=0.2; #include c:\research\tamer-replicate\frhome\ttr3hlp.prg; #include c:\research\tamer-replicate\frhome\ttr3pl.prg; nextwind; res_ttr3e=res; save res_ttr3e; ga=1; b_tru=0.2; #include c:\research\tamer-replicate\frhome\ttr3hlp.prg; #include c:\research\tamer-replicate\frhome\ttr3pl.prg; nextwind; res_ttr3f=res; save res_ttr3f; ga=0.25; b_tru=0.3; #include c:\research\tamer-replicate\frhome\ttr3hlp.prg; #include c:\research\tamer-replicate\frhome\ttr3pl.prg; nextwind; res_ttr3g=res; save res_ttr3g; ga=0.5; b_tru=0.3; #include c:\research\tamer-replicate\frhome\ttr3hlp.prg; #include c:\research\tamer-replicate\frhome\ttr3pl.prg; nextwind; res_ttr3h=res; save res_ttr3h; ga=1; b_tru=0.3; #include c:\research\tamer-replicate\frhome\ttr3hlp.prg; #include c:\research\tamer-replicate\frhome\ttr3pl.prg; endwind; res_ttr3i=res; save res_ttr3i;