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