1DBCOLSTATSCORES(1)    User Contributed Perl Documentation   DBCOLSTATSCORES(1)
2
3
4

NAME

6       dbcolstatscores - compute z-scores or t-scores for each value in a
7       population
8

SYNOPSIS

10       dbcolstatscores [-t] [--tmean=MEAN] [--tstddev=STDDEV] column
11

DESCRIPTION

13       Compute statistics (z-score and optionally t-score) over a COLUMN of
14       numbers.  Creates new columns called "zscore", "tscore".  T-scores are
15       only computed if requested with the "-t" option, or if "--tmean" or
16       "--tstddev" are explicitly specified (defaults are mean of 50, standard
17       deviation of 10).
18
19       You may recall from your statistics class that a z-score is simply the
20       value normalized by mean and standard deviation, so that 0.0 is the
21       mean and positive or negative values are multiples of the standard
22       deviation.  It assumes data follows a normal (Gaussian) distribution.
23
24       T-score scales the z-score to match a mean of 50 and a standard
25       deviation of 10.  This program allows generalized t-scores that use any
26       mean and standard deviation.
27
28       Other scales are sometimes used as well.  The Wechsler Adult
29       Intelligence Scale (one type of IQ test) is adjusted to a mean of 100
30       and a standard deviation of 15.  Other tests scale to other standard
31       deviations.
32
33       This program requires two passes over the data, and consumes O(1)
34       memory and O(number of rows) disk space.
35

OPTIONS

37       -a or --include-non-numeric
38           Compute stats over all records (treat non-numeric records as zero
39           rather than just ignoring them).
40
41       -t  Compute t-scores in addition to z-scores.
42
43       --tmean MEAN
44           Use the given MEAN for t-scores.
45
46       --tstddev STDDEV or --tsd STDDEV
47           Use the given STDDEV for the standard deviation of the t-scores.
48
49       -f FORMAT or --format FORMAT
50           Specify a printf(3)-style format for output statistics.  Defaults
51           to "%.5g".
52
53       -T TmpDir
54           where to put tmp files.  Also uses environment variable TMPDIR, if
55           -T is not specified.  Default is /tmp.
56
57       This module also supports the standard fsdb options:
58
59       -d  Enable debugging output.
60
61       -i or --input InputSource
62           Read from InputSource, typically a file name, or "-" for standard
63           input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
64           objects.
65
66       -o or --output OutputDestination
67           Write to OutputDestination, typically a file name, or "-" for
68           standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
69           Fsdb::BoundedQueue objects.
70
71       --autorun or --noautorun
72           By default, programs process automatically, but Fsdb::Filter
73           objects in Perl do not run until you invoke the run() method.  The
74           "--(no)autorun" option controls that behavior within Perl.
75
76       --help
77           Show help.
78
79       --man
80           Show full manual.
81

SAMPLE USAGE

83   Input:
84           #fsdb name id test1
85           a 1 80
86           b 2 70
87           c 3 65
88           d 4 90
89           e 5 70
90           f 6 90
91
92   Command:
93           cat DATA/grades.fsdb | dbcolstatscores --tmean 50 --tstddev 10 test1 | dbcolneaten
94
95   Output:
96           #fsdb name id test1 zscore   tscore
97           a       1  80    0.23063  52.306
98           b       2  70    -0.69188 43.081
99           c       3  65    -1.1531  38.469
100           d       4  90    1.1531   61.531
101           e       5  70    -0.69188 43.081
102           f       6  90    1.1531   61.531
103           #  | dbcolstatscores --tmean 50 --tstddev 10 test1
104           #  | dbcolneaten
105

SEE ALSO

107       dbcolpercentile(1), dbcolstats(1), Fsdb, dbcolscorrelate
108
110       Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
111
112       This program is distributed under terms of the GNU general public
113       license, version 2.  See the file COPYING with the distribution for
114       details.
115
116
117
118perl v5.34.0                      2021-07-22                DBCOLSTATSCORES(1)
Impressum