bootstr1 1000 x. DEFINE bootstr1(!positional !TOKENS(1) /!positional !cmdend). GET FILE='C:\start.sav'. set mxloop = 99999. matrix. compute limits = make(1,2,0). save limits /outfile = 'c:\limits1.sav'. end matrix. compute loop_n = 0. !do !ii24p = 1 !to 1000. compute loop_n = loop_n + 1. GET FILE='C:\start.sav'. compute x = rv.chi(1). matrix. get x /variable = !2 /file = * /missing = omit. *print x. compute nr = nrow(x). *print nr. compute bign = !1*nr. *print bign. compute bigx = make(bign,2,0). compute bigj = make(nr,1,1). compute m1 = t(bigj)*!2/nr. * print m1. save m1 /outfile 'c:\mean.sav'. compute temp = make(nr,1,0). COMPUTE ID2 = 0. loop i = 1 to !1. loop j = 1 to nr. compute id2 = id2 + 1. compute id1 = trunc(nr*uniform(1,1)+1). compute temp(j,1) = x(id1,1). COMPUTE BIGX(ID2,1) = TEMP(J,1). compute bigx(id2,2) = i. end loop. *print temp. end loop. *PRINT BIGX. save bigx/outfile = 'c:\bigx.sav'. end matrix. GET FILE='C:\bigx.sav'. AGGREGATE /OUTFILE='C:/aggr.sav' /BREAK=col2 /col1_1 = MEAN(col1) /col1_2 = SD(col1) /N_BREAK=N. matrix. GET x /variables = col1_1 /FILE='C:\aggr.sav'. GET s /variables = col1_2 /FILE='C:\aggr.sav'. GET n /variables = n_break /FILE='C:\aggr.sav'. GET m /variables = col1 /FILE='C:\mean.sav'. compute nr = nrow(x). compute tstar = make(nr,1,0). loop i = 1 to nr. compute tstar(i,1) = (x(i,1) - m)/(s(i,1)/sqrt(n(i,1))). end loop. *print tstar. save tstar /outfile = 'c:\tstar.sav'. end matrix. GET FILE='C:\tstar.sav'. SORT CASES BY col1 (A) . SAVE OUTFILE='C:\tstar.sav' /COMPRESSED. matrix. compute alpha = .1. get tstar /variable = col1/file = 'c:\tstar.sav'. GET x /variables = col1_1 /FILE='C:\aggr.sav'. GET s /variables = col1_2 /FILE='C:\aggr.sav'. GET n /variables = n_break /FILE='C:\aggr.sav'. GET m /variables = col1 /FILE='C:\mean.sav'. compute nr = nrow(tstar). compute l = trunc(alpha/2*nr +.5). compute u = trunc((1-alpha/2)*nr + .5). compute t_l = tstar(l,1). compute t_u = tstar(u,1). compute j1 = make(nr,1,1). compute m1 = t(j1)*x/nr. compute s2 = T(x-m1*j1)*(x-m1*j1)/(nr-1). compute lower = m - t_u*sqrt(s2). compute upper = m - T_l*sqrt(s2). *print t_l. *print t_u. compute limits = make(1,2,0). compute limits(1,1) = lower. compute limits(1,2) = upper. *print lower. *print upper. save limits /outfile = 'C:\limits.sav'. end matrix. *save outfile 'c:\limit.sav' /keep = all. GET FILE='C:\limits1.sav'. ADD FILES /FILE=* /FILE='C:\limits.sav'. EXECUTE. SAVE OUTFILE='C:\limits1.sav' /COMPRESSED. !doend. !enddefine. compute c = 0. IF (col1 <1 and col2 >1) c = 1 . EXECUTE . FREQUENCIES VARIABLES=c /ORDER= ANALYSIS .