1DBCOLSREGRESSION(1) User Contributed Perl Documentation DBCOLSREGRESSION(1)
2
3
4
6 dbcolsregression - compute linear regression between two columns
7
9 dbcolsregression [-a] column1 column2
10
12 Compute linear regression over "column1" and "column2". Outputs slope,
13 intercept, and correlation coefficient.
14
16 -a or --include-non-numeric
17 Compute stats over all records (treat non-numeric records as zero
18 rather than just ignoring them).
19
20 -f FORMAT or --format FORMAT
21 Specify a printf(3)-style format for output statistics. Defaults
22 to "%.5g".
23
24 This module also supports the standard fsdb options:
25
26 -d Enable debugging output.
27
28 -i or --input InputSource
29 Read from InputSource, typically a file name, or "-" for standard
30 input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
31 objects.
32
33 -o or --output OutputDestination
34 Write to OutputDestination, typically a file name, or "-" for
35 standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
36 Fsdb::BoundedQueue objects.
37
38 --autorun or --noautorun
39 By default, programs process automatically, but Fsdb::Filter
40 objects in Perl do not run until you invoke the run() method. The
41 "--(no)autorun" option controls that behavior within Perl.
42
43 --help
44 Show help.
45
46 --man
47 Show full manual.
48
50 Input:
51 #fsdb x y
52 160 126
53 180 103
54 200 82
55 220 75
56 240 82
57 260 40
58 280 20
59
60 Command:
61 cat DATA/xy.fsdb | dbcolsregression x y | dblistize
62
63 Output:
64 #fsdb -R C slope intercept confcoeff n
65 slope: -0.79286
66 intercept: 249.86
67 confcoeff: -0.95426
68 n: 7
69
70 # | dbcolsregression x y
71 # confidence intervals assume normal distribution and small n.
72 # | dblistize
73
74 Sample data from
75 <http://people.hofstra.edu/faculty/Stefan_Waner/RealWorld/calctopic1/regression.html>
76 by Stefan Waner and Steven R. Costenoble.
77
79 dbcolstats, dbcolscorrelate, Fsdb.
80
82 Copyright (C) 1997-2018 by John Heidemann <johnh@isi.edu>
83
84 This program is distributed under terms of the GNU general public
85 license, version 2. See the file COPYING with the distribution for
86 details.
87
88
89
90perl v5.34.0 2021-07-22 DBCOLSREGRESSION(1)