1Fsdb::Filter::dbcolstatUssceorreCso(n3t)ributed Perl DocFusmdebn:t:aFtiilotner::dbcolstatscores(3)
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:d   tscore:d
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

CLASS FUNCTIONS

110   new
111           $filter = new Fsdb::Filter::dbcolstatscores(@arguments);
112
113       Create a new dbcolstatscores object, taking command-line arguments.
114
115   set_defaults
116           $filter->set_defaults();
117
118       Internal: set up defaults.
119
120   parse_options
121           $filter->parse_options(@ARGV);
122
123       Internal: parse command-line arguments.
124
125   setup
126           $filter->setup();
127
128       Internal: setup, parse headers.
129
130   run
131           $filter->run();
132
133       Internal: run over each rows.
134
136       Copyright (C) 1991-2022 by John Heidemann <johnh@isi.edu>
137
138       This program is distributed under terms of the GNU general public
139       license, version 2.  See the file COPYING with the distribution for
140       details.
141
142
143
144perl v5.38.0                      2023-07-20  Fsdb::Filter::dbcolstatscores(3)
Impressum