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

sjar at users.sourceforge.net sjar at users.sourceforge.net
Tue Jan 30 23:16:45 UTC 2007


Revision: 1256
          http://svn.sourceforge.net/rkward/?rev=1256&view=rev
Author:   sjar
Date:     2007-01-30 15:16:45 -0800 (Tue, 30 Jan 2007)

Log Message:
-----------
minor changes of names small fixes

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

Added Paths:
-----------
    trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_exact_test.php
    trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_exact_test.xml
    trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_test.php
    trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_test.xml

Added: trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_exact_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_exact_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_exact_test.php	2007-01-30 23:16:45 UTC (rev 1256)
@@ -0,0 +1,45 @@
+<?
+	function preprocess () {
+	}
+	
+	function calculate () {
+?>
+require(exactRankTests)
+rk.temp.x <- substitute (<? getRK ("x"); ?>)
+rk.temp.y <- substitute (<? getRK ("y"); ?>)
+rk.temp <- ansari.exact (eval (rk.temp.x), eval (rk.temp.y), alternative = c("<? getRK ("alternative"); ?>"), exact = <? getRK ("exact"); ?>, 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"; ?>
+
+<?
+	}
+	
+	function printout () {
+?>
+rk.header ("Ansari-Bradley two-sample exact 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"),"Confidence Interval", "<? getRK ("confint"); ?>","Compute exact p-value", "<? getRK ("exact"); ?>"))
+
+rk.results (list (
+	'Variable Names'=rk.get.description (rk.temp.x, rk.temp.y, is.substitute=TRUE),
+	'statistic'=rk.temp$statistic,
+	'null.value'=rk.temp$null.value,
+	'Hypothesis'=rk.temp$alternative,
+	p=rk.temp$p.value<?
+	if (getRK_val ("confint")) { ?>,
+	'confidence interval percent'=(100 * attr(rk.temp$conf.int, "conf.level")),
+	'confidence interval of difference'=rk.temp$conf.int <? } ?>))
+<?
+	}
+	
+	function cleanup () {
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+	}
+?>

Added: trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_exact_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_exact_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_exact_test.xml	2007-01-30 23:16:45 UTC (rev 1256)
@@ -0,0 +1,34 @@
+<!DOCTYPE rkplugin>
+
+<!-- This is a simple example, of how a "plugin" might be configured. -->
+
+<document>
+	<code file="ansari_bradley_exact_test.php"/>
+
+	<dialog label="Ansari-Bradley two-sample exact test">
+		<tabbook>
+			<tab label="Basic settings">
+				<row>
+					<varselector id="vars"/>
+					<column>
+						<varslot type="numeric" id="x" source="vars" required="true" label="compare"/>
+						<varslot type="numeric" id="y" source="vars" required="true" label="against"/>
+						<radio id="alternative" label="using test hypothesis">
+							<option value="two.sided" label="Two-sided"/>
+							<option value="greater" label="First is greater"/>
+							<option value="less" label="Second is greater"/>
+						</radio>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options">
+				<checkbox id="exact" label="compute exact p-value" checked="true" value="NULL" value_unchecked="FALSE"/>
+				<frame label="Confidence Interval">
+					<checkbox id="confint" label="compute confidence interval" checked="false" value="TRUE" value_unchecked="FALSE" />
+					<spinbox type="real" id="conflevel" label="confidence level" min="0" max="1" initial="0.95"/>
+				</frame>
+			</tab>
+		</tabbook>
+	</dialog>
+	
+</document>

Added: trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_test.php	2007-01-30 23:16:45 UTC (rev 1256)
@@ -0,0 +1,46 @@
+<?
+	function preprocess () {
+	}
+	
+	function calculate () {
+?>
+rk.temp.length.x <- length (<? getRK ("x"); ?>)
+rk.temp.x <- substitute (<? getRK ("x"); ?>)
+rk.temp.y <- substitute (<? getRK ("y"); ?>)
+rk.temp <- ansari.test (eval (rk.temp.x), eval (rk.temp.y), alternative = c("<? getRK ("alternative"); ?>"), exact = <? getRK ("exact"); ?>, 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"; ?>
+
+<?
+	}
+	
+	function printout () {
+?>
+rk.header ("Ansari-Bradley two-sample 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"),
+ 	"Note", if (rk.temp.length.x < 50) paste ("You have less then 50 values. An exact test is recommended.") else paste("Length is", (rk.temp.length.x)),"Compute exact p-value", "<? getRK ("confint"); ?>","Confidence Interval", "<? getRK ("exact"); ?>"))
+
+rk.results (list (
+	'Variable Names'=rk.get.description (rk.temp.x, rk.temp.y, is.substitute=TRUE),
+	'statistic'=rk.temp$statistic,
+	'Hypothesis'=rk.temp$alternative,
+	'null.value'=rk.temp$null.value,
+	p=rk.temp$p.value<?
+	if (getRK_val ("confint")) { ?>,
+	'confidence interval percent'=(100 * attr(rk.temp$conf.int, "conf.level")),
+	'confidence interval of difference'=rk.temp$conf.int <? } ?>))
+<?
+	}
+	
+	function cleanup () {
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+	}
+?>

Added: trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/ansari_bradley/ansari_bradley_test.xml	2007-01-30 23:16:45 UTC (rev 1256)
@@ -0,0 +1,34 @@
+<!DOCTYPE rkplugin>
+
+<!-- This is a simple example, of how a "plugin" might be configured. -->
+
+<document>
+	<code file="ansari_bradley_test.php"/>
+
+	<dialog label="Ansari-Bradley two-sample test">
+		<tabbook>
+			<tab label="Basic settings">
+				<row>
+					<varselector id="vars"/>
+					<column>
+						<varslot type="numeric" id="x" source="vars" required="true" label="compare"/>
+						<varslot type="numeric" id="y" source="vars" required="true" label="against"/>
+						<radio id="alternative" label="using test hypothesis">
+							<option value="two.sided" label="Two-sided"/>
+							<option value="greater" label="First is greater"/>
+							<option value="less" label="Second is greater"/>
+						</radio>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options">
+				<checkbox id="exact" label="compute exact p-value" checked="true" value="TRUE" value_unchecked="FALSE"/>
+				<frame label="Confidence Interval">
+					<checkbox id="confint" label="Compute confidence interval" checked="false" value="TRUE" value_unchecked="FALSE" />
+					<spinbox type="real" id="conflevel" label="confidence level" min="0" max="1" initial="0.95"/>
+				</frame>
+			</tab>
+		</tabbook>
+	</dialog>
+	
+</document>

Modified: trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_exact_test.php
===================================================================
--- trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_exact_test.php	2007-01-30 22:35:40 UTC (rev 1255)
+++ trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_exact_test.php	2007-01-30 23:16:45 UTC (rev 1256)
@@ -26,16 +26,15 @@
 		paste (rk.get.short.name (rk.temp.x), "and", rk.get.short.name (rk.temp.y), "differ"),"Confidence Interval", "<? getRK ("confint"); ?>", "Continuity correction in normal approximation for p-value", "<? getRK ("correct"); ?>","mu", "<? getRK ("mu"); ?>"))
 
 rk.results (list (
-	'Variable Name'=rk.temp$data.name,
+	'Variable Names'=rk.get.description (rk.temp.x, rk.temp.y, is.substitute=TRUE),
 	'statistic'=rk.temp$statistic,
-	'parameter'=rk.temp$parameter,
-	'mu'=rk.temp$null.value,
+	'Location Shift'=rk.temp$null.value,
 	'Hypothesis'=rk.temp$alternative,
 	p=rk.temp$p.value<?
 	if (getRK_val ("confint")) { ?>,
 	'confidence interval percent'=(100 * attr(rk.temp$conf.int, "conf.level")),
 	'confidence interval of difference'=rk.temp$conf.int <? } ?>,
-	'estimate' = rk.temp$estimate))
+	<? if (getRK_val ("confint")) { ?> 'Difference in Location' = rk.temp$estimate <?}?>))
 <?
 	}
 	

Modified: trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_test.php
===================================================================
--- trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_test.php	2007-01-30 22:35:40 UTC (rev 1255)
+++ trunk/rkward/rkward/plugins/wilcoxon/wilcoxon_test.php	2007-01-30 23:16:45 UTC (rev 1256)
@@ -27,16 +27,15 @@
  	"Note", if (rk.temp.length.x < 50) paste ("You have less then 50 values. An exact test is recommended.") else paste("Length is", (rk.temp.length.x)),"Confidence Interval", "<? getRK ("confint"); ?>", "Continuity correction in normal approximation for p-value", "<? getRK ("correct"); ?>","mu", "<? getRK ("mu"); ?>"))
 
 rk.results (list (
-	'Variable Name'=rk.temp$data.name,
+	'Variable Names'=rk.get.description (rk.temp.x, rk.temp.y, is.substitute=TRUE),
 	'statistic'=rk.temp$statistic,
-	'parameter'=rk.temp$parameter,
-	'mu'=rk.temp$null.value,
+	'Location Shift'=rk.temp$null.value,
 	'Hypothesis'=rk.temp$alternative,
 	p=rk.temp$p.value<?
 	if (getRK_val ("confint")) { ?>,
 	'confidence interval percent'=(100 * attr(rk.temp$conf.int, "conf.level")),
 	'confidence interval of difference'=rk.temp$conf.int <? } ?>,
-	'estimate' = rk.temp$estimate))
+	'Difference in Location' = rk.temp$estimate))
 <?
 	}
 	


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