Commit a8013733 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

update Gelman-Runin idl script

parent 38edb906
......@@ -13,22 +13,22 @@ sz4=size(t4,/dim)
dim=sz1[1]
stop=min([sz1[0]-1,sz2[0]-1,sz3[0]-1,sz4[0]-1])
zestop=min([sz1[0]-1,sz2[0]-1,sz3[0]-1,sz4[0]-1])
rec=dblarr(stop+1, dim, n_chain)
rec=dblarr(zestop+1, dim, n_chain)
flength=dim*stop
flength=dim*zestop
print, flength
rec[*,*,0]=t1[0:stop,*]
rec[*,*,1]=t2[0:stop,*]
rec[*,*,2]=t3[0:stop,*]
rec[*,*,3]=t4[0:stop,*]
rec[*,*,0]=t1[0:zestop,*]
rec[*,*,1]=t2[0:zestop,*]
rec[*,*,2]=t3[0:zestop,*]
rec[*,*,3]=t4[0:zestop,*]
lenght_min=long(50)
lenght_max=stop
lenght_max=zestop
gap=1000L
event=(lenght_max-lenght_min)/gap+1
......@@ -47,7 +47,7 @@ index_event=0
for index=lenght_min, lenght_max-1 do begin &$
for d=1,dim-1 do begin &$
if stop ne 0 then begin &$
if zestop ne 0 then begin &$
for m=0,n_chain-1 do begin &$
burn_in=index/2 &$
mean_chain[d,m]=total(rec[burn_in :index,d,m])/(index-burn_in) &$
......@@ -67,9 +67,6 @@ for index=lenght_min, lenght_max-1 do begin &$
;print, R
;-------------plot R
if (n_elements(write) eq 0) then write=0
if (write ne 0) then openplot, "GR_"+dir+'.ps', xsize=20, ysize=12
loadct, 39
x=indgen(event)*gap+lenght_min
!x.style=1
......@@ -91,12 +88,7 @@ for i=7,dim-1 do oplot, x, R[i,*]-vec_one, color=color[6], linestyle=linestyle[6
items=name[1:6]
items=[items,"nuisances"]
legend, items,colors=color,linestyle=linestyle, /top, /right ; textcolors=color
al_egend, items,colors=color,linestyle=linestyle, /top, /right ; textcolors=color
;add more nuisances here
if (write ne 0) then closeplot, /png
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment