annotate tools/regVariation/t_test_two_samples.xml @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="t_test_two_samples" name="T Test for Two Samples" version="1.0.0">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description></description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 <command interpreter="perl">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 t_test_two_samples.pl $inputFile1 $inputFile2 $inputTestSidedness3 $inputStandardDeviationEquality4 $outputFile1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <param format="tabular" name="inputFile1" type="data" label="Select the first sample tabular file"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 <param format="tabular" name="inputFile2" type="data" label="Select the second sample tabular file"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 <param name="inputTestSidedness3" type="select" label="Choose the test sidedness:">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 <option value="two-sided">Two-sided</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <option value="one-sided:_m1_less_than_m2">One-sided: m1 less than m2</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <option value="one-sided:_m1_greater_than_m2">One-sided: m1 greater than m2</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <param name="inputStandardDeviationEquality4" type="select" label="Choose the standard deviation equality status of the two populations:">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <option value="equal">Equal</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <option value="unequal">Unequal</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <data format="text" name="outputFile1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 <param name="inputFile2" value="sample2.tabular" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 <param name="inputTestSidedness3" value="Two-sided" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <param name="inputStandardDeviationEquality4" value="Equal" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <output name="outputFile1" file="t_test_result1.text" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 <param name="inputFile2" value="sample2.tabular" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <param name="inputTestSidedness3" value="Two-sided" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <param name="inputStandardDeviationEquality4" value="Unequal" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <output name="outputFile1" file="t_test_result2.text" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 <param name="inputFile2" value="sample2.tabular" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 <param name="inputTestSidedness3" value="One-sided: m1 less than m2" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <param name="inputStandardDeviationEquality4" value="Equal" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <output name="outputFile1" file="t_test_result3.text" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 <param name="inputFile2" value="sample2.tabular" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <param name="inputTestSidedness3" value="One-sided: m1 less than m2" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 <param name="inputStandardDeviationEquality4" value="Unequal" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 <output name="outputFile1" file="t_test_result4.text" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 <param name="inputFile2" value="sample2.tabular" ftype="tabular"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 <param name="inputTestSidedness3" value="One-sided: m1 greater than m2" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 <param name="inputStandardDeviationEquality4" value="Equal" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 <output name="outputFile1" file="t_test_result5.text" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 <param name="inputFile2" value="sample2.tabular" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 <param name="inputTestSidedness3" value="One-sided: m1 greater than m2" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 <param name="inputStandardDeviationEquality4" value="Unequal" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 <output name="outputFile1" file="t_test_result6.text" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 .. class:: infomark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 This program implements the non-pooled t-test for two samples where the alternative hypothesis is two-sided or one-sided. The program takes four inputs:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 - The first input file is a TABULAR format file representing the first sample and consisting of one column only.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 - The second input file is a TABULAR format file representing the first sample and consisting of one column only.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 - The third input is the sidedness of the t-test: either two-sided or, one-sided with m1 less than m2 or, one-sided with m1 greater than m2.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 - The fourth input is the equality status of the standard deviations of both populations.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 - The output file is a TXT file representing the result of the two-sample t-test.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 **Example**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 Let us have the first input file representing the first sample as follows::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98 5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 6
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106 0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107 6
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109 5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
110 7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
111 5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
112 3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
113 2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
114 5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
115 8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
116 7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
117 6
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
118 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
119
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
120 And the second input file representing the second sample as follows::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
121
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
122 2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
123 3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
124 5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
125 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
126 2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
127 7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
128 5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
129 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
130 3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
131 2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
132 7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
133 6
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
134 0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
135 8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
136 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
137 6
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
138 9
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
139 2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
140 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
141 5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
142 6
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
143
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
144 Runnig the program and choosing "Two-sided" and "Equal" as parameters will give the following output::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
145
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
146 Two Sample t-test
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
147
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
148 data: sample1 and sample2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
149 t = -0.3247, df = 40, p-value = 0.7471
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
150 alternative hypothesis: true difference in means is not equal to 0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
151 95 percent confidence interval:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
152 -1.720030 1.243839
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
153 sample estimates:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
154 mean of x mean of y
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
155 4.333333 4.571429
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
156
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
157
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
158 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
159
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
160 </tool>