0
|
1 <tool id="LinearRegression1" name="Perform Linear Regression" version="1.0.1">
|
|
2 <description> </description>
|
|
3 <command interpreter="python">
|
|
4 linear_regression.py
|
|
5 $input1
|
|
6 $response_col
|
|
7 $predictor_cols
|
|
8 $out_file1
|
|
9 $out_file2
|
|
10 1>/dev/null
|
|
11 </command>
|
|
12 <inputs>
|
|
13 <param format="tabular" name="input1" type="data" label="Select data" help="Dataset missing? See TIP below."/>
|
|
14 <param name="response_col" label="Response column (Y)" type="data_column" data_ref="input1" numerical="True"/>
|
|
15 <param name="predictor_cols" label="Predictor columns (X)" type="data_column" data_ref="input1" numerical="True" multiple="true" >
|
|
16 <validator type="no_options" message="Please select at least one column."/>
|
|
17 </param>
|
|
18 </inputs>
|
|
19 <outputs>
|
|
20 <data format="input" name="out_file1" metadata_source="input1" />
|
|
21 <data format="pdf" name="out_file2" />
|
|
22 </outputs>
|
|
23 <requirements>
|
|
24 <requirement type="python-module">rpy</requirement>
|
|
25 </requirements>
|
|
26 <tests>
|
|
27 <test>
|
|
28 <param name="input1" value="regr_inp.tabular"/>
|
|
29 <param name="response_col" value="3"/>
|
|
30 <param name="predictor_cols" value="1,2"/>
|
|
31 <output name="out_file1" file="regr_out.tabular"/>
|
|
32 <output name="out_file2" file="regr_out.pdf"/>
|
|
33 </test>
|
|
34 </tests>
|
|
35 <help>
|
|
36
|
|
37
|
|
38 .. class:: infomark
|
|
39
|
|
40 **TIP:** If your data is not TAB delimited, use *Edit Datasets->Convert characters*
|
|
41
|
|
42 -----
|
|
43
|
|
44 .. class:: infomark
|
|
45
|
|
46 **What it does**
|
|
47
|
|
48 This tool uses the 'lm' function from R statistical package to perform linear regression on the input data. It outputs two files, one containing the summary statistics of the performed regression, and the other containing diagnostic plots to check whether model assumptions are satisfied.
|
|
49
|
|
50 *R Development Core Team (2009). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org.*
|
|
51
|
|
52 -----
|
|
53
|
|
54 .. class:: warningmark
|
|
55
|
|
56 **Note**
|
|
57
|
|
58 - This tool currently treats all predictor and response variables as continuous numeric variables. Running the tool on categorical variables might result in incorrect results.
|
|
59
|
|
60 - Rows containing non-numeric (or missing) data in any of the chosen columns will be skipped from the analysis.
|
|
61
|
|
62 - The summary statistics in the output are described below:
|
|
63
|
|
64 - sigma: the square root of the estimated variance of the random error (standard error of the residiuals)
|
|
65 - R-squared: the fraction of variance explained by the model
|
|
66 - Adjusted R-squared: the above R-squared statistic adjusted, penalizing for the number of the predictors (p)
|
|
67 - p-value: p-value for the t-test of the null hypothesis that the corresponding slope is equal to zero against the two-sided alternative.
|
|
68
|
|
69
|
|
70 </help>
|
|
71 </tool>
|