Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

DSTAT( [ cTable[, aExpr_ra[, xcCondition ;
       [, nMissing[, cStatfile[, lAdd_to ]]]]]] )

Purpose

Calculate descriptive statistics on an array of expressions, or all numeric
fields in a table.

Arguments

     cTable -- if passed, alias of table to use, else current alias

     aExpr_ra -- if passed, single expression or array of expressions;
                     else all numeric fields in cTable

     xcCondition -- if passed, character expression (to be
                        macro-expanded) defining which records to use, else
                        current query state if any is in use

     nMissing -- if passed, numeric value of entries to skip

     cStatfile -- if passed, name of file in which to place results;
                      defaults to "DSTATS.DBF"

     lAdd_to -- if passed and .T., add results to cStatfile,
                    otherwise zap it first

Setup

cTable is open. Any query in effect is honoured.

Example

     fil = DSTAT( "EXPER", array_1, query_str, -1, ;
                  "RESULTS" )

Returns

Name of cStatfile, or a null string if no numeric fields

Side Effects

Makes cStatfile if it isn't there, writes results to it. In multi-user
mode, execution depends upon a lock being obtained on cStatfile.

Artful Calls

POP_MSG, Q_OPTIMIZE, STRINT, MAKE_STR, MAKE_TABLE,

Source Files

AA_DSTAT.PRG, AM_DSTAT.PRG

Notes

Structure of DSTATS.DBF:

     TABLE        C     8     0
     VARIABLE     C    40     0
     CALC_DATE    D     8     0
     SAMPL_SIZE   N     8     0
     MEAN         N    19     6
     MINIMUM      N    19     6
     MAXIMUM      N    19     6
     VARIANCE     N    19     6
     STD_DEV      N    19     6
     STD_ERR      N    19     6
     MEDIAN       N    19     6
     MODE         N    19     6
     MOMENT2      N    19     6
     MOMENT3      N    19     6
     MOMENT4      N    19     6
     COEFF_VAR    N    19     6
     SKEW         N    19     6
     KURTOSIS     N    19     6

Present limits of DSTAT():

1. About 20,000 values per variable averaging < ABS( 1000 ) before
   overflow. An expression for which ABS( mean ) > 1000 and n > 10,000
   should be scaled before running DSTAT().

2. To raise the ceiling at which overflow occurs, the mean is first
   calculated with the AVERAGE command, and sums of squares are calculated
   on mean differences.

The simplest way to view the results on-screen: after your call to
DSTAT()...

     SELECT dstats
     BROWSER()

Alternatively, you may call USTATS(), which is just a call to THE_USUAL()
for the statistics table. In this case, you must add a dictionary record
for DSTATS.DBF, with Id_char set to "DST".

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson