upstream-extended/community/tools/rpy_statistics_collection/partialR_square.xml
1<tool id="partialRsq" name="Compute partial R square" version="1.1.0">
2 <description> </description>
3 <macros>
4 <import>statistic_tools_macros.xml</import>
5 </macros>
6 <expand macro="requirements" />
7 <command interpreter="python">
8<![CDATA[
9 partialR_square.py
10 $input1
11 $response_col
12 $predictor_cols
13 $out_file1
14 1>/dev/null
15]]>
16 </command>
17 <inputs>
18 <param format="tabular" name="input1" type="data" label="Select data" help="Dataset missing? See TIP below."/>
19 <param name="response_col" label="Response column (Y)" type="data_column" data_ref="input1" />
20 <param name="predictor_cols" label="Predictor columns (X)" type="data_column" data_ref="input1" multiple="true">
21 <validator type="no_options" message="Please select at least one column."/>
22 </param>
23 </inputs>
24 <outputs>
25 <data format_source="input" name="out_file1" metadata_source="input1" />
26 </outputs>
27 <tests>
28 <!-- Test data with vlid values -->
29 <test>
30 <param name="input1" value="regr_inp.tabular"/>
31 <param name="response_col" value="3"/>
32 <param name="predictor_cols" value="1,2"/>
33 <output name="out_file1" file="partialR_result.tabular"/>
34 </test>
35
36 </tests>
37 <help>
38<![CDATA[
39
40.. class:: infomark
41
42**TIP:** If your data is not TAB delimited, use *Edit Datasets->Convert characters*
43
44-----
45
46.. class:: infomark
47
48**What it does**
49
50This tool computes the Partial R squared for all possible variable subsets using the following formula:
51
52**Partial R squared = [SSE(without i: 1,2,...,p-1) - SSE (full: 1,2,..,i..,p-1) / SSE(without i: 1,2,...,p-1)]**, which denotes the case where the 'i'th predictor is dropped.
53
54
55
56In general, **Partial R squared = [SSE(without i: 1,2,...,p-1) - SSE (full: 1,2,..,i..,p-1) / SSE(without i: 1,2,...,p-1)]**, where,
57
58- SSE (full: 1,2,..,i..,p-1) = Sum of Squares left out by the full set of predictors SSE(X1, X2 … Xp)
59- SSE (full: 1,2,..,i..,p-1) = Sum of Squares left out by the set of predictors excluding; for example, if we omit the first predictor, it will be SSE(X2 … Xp).
60
61
62The 4 columns in the output are described below:
63
64- Column 1 (Model): denotes the variables present in the model
65- Column 2 (R-sq): denotes the R-squared value corresponding to the model in Column 1
66- Column 3 (Partial R squared_Terms): denotes the variable/s for which Partial R squared is computed. These are the variables that are absent in the reduced model in Column 1. A '-' in this column indicates that the model in Column 1 is the Full model.
67- Column 4 (Partial R squared): denotes the Partial R squared value corresponding to the variable/s in Column 3. A '-' in this column indicates that the model in Column 1 is the Full model.
68
69*R Development Core Team (2010). 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.*
70
71]]>
72 </help>
73 <expand macro="citations" />
74</tool>