QUANTA <data>,<variable>,k,L estimates k quanta from the given data set of one variable. Consider a data set x_1, x_2,..., x_n where each observation is an approximate integral multiple of one of positive numbers q_1, q_2,..., q_k where typically k=1 or another small integer. Our task is to estimate the values of quanta q_1, q_2,..., q_k on the condition that each of them exceeds a certain minimum value q_min. D.G.Kendall has in his paper "Hunting quanta" (Royal Society of London. Mathematical and Physical Sciences A 276, 231-266) proposed using a "cosine quantogram" of the form n phi(q) = sqrt(2/n)* SUM cos(2*pi*eps(i)/q) (Kendall) i=1 where 0<=eps(i)<q is the remainder when x_i is divided by q. The q-values of highest upward peaks of this function will be considered as candidates for quanta. Our idea is that the quanta are estimated by a selective, conditional least squares method where the sum n ss(q_1,...,q_k) = SUM min[g(x_i,q_1)^2,...,g(x_i,q_k)^2] (SLS) i=1 where g(x,q) in the least absolute remainder when x is divided by q, is to be minimized with respect of q_1,...,q_k on the condition that each q_i is at least q_min. The default method is SLS. Then the permitted range of quanta is given by RANGE=<lower_limit>(<step>)<upper_limit> and least possible value of a quant is given by Q_MIN=<q_min>. All combinations of values given by RANGE are used as starting values for q_1,...,q_k for a minimization process of ss(q_1,...,q_k) and it is performed by Powell's conjugate gradient method. By RES=<quant_number>,<residual>,<coeff> three extra variables are given for saving corresponding information about the results for each case. ....................................................................... Example: DATA X: 3 6 7 9 12 14 15 18 21 24 27 28 30 33 35 END RANGE=2(0.2)8 Q_MIN=2 QUANTA X,X,2,CUR+1 Data: X Variable: X N=15 ss=0 quant # matches 1 3.000000 11 2 3.500000 4 By specification METHOD=Kendall the cosine quantogram and its highest peaks are computed. Then RANGE=<lower_limit>(<step>)<upper_limit> gives values for which phi(q) is computed. The q and phi(q) values are save as a Survo data file COSQUANT and QUANTA creates a simple GPLOT scheme for plotting the quantogram. Also the highest peaks exceeding a value given by SCORE_MIN will be listed. ....................................................................... Example: DATA X: 3 6 7 9 12 14 15 18 21 24 27 28 30 33 35 END METHOD=Kendall RANGE=2(0.0001)8 SCORE_MIN=1.5 QUANTA X,X,0,CUR+1 / The third parameter has no meaning in this case. Data: X Variable: X N=15 GPLOT COSQUANT,quant,score / LINE=1 MODE=SVGA Plot the quantogram! Peaks of Kendall's Cosine Quantogram: quant score 2.3350 1.5076 2.9950 3.2941