The routine may be called by the names g01adf or nagf_stat_summary_freq.
The input data consist of a univariate frequency distribution, denoted by , for , and the boundary values of the classes , for . Thus the frequency associated with the interval is , and g01adf assumes that all the values in this interval are concentrated at the point
The following quantities are calculated:
(d)coefficient of skewness,
(e)coefficient of kurtosis,
The routine has been developed primarily for groupings of a continuous variable. If, however, the routine is to be used on the frequency distribution of a discrete variable, taking the values , then the boundary values for the classes may be defined as follows:
1: – IntegerInput
On entry: , the number of class boundaries, which is one more than the number of classes of the frequency distribution.
2: – Real (Kind=nag_wp) arrayInput
On entry: the elements of x must contain the boundary values of the classes in ascending order, so that class
is bounded by the values in and , for .
, for .
3: – Integer arrayInput
On entry: the
th element of ifreq must contain the frequency associated with the th class, for . is not used by the routine.
, for ;
4: – Real (Kind=nag_wp)Output
On exit: the mean value, .
5: – Real (Kind=nag_wp)Output
On exit: the standard deviation, .
6: – Real (Kind=nag_wp)Output
On exit: the coefficient of skewness, .
7: – Real (Kind=nag_wp)Output
On exit: the coefficient of kurtosis, .
8: – IntegerOutput
On exit: the total frequency, .
9: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, .
On entry, , and .
Either for some , or the sum of frequencies is zero.
The total frequency, , is less than , hence the quantities , and cannot be calculated.
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
The method used is believed to be stable.
8Parallelism and Performance
g01adf is not threaded in any implementation.
The time taken by g01adf increases linearly with .
In the example program, NPROB determines the number of sets of data to be analysed. For each analysis, the boundary values of the classes and the frequencies are read. After g01adf has been successfully called, the input data and calculated quantities are printed. In the example, there is one set of data, with classes.