[rkward-cvs] SF.net SVN: rkward: [1732] trunk/rkward/rkward/plugins/analysis/variances
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Mon Mar 26 17:25:09 UTC 2007
Revision: 1732
http://svn.sourceforge.net/rkward/?rev=1732&view=rev
Author: tfry
Date: 2007-03-26 10:25:09 -0700 (Mon, 26 Mar 2007)
Log Message:
-----------
Some improvements:
* Avoid showing parameters in rk.results, that are also shown in rk.header, and vice versa
* Allow to select several raw vectors, instead of a single vector and a grouping factor in fligner and bartlett tests
This is more consistent with what we do elsewhere.
Later, we may want to support both modes in some way or another.
Modified Paths:
--------------
trunk/rkward/rkward/plugins/analysis/variances/F_test.php
trunk/rkward/rkward/plugins/analysis/variances/F_test.rkh
trunk/rkward/rkward/plugins/analysis/variances/F_test.xml
trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.php
trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.rkh
trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.xml
trunk/rkward/rkward/plugins/analysis/variances/fligner_test.php
trunk/rkward/rkward/plugins/analysis/variances/fligner_test.rkh
trunk/rkward/rkward/plugins/analysis/variances/fligner_test.xml
Modified: trunk/rkward/rkward/plugins/analysis/variances/F_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/F_test.php 2007-03-26 17:01:54 UTC (rev 1731)
+++ trunk/rkward/rkward/plugins/analysis/variances/F_test.php 2007-03-26 17:25:09 UTC (rev 1732)
@@ -5,7 +5,7 @@
function calculate () {
?>
-result <- var.test (<? getRK ("x"); ?>, <? getRK ("x"); ?>, alternative = "<? getRK ("alternative"); ?>", ratio = <? getRK ("ratio"); ?><?
+result <- var.test (<? getRK ("x"); ?>, <? getRK ("y"); ?>, alternative = "<? getRK ("alternative"); ?>", ratio = <? getRK ("ratio"); ?><?
if (($conflevel = getRK_val ("conflevel")) != "0.95") echo (", conf.level=" . $conflevel); ?>)
<?
@@ -15,8 +15,8 @@
?>
names <- rk.get.description (<? getRK ("x"); ?>, <? getRK ("y"); ?>)
-rk.header ("F test to compare two variances",
- parameters=list ("Comparing", paste (names[1], "against", names[2]),"Confidence Level", "<? getRK ("conflevel"); ?>", "Ratio", "<? getRK ("ratio"); ?>", "Alternative Hypothesis", "<? getRK ("alternative"); ?>"))
+rk.header (result$method,
+ parameters=list ("Confidence Level", "<? getRK ("conflevel"); ?>", "Alternative Hypothesis", rk.describe.alternative(result)))
rk.results (list (
'Variables'=names,
@@ -24,7 +24,6 @@
'Numerator DF'=result$parameter["num df"],
'Denominator DF'=result$parameter["denom df"],
'p-value'=result$p.value,
- 'Alternative Hypothesis'=rk.describe.alternative(result),
'Lower CI'=result$conf.int[1],
'Upper CI'=result$conf.int[2],
'ratio of variances'=result$estimate))
Modified: trunk/rkward/rkward/plugins/analysis/variances/F_test.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/F_test.rkh 2007-03-26 17:01:54 UTC (rev 1731)
+++ trunk/rkward/rkward/plugins/analysis/variances/F_test.rkh 2007-03-26 17:25:09 UTC (rev 1732)
@@ -10,12 +10,12 @@
<settings>
<caption id="tab_variables"/>
- <setting id="x">Select the data to be computed. The vectors need to be numeric.</setting>
- <setting id="y">Select the data to be computed. The vectors need to be numeric.</setting>
- <setting id="alternative">Here you can specify the alternative hypothesis. It must be one of "two sided", "greater" or "less".</setting>
+ <setting id="x">First sample (numeric vector).</setting>
+ <setting id="y">Second sample (numeric vector).</setting>
+ <setting id="alternative">Alternative hypothesis of the test.</setting>
<caption id="tab_options"/>
<setting id="ratio">Defines the hypothesized ratio of the population variances.</setting>
- <setting id="conflevel">Here you can define the confidence level of the interval (95% is typical).</setting>
+ <setting id="conflevel">Defines the confidence level of the interval (95% is typical).</setting>
</settings>
<related>
<ul>
Modified: trunk/rkward/rkward/plugins/analysis/variances/F_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/F_test.xml 2007-03-26 17:01:54 UTC (rev 1731)
+++ trunk/rkward/rkward/plugins/analysis/variances/F_test.xml 2007-03-26 17:25:09 UTC (rev 1732)
@@ -21,8 +21,9 @@
</row>
</tab>
<tab label="Options" id="tab_options">
- <spinbox id="ratio" type="real" label="ratio" initial="1"/>
+ <spinbox id="hypothesized ratio" type="real" label="ratio" initial="1"/>
<spinbox id="conflevel" type="real" label="confidence level" min="0" max="1" initial="0.95"/>
+ <stretch/>
</tab>
</tabbook>
</dialog>
Modified: trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.php 2007-03-26 17:01:54 UTC (rev 1731)
+++ trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.php 2007-03-26 17:25:09 UTC (rev 1732)
@@ -3,18 +3,19 @@
}
function calculate () {
-
+ global $vars;
+ $vars = str_replace ("\n", ", ", trim (getRK_val ("x")));
?>
-result <- bartlett.test (<? getRK ("x"); ?>, <? getRK ("y"); ?>)
+result <- bartlett.test (list (<? echo ($vars); ?>))
<?
}
function printout () {
+ global $vars;
?>
-names <- rk.get.description (<? getRK ("x"); ?>, <? getRK ("y"); ?>)
+names <- rk.get.description (<? echo ($vars); ?>)
-rk.header ("Bartlett Test of Homogeneity of Variances",
- parameters=list ("Sample: ", paste (names[1], "grouped by:", names[2])))
+rk.header (result$method)
rk.results (list (
'Variables'=names,
Modified: trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.rkh 2007-03-26 17:01:54 UTC (rev 1731)
+++ trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.rkh 2007-03-26 17:25:09 UTC (rev 1732)
@@ -5,12 +5,11 @@
</summary>
<usage>
- Select two samples from normal populations to compare the variances by the F test. For this test the samples need to be numeric vectors (see below for details).
+ Select several numeric vectors to perform Bartlett's test of the null that the variances in each of the samples are the same.
</usage>
<settings>
- <setting id="x">Select the data to be computed. The vectors need to be numeric.</setting>
- <setting id="y">Select the data to be computed. The vectors need to be a factor.</setting>
+ <setting id="x">The samples to be checked for equal variance. The vectors need to be numeric, but don't need to have the same length.</setting>
</settings>
<related>
<ul>
Modified: trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.xml 2007-03-26 17:01:54 UTC (rev 1731)
+++ trunk/rkward/rkward/plugins/analysis/variances/bartlett_test.xml 2007-03-26 17:25:09 UTC (rev 1732)
@@ -8,8 +8,7 @@
<row>
<varselector id="vars"/>
<column>
- <varslot type="numeric" id="x" source="vars" required="true" label="samples"/>
- <varslot type="factor" id="y" source="vars" required="true" label="group"/>
+ <varslot type="numeric" id="x" source="vars" required="true" label="samples" multi="true" min_vars="2"/>
</column>
</row>
</dialog>
Modified: trunk/rkward/rkward/plugins/analysis/variances/fligner_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/fligner_test.php 2007-03-26 17:01:54 UTC (rev 1731)
+++ trunk/rkward/rkward/plugins/analysis/variances/fligner_test.php 2007-03-26 17:25:09 UTC (rev 1732)
@@ -3,17 +3,19 @@
}
function calculate () {
+ global $vars;
+ $vars = str_replace ("\n", ", ", trim (getRK_val ("x")));
?>
-result <- fligner.test (<? getRK ("x"); ?>, <? getRK ("x"); ?>)
+result <- fligner.test (list (<? echo ($vars); ?>))
<?
}
function printout () {
+ global $vars;
?>
-names <- rk.get.description (<? getRK ("x"); ?>, <? getRK ("y"); ?>)
+names <- rk.get.description (<? echo ($vars); ?>)
-rk.header ("Fligner-Killeen Test of Homogeneity of Variances",
- parameters=list ("Sample: ", paste (names[1], "grouped by:", names[2])))
+rk.header (result$method)
rk.results (list (
'Variables'=names,
Modified: trunk/rkward/rkward/plugins/analysis/variances/fligner_test.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/fligner_test.rkh 2007-03-26 17:01:54 UTC (rev 1731)
+++ trunk/rkward/rkward/plugins/analysis/variances/fligner_test.rkh 2007-03-26 17:25:09 UTC (rev 1732)
@@ -5,12 +5,11 @@
</summary>
<usage>
- Select the data to perform the Fligner-Killeen (median) test of the null that the variances in each of the groups (samples) are the same. For this test the samples need to be numeric vectors (see below for details).
+ Select several numeric vectors to perform the Fligner-Killeen (median) test of the null that the variances in each of the samples are the same.
</usage>
<settings>
- <setting id="x">Select the data to be computed. The vectors need to be numeric.</setting>
- <setting id="y">Select the data to be computed. The vectors need to be a factor.</setting>
+ <setting id="x">The samples to be checked for equal variance. The vectors need to be numeric, but don't need to have the same length.</setting>
</settings>
<related>
<ul>
Modified: trunk/rkward/rkward/plugins/analysis/variances/fligner_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/variances/fligner_test.xml 2007-03-26 17:01:54 UTC (rev 1731)
+++ trunk/rkward/rkward/plugins/analysis/variances/fligner_test.xml 2007-03-26 17:25:09 UTC (rev 1732)
@@ -8,8 +8,7 @@
<row>
<varselector id="vars"/>
<column>
- <varslot type="numeric" id="x" source="vars" required="true" label="samples"/>
- <varslot type="factor" id="y" source="vars" required="true" label="group"/>
+ <varslot type="numeric" id="x" source="vars" multi="true" required="true" label="samples" min_vars="2"/>
</column>
</row>
</dialog>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list