cal 1947 1 4 all 1999:1 open data gdpq.rat data(for=rats) / gdpq set ly = log(gdpq) inquire(series=ly) start end com start = start, end = end * *MODE HUNTING* *Input key parameters for KDE* com m = 128 ;*Given # of bins (standard) com maxm = 6 ;*Max # of modes com hini = .015 ;*Initial window size com inc = .0010 ;*Increment in window size com ninc = 150 ;*Total number of increments to loop sou(echo) MBKERNEL.SRC sou(echo) MODES.SRC *The following procedure loops from the initial to the final window to *find the associated mode values. Stores windows in file temp.dat. *Options: (scatter,spgraph) @modes(scatter,spgraph) ly 5 100 maxm hini ninc inc m *MODE BOOTSTRAPPING* inquire(series=ly) start end com start = start, end = end com m = 128 ;*Given # of bins (standard) com maxm = 6 ;*Max # of modes open data temp.dat ;*Open temp file where windows and modes were stored * by MODES procedure. data(for=free,org=obs) 1 maxm critwin critmode close data sou(noecho) MBKERNEL.SRC sou(noecho) BOOTS.SRC *The following procedure tests the p-values of the null of m modes *found with MODES.SRC, where ASL (Achieved Significance Level) is the *percentage of booted modes exceeding the null. com nboots = 100 ;* Number of boots do i = 1,maxm com h1 = critwin(i) com h0modes = fix(critmode(i)) @boots ly start end h1 h0modes nboots m end do i