/*program to compare F variance ratio test size (with robust rank test - omitted) with nominal size when random variables are Cauchy*/ n1=25;n2=25; @ partitions of sample@ fpnt=2.2693|2.659; @ F, 2.5% | 1%, 24,24@ sig=ln(fpnt); @ sig is 2 by 1@ n=n1+n2; @ total sample size@ nrep=10000; @ no. of replications@ tim=hsec; @ store time in 1/100-ths sec@ irep=1;icount=zeros(2,1); @ initialise loop, & count@ do until irep > nrep; @ start loop@ e=rndn(n,1)./rndn(n,1); @ N(0,1)/N(0,1) is Cauchy@ e1=e[1:n1]; e1=e1-meanc(e1); @ split sample@ e2=e[n1+1:n]; e2=e2-meanc(e2); frat=ln(e1'e1/(e2'e2)); @find log of F for 2-tailed test@ icount=icount + (abs(frat).>sig); @ () expression gives Boolean count increment@ irep=irep+1; @ increment loop counter@ endo; "time" 0.01*(hsec-tim);; "secs nrep" nrep; @ output results@ "rejection % f, rank" 100*(icount')/nrep; "Monte Carlo precision for 5%, 1% size +/-"; 196*sqrt(0.05*0.95/nrep) 196*sqrt(0.01*0.99/nrep);