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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed May 16 18:34:28 UTC 2007


Revision: 1910
          http://svn.sourceforge.net/rkward/?rev=1910&view=rev
Author:   tfry
Date:     2007-05-16 11:34:27 -0700 (Wed, 16 May 2007)

Log Message:
-----------
Add help page for crosstabs, and remove a redundant option

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/Makefile.am
    trunk/rkward/rkward/plugins/analysis/crosstab.php
    trunk/rkward/rkward/plugins/analysis/crosstab.xml

Added Paths:
-----------
    trunk/rkward/rkward/plugins/analysis/crosstab.rkh

Modified: trunk/rkward/rkward/plugins/Makefile.am
===================================================================
--- trunk/rkward/rkward/plugins/Makefile.am	2007-05-16 18:10:50 UTC (rev 1909)
+++ trunk/rkward/rkward/plugins/Makefile.am	2007-05-16 18:34:27 UTC (rev 1910)
@@ -336,6 +336,7 @@
 	analysis/corr_matrix.rkh \
 	analysis/crosstab.php \
 	analysis/t_test_two_vars.rkh \
+	analysis/crosstab.rkh \
 	analysis/t_test_two_vars.xml \
 	analysis/t_test_two_vars.php
 

Modified: trunk/rkward/rkward/plugins/analysis/crosstab.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab.php	2007-05-16 18:10:50 UTC (rev 1909)
+++ trunk/rkward/rkward/plugins/analysis/crosstab.php	2007-05-16 18:34:27 UTC (rev 1910)
@@ -27,7 +27,7 @@
 # calculate chisquares
 chisquares <- list ()
 for (i in 1:length (results)) {
-	chisquares[[i]] <- chisq.test (results[[i]], simulate.p.value = <? getRK ("simpv");?> <?if (getRK_val ("monte") == "TRUE") { ?>,B=(<? getRK ("B"); ?>) <?}?>)
+	chisquares[[i]] <- chisq.test (results[[i]], simulate.p.value = <? getRK ("simpv");?><?if (getRK_val ("simpv") == "TRUE") { ?>,B=(<? getRK ("B"); ?>) <?}?>)
 }
 <?	}
 
@@ -50,7 +50,7 @@
 	rk.print (xtable (cbind (results[[i]]), digits=0))
 <?		if (getRK_val ("chisq") == "TRUE") { ?>
 
-	rk.header ("Pearson's Chi Square Test for Crosstabs", list ("Dependent", descriptions[[i]][['Dependent']], "Independent", descriptions[[i]][['Independent']], "Simulate p vlaue", "<? getRK ("simpv");?>", "Monte Carlo", "<? getRK ("monte"); ?>" <? if (getRK_val ("monte") == "TRUE") { ?>,  "Number of replicates", <? getRK ("B"); }?> ))
+	rk.header ("Pearson's Chi Square Test for Crosstabs", list ("Dependent", descriptions[[i]][['Dependent']], "Independent", descriptions[[i]][['Independent']], "Simulate p value", "<? getRK ("simpv");?>"<? if (getRK_val ("simpv") == "TRUE") { ?>,  "Number of replicates", <? getRK ("B"); }?> ))
 	rk.results (list ('Statistic'=chisquares[[i]][['statistic']], 'df'=chisquares[[i]][['parameter']], 'p'=chisquares[[i]][['p.value']]))
 <?		}
 

Added: trunk/rkward/rkward/plugins/analysis/crosstab.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab.rkh	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/crosstab.rkh	2007-05-16 18:34:27 UTC (rev 1910)
@@ -0,0 +1,34 @@
+<!DOCTYPE rkhelp>
+<document>
+	<summary>
+Calculate two dimensional contingency tables for the count of occurrences of values in one "dependent" variable crossed with the values in one or more "independent" variables.
+	</summary>
+
+	<usage>
+Specify the "dependent" variable. This variable will be present in all created tables. Specify one or more "independent" variables. Each of these will be cross-tabulated against the "dependent" variable. "Dependent" and "Independent", here, does not imply any inferential statistics. In each table, the occurrence of combinations of values in the "dependent" and "independent" variable is counted.
+	</usage>
+
+	<settings>
+		<caption id="variables_tab"/>
+		<setting id="x">Select any vector that can be interpreted as a factor. This variable will be present in all tables.</setting>
+		<setting id="y">Select one or more vector that can be interpreted as a factor. Each of these will be cross-tabulated against the "dependent" variable.</setting>
+		<setting id="chisq">Should a chisquare test be performed (for each pair)?</setting>
+		<setting id="barplot">Should a barplot be produced (for each pair)?</setting>
+		<setting id="preview">Allows to preview the barplot(s). Only the first of the barplots is shown in the preview, even if more than one table is produced.</setting>
+
+		<caption id="chi_options"/>
+		<setting id="simpv">Should Monte-Carlo simulation be used to compute the p-value(s)?</setting>
+		<setting id="B">Number of replicates used in the Monte-Carlo test (if applicable).</setting>
+
+		<caption id="barplot_options"/>
+		<setting id="barplot_embed">Various options controlling the look of the generated barplot(s). See <link href="rkward://component/barplot_embed"/></setting>
+	</settings>
+	<related>
+		<ul>
+			<li><link href="rkward://component/barplot"/></li>
+			<li><link href="rkward://rhelp/table"/></li>
+			<li><link href="rkward://rhelp/chisq.test"/></li>
+			<li><link href="rkward://rhelp/barplot"/></li>
+		</ul>
+	</related>
+</document>

Modified: trunk/rkward/rkward/plugins/analysis/crosstab.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/crosstab.xml	2007-05-16 18:10:50 UTC (rev 1909)
+++ trunk/rkward/rkward/plugins/analysis/crosstab.xml	2007-05-16 18:34:27 UTC (rev 1910)
@@ -1,14 +1,15 @@
 <!DOCTYPE rkplugin>
 <document>
 	<code file="crosstab.php"/>
+	<help file="crosstab.rkh"/>
 	<logic>
 		<connect client="chi_options.enabled" governor="chisq.state" />
 		<connect client="barplot_options.enabled" governor="barplot.state" />
 		<connect client="preview.enabled" governor="barplot.state"/>
 		<set id="barplot_embed.xvar" to="results[[i]]"/>
 
-		<convert id="montevalue" mode="equals" sources="monte.string" standard="TRUE" />
-		<connect client="B.enabled" governor="montevalue" />
+		<convert id="montecarlo" mode="equals" sources="simpv.string" standard="TRUE" />
+		<connect client="B.enabled" governor="montecarlo" />
 	</logic>
 	<dialog label="Crosstabs" >
 		<tabbook>
@@ -26,18 +27,17 @@
 				</row>
 			</tab>
 			<tab label="Chisquare Options" id="chi_options">
-				<checkbox id="simpv" label="Simulate p value" value="TRUE" value_unchecked="FALSE" checked="false" />
-				<radio id="monte" label="Method">
+				<radio id="simpv" label="Method of computing p-value">
 					<option value="FALSE" label="Asymptotic"  checked="true" />
 					<option value="TRUE" label="Monte Carlo" />
 				</radio>
 				<frame label="Number of replicates">
-					<input id="B" initial="10000" label="Number of replicates used in the Monte Carlo Method" />
+					<input id="B" initial="2000" label="Number of replicates used in the Monte Carlo Method" />
 				</frame>
 				<stretch/>
 			</tab>
 			<tab label="Barplot Options" id="barplot_options">
-				<embed id="barplot_embed" component="rkward::barplot_embed"/>
+				<embed label="Barplot Options" id="barplot_embed" component="rkward::barplot_embed"/>
 			</tab>
 		</tabbook>
 	</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