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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Mar 18 19:20:22 UTC 2007


Revision: 1617
          http://svn.sourceforge.net/rkward/?rev=1617&view=rev
Author:   tfry
Date:     2007-03-18 12:20:21 -0700 (Sun, 18 Mar 2007)

Log Message:
-----------
Move t-test plugin to a better location

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/analysis.pluginmap

Added Paths:
-----------
    trunk/rkward/rkward/plugins/analysis/t_test_two_samples.php
    trunk/rkward/rkward/plugins/analysis/t_test_two_samples.xml

Removed Paths:
-------------
    trunk/rkward/rkward/plugins/00means/00ttests/00independent_samples/code.php
    trunk/rkward/rkward/plugins/00means/00ttests/00independent_samples/description.xml

Deleted: trunk/rkward/rkward/plugins/00means/00ttests/00independent_samples/code.php
===================================================================
--- trunk/rkward/rkward/plugins/00means/00ttests/00independent_samples/code.php	2007-03-18 19:16:19 UTC (rev 1616)
+++ trunk/rkward/rkward/plugins/00means/00ttests/00independent_samples/code.php	2007-03-18 19:20:21 UTC (rev 1617)
@@ -1,45 +0,0 @@
-<?
-	function preprocess () {
-	}
-	
-	function calculate () {
-?>rk.temp.x <- substitute (<? getRK ("x"); ?>)
-rk.temp.y <- substitute (<? getRK ("y"); ?>)
-rk.temp <- t.test (eval (rk.temp.x), eval (rk.temp.y), "<? getRK ("hypothesis"); ?>"<?
-if (getRK_val ("varequal")) echo (", var.equal=TRUE");
-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 ("T-test (independent samples)", 
-	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"),
-	"Equal variances", "<? if (!getRK_val ("varequal")) echo "not"; ?> assumed"))
-
-rk.results (list (
-	'Variable Name'=rk.get.description (rk.temp.x, rk.temp.y, is.substitute=TRUE),
-	'estimated mean'=rk.temp$estimate,
-	'degrees of freedom'=rk.temp$parameter,
-	t=rk.temp$statistic,
-	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))
-<?
-	}
-?>

Deleted: trunk/rkward/rkward/plugins/00means/00ttests/00independent_samples/description.xml
===================================================================
--- trunk/rkward/rkward/plugins/00means/00ttests/00independent_samples/description.xml	2007-03-18 19:16:19 UTC (rev 1616)
+++ trunk/rkward/rkward/plugins/00means/00ttests/00independent_samples/description.xml	2007-03-18 19:20:21 UTC (rev 1617)
@@ -1,62 +0,0 @@
-<!DOCTYPE rkplugin>
-
-<!-- This is a simple example, of how a "plugin" might be configured. -->
-
-<document>
-	<code file="t_test_two_samples.php"/>
-
-	<dialog label="Independed Samples T-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="hypothesis" 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="varequal" label="assume equal variances" value="1" value_unchecked="0"/>
-				<frame label="Confidence Interval">
-					<checkbox id="confint" label="print confidence interval" value="1" checked="true"/>
-					<spinbox type="real" id="conflevel" label="confidence level" min="0" max="1" initial="0.95"/>
-				</frame>
-			</tab>
-		</tabbook>
-	</dialog>
-	<wizard label="Independed Samples T-Test">
-		<page>
-			<text>As a first step, select the two variables you want to compare against each other. And specify, which one you theorize to be greater. Select two-sided, if your theory does not tell you, which variable is greater.</text>
-			<row>
-				<column>
-					<varselector id="vars"/>
-				</column>
-				<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="hypothesis" 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>
-		</page>
-		<page>
-			<text>Below are some advanced options. It's generally safe not to assume the variables have equal variances. An appropriate correction will be applied then. Chosing "assume equal variances" may increase test-strength, however.</text>
-			<checkbox id="varequal" label="assume equal variances" value="1" value_unchecked="0"/>
-			<text>Sometimes it's helpful to get an estimate of the confidence interval of the difference in means. Below you can specify whether one should be shown, and which confidence-level should be applied (95% corresponds to a 5% level of significance).</text>
-			<frame label="Confidence Interval">
-				<checkbox id="confint" label="print confidence interval" value="1" checked="true"/>
-				<spinbox type="real" id="conflevel" label="confidence level" min="0" max="1" initial="0.95"/>
-			</frame>
-		</page>
-	</wizard>
-	
-</document>

Copied: trunk/rkward/rkward/plugins/analysis/t_test_two_samples.php (from rev 1612, trunk/rkward/rkward/plugins/00means/00ttests/00independent_samples/code.php)
===================================================================
--- trunk/rkward/rkward/plugins/analysis/t_test_two_samples.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/t_test_two_samples.php	2007-03-18 19:20:21 UTC (rev 1617)
@@ -0,0 +1,45 @@
+<?
+	function preprocess () {
+	}
+	
+	function calculate () {
+?>rk.temp.x <- substitute (<? getRK ("x"); ?>)
+rk.temp.y <- substitute (<? getRK ("y"); ?>)
+rk.temp <- t.test (eval (rk.temp.x), eval (rk.temp.y), "<? getRK ("hypothesis"); ?>"<?
+if (getRK_val ("varequal")) echo (", var.equal=TRUE");
+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 ("T-test (independent samples)", 
+	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"),
+	"Equal variances", "<? if (!getRK_val ("varequal")) echo "not"; ?> assumed"))
+
+rk.results (list (
+	'Variable Name'=rk.get.description (rk.temp.x, rk.temp.y, is.substitute=TRUE),
+	'estimated mean'=rk.temp$estimate,
+	'degrees of freedom'=rk.temp$parameter,
+	t=rk.temp$statistic,
+	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))
+<?
+	}
+?>

Copied: trunk/rkward/rkward/plugins/analysis/t_test_two_samples.xml (from rev 1616, trunk/rkward/rkward/plugins/00means/00ttests/00independent_samples/description.xml)
===================================================================
--- trunk/rkward/rkward/plugins/analysis/t_test_two_samples.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/t_test_two_samples.xml	2007-03-18 19:20:21 UTC (rev 1617)
@@ -0,0 +1,62 @@
+<!DOCTYPE rkplugin>
+
+<!-- This is a simple example, of how a "plugin" might be configured. -->
+
+<document>
+	<code file="t_test_two_samples.php"/>
+
+	<dialog label="Independed Samples T-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="hypothesis" 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="varequal" label="assume equal variances" value="1" value_unchecked="0"/>
+				<frame label="Confidence Interval">
+					<checkbox id="confint" label="print confidence interval" value="1" checked="true"/>
+					<spinbox type="real" id="conflevel" label="confidence level" min="0" max="1" initial="0.95"/>
+				</frame>
+			</tab>
+		</tabbook>
+	</dialog>
+	<wizard label="Independed Samples T-Test">
+		<page>
+			<text>As a first step, select the two variables you want to compare against each other. And specify, which one you theorize to be greater. Select two-sided, if your theory does not tell you, which variable is greater.</text>
+			<row>
+				<column>
+					<varselector id="vars"/>
+				</column>
+				<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="hypothesis" 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>
+		</page>
+		<page>
+			<text>Below are some advanced options. It's generally safe not to assume the variables have equal variances. An appropriate correction will be applied then. Chosing "assume equal variances" may increase test-strength, however.</text>
+			<checkbox id="varequal" label="assume equal variances" value="1" value_unchecked="0"/>
+			<text>Sometimes it's helpful to get an estimate of the confidence interval of the difference in means. Below you can specify whether one should be shown, and which confidence-level should be applied (95% corresponds to a 5% level of significance).</text>
+			<frame label="Confidence Interval">
+				<checkbox id="confint" label="print confidence interval" value="1" checked="true"/>
+				<spinbox type="real" id="conflevel" label="confidence level" min="0" max="1" initial="0.95"/>
+			</frame>
+		</page>
+	</wizard>
+	
+</document>

Modified: trunk/rkward/rkward/plugins/analysis.pluginmap
===================================================================
--- trunk/rkward/rkward/plugins/analysis.pluginmap	2007-03-18 19:16:19 UTC (rev 1616)
+++ trunk/rkward/rkward/plugins/analysis.pluginmap	2007-03-18 19:20:21 UTC (rev 1617)
@@ -6,7 +6,7 @@
 		<component type="standard" id="corr_matrix" file="analysis/corr_matrix.xml" label="Correlation Matrix" />
 		<component type="standard" id="cor_graph" file="plots/cor_graph.xml" label="Correlation Matrix Plot" />
 		<component type="standard" id="descriptive" file="descriptive/descriptive_statistics.xml" label="Descriptive Statistics" />
-		<component type="standard" id="independent_samples_t_test" file="00means/00ttests/00independent_samples/description.xml" label="Independent Samples" />
+		<component type="standard" id="t_test_two_samples" file="analysis/t_test_two_samples.xml" label="Two Sample t-test" />
 		<component type="standard" id="simple_anova" file="simple_anova/description.xml" label="Simple Anova" />
 		<component type="standard" id="wilcoxon_test" file="analysis/wilcoxon/wilcoxon_test.xml" label="Wilcoxon Test" />
 		<component type="standard" id="wilcoxon_exact_test" file="analysis/wilcoxon/wilcoxon_exact_test.xml" label="Wilcoxon exact test" />
@@ -28,8 +28,8 @@
 			</menu>
 			<entry component="descriptive" index="2"/>
 			<menu id="means" label="Means" index="3">
-				<menu id="ttests" label="T-Tests" index="0">
-					<entry component="independent_samples_t_test" />
+				<menu id="ttests" label="t-Tests" index="0">
+					<entry component="t_test_two_samples" />
 				</menu>
 			</menu>
 			<entry component="simple_anova" index="6"/>


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