CP( 1) = 0.0 

 DO 40 J = l.N 



CP(J+l) = FNS*VEC( J+1 ) /VEC (N*l ) 

 CCP(J) = CP{J + n- FLOAT( IFIX(CP( J+1) ) ) 

 IF ( SEL.GT.VECC J+1) ) GO TO 40 

 C FOU.NO A SAMPLE UNIT. 



J J = I N0( J) 

 IDSAMCI) = ID(JJ) 

 PP( I ) = C?( J+l) - CP( J ) 

 1 = 1+1 

 SEL = SEL + 



C NOW CALCULATE THE ERROR COMPONENTS DEPENDING CN DISTRIBUTION OF 



C 'CHAR' THROUGHOUT THE POPULATION. 



40 CONTINUE 



TX = VEC( N* 1 ) 



TSS = Q.O 



TS = 0.0 



SEL = FNS/FLOATCN) 

 SX ^ CP(2) 

 5P = 0.0 

 TP = 1.0 

 I = 1 



CCP(N) = 1.0 



C CALCULATE SbM 3F Pd) FOR FIRST SANiPLE CLUSTER 



DO 120 J = 2,N 



IF ( I .GT. IF I X(CP( J+ 1) ) ) GO TO 120 

 SX = SX + C P( J+1 ) - CP (J) 

 1 = 1 + 1 



IF ( I .GE.NSA1 ) GO TO 130 

 12C CONTI NUE 

 13C CONTI NUE 



DO 180 J = 1,N 



TRY = 6.E+35 



DO 160 I = 1,N 



IF ( CCP(I) .GE. TRY ) GO TJ 160 



TRY = CCP( I ) 

 IMIN ^ I 



C IMIN INDEXES UNIT TO DROP FROM PAST SAMPLE CLUSTER 



160 CONTI NUE 



P = CCP( I MI N) - SP 



SP = CCP( I MIN» 



CCP(IMIN) = 8.E+35 



X3AR = SX/FNS - SEL 



TSS = TSS + P«XBAR*XBAR 



TS = TS + P*XBAR 



TP = TP - P*P 



ISO SX = SX + CP(IIIN) + CP{IMIN + 2) - 2 .0* C P ( I M I N + 1 ) 

 TS = TSS - TS*TS 

 RE TURN 

 END 



15 



