1Fsdb::Filter::dbcolsregUrseesrsiCoonn(t3r)ibuted Perl DoFcsudmbe:n:tFaitlitoenr::dbcolsregression(3)
2
3
4

NAME

6       dbcolsregression - compute linear regression between two columns
7

SYNOPSIS

9           dbcolsregression  [-a] column1 column2
10

DESCRIPTION

12       Compute linear regression over "column1" and "column2".  Outputs slope,
13       intercept, and correlation coefficient.
14

OPTIONS

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

SAMPLE USAGE

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:d intercept:d confcoeff:d n:q
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

SEE ALSO

79       dbcolstats, dbcolscorrelate, Fsdb.
80

CLASS FUNCTIONS

82   new
83           $filter = new Fsdb::Filter::dbcolsregression(@arguments);
84
85       Create a new dbcolsregression object, taking command-line arguments.
86
87   set_defaults
88           $filter->set_defaults();
89
90       Internal: set up defaults.
91
92   parse_options
93           $filter->parse_options(@ARGV);
94
95       Internal: parse command-line arguments.
96
97   setup
98           $filter->setup();
99
100       Internal: setup, parse headers.
101
102   run
103           $filter->run();
104
105       Internal: run over each rows.
106
108       Copyright (C) 1997-2022 by John Heidemann <johnh@isi.edu>
109
110       This program is distributed under terms of the GNU general public
111       license, version 2.  See the file COPYING with the distribution for
112       details.
113
114
115
116perl v5.36.0                      2022-11-22 Fsdb::Filter::dbcolsregression(3)
Impressum