[rkward-cvs] SF.net SVN: rkward: [1201] trunk/rkward/rkward/plugins/wilcoxon

sjar at users.sourceforge.net sjar at users.sourceforge.net
Tue Jan 23 22:33:25 UTC 2007


Revision: 1201
          http://svn.sourceforge.net/rkward/?rev=1201&view=rev
Author:   sjar
Date:     2007-01-23 14:33:24 -0800 (Tue, 23 Jan 2007)

Log Message:
-----------
*.php: added check if length of vector is < 50. If < 50 then a recomendation for exact test is given
*.xml: exact NULL -> TRUE

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_test.php
    trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_test.xml

Modified: trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_test.php
===================================================================
--- trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_test.php	2007-01-23 12:19:11 UTC (rev 1200)
+++ trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_test.php	2007-01-23 22:33:24 UTC (rev 1201)
@@ -3,9 +3,11 @@
 	}
 	
 	function calculate () {
-?>rk.temp.x <- substitute (<? getRK ("x"); ?>)
+?>
+rk.temp.length.x <- length (<? getRK ("x"); ?>)
+rk.temp.x <- substitute (<? getRK ("x"); ?>)
 rk.temp.y <- substitute (<? getRK ("y"); ?>)
-rk.temp <- t.test (eval (rk.temp.x), eval (rk.temp.y), alternative = c("<? getRK ("hypothesis"); ?>"), mu = <? getRK ("mu"); ?>, paired = <? getRK ("paired"); ?>, exact = <? getRK ("exact"); ?>, correct = <? getRK ("correct"); ?>, conf.int = <? getRK ("confint"); ?> <?
+rk.temp <- wilcox.test (eval (rk.temp.x), eval (rk.temp.y), alternative = c("<? getRK ("hypothesis"); ?>"), mu = <? getRK ("mu"); ?>, paired = <? getRK ("paired"); ?>, exact = <? getRK ("exact"); ?>, correct = <? getRK ("correct"); ?>, conf.int = <? getRK ("confint"); ?> <?
 if (($conflevel = getRK_val ("conflevel")) != "0.95") echo (", conf.level=" . $conflevel); ?>)
 rk.temp.print.conf.level <- <? if (getRK_val ("confint")) echo "TRUE"; else echo "FALSE"; ?>
 
@@ -14,14 +16,15 @@
 	
 	function printout () {
 ?>
-rk.header ("Wilcoxon Test", 
+rk.header ("Wilcoxon Test",
 	parameters=list ("Comparing", paste (rk.get.description (rk.temp.x, is.substitute=TRUE), "against", rk.get.description (rk.temp.y, is.substitute=TRUE)),
 	"H1", if (rk.temp$alternative == "less")
 		paste (rk.get.short.name (rk.temp.y), "is greater than", rk.get.short.name (rk.temp.x))
 	      else if (rk.temp$alternative == "greater")
 		paste (rk.get.short.name (rk.temp.x), "is greater than", rk.get.short.name (rk.temp.y))
 	      else
-		paste (rk.get.short.name (rk.temp.x), "and", rk.get.short.name (rk.temp.y), "differ")))
+		paste (rk.get.short.name (rk.temp.x), "and", rk.get.short.name (rk.temp.y), "differ"),
+ 	"Note", if (rk.temp.length.x < 50) paste ("You have less then 50 values. Consider to perform an exact test.") else paste("Length is", (rk.temp.length.x))))
 
 rk.results (list (
 	'Variable Name'=rk.get.description (rk.temp.x),

Modified: trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_test.xml	2007-01-23 12:19:11 UTC (rev 1200)
+++ trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_test.xml	2007-01-23 22:33:24 UTC (rev 1201)
@@ -28,7 +28,7 @@
 				</frame>
 				<spinbox id="mu" label="mu" initial="0"/>
 				<checkbox id="paired" label="paired test" checked="true" value="FALSE" value_unchecked="TRUE"/>
-				<checkbox id="exact" label="compute exact p-value" checked="true" value="NULL" value_unchecked="FALSE"/>
+				<checkbox id="exact" label="compute exact p-value" checked="true" value="TRUE" value_unchecked="FALSE"/>
 				<checkbox id="correct" label="apply continuity correction" checked="true" value="TRUE" value_unchecked="FALSE"/>
 			</tab>
 		</tabbook>


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