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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Mon Mar 19 21:09:09 UTC 2007


Revision: 1643
          http://svn.sourceforge.net/rkward/?rev=1643&view=rev
Author:   tfry
Date:     2007-03-19 14:09:09 -0700 (Mon, 19 Mar 2007)

Log Message:
-----------
Move all distribution tests into a dedicated sub-directory

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/Makefile.am
    trunk/rkward/rkward/plugins/distributions.pluginmap

Added Paths:
-----------
    trunk/rkward/rkward/plugins/distributions/tests/
    trunk/rkward/rkward/plugins/distributions/tests/ad_test.php
    trunk/rkward/rkward/plugins/distributions/tests/ad_test.xml
    trunk/rkward/rkward/plugins/distributions/tests/cvm_test.php
    trunk/rkward/rkward/plugins/distributions/tests/cvm_test.xml
    trunk/rkward/rkward/plugins/distributions/tests/lillie_test.php
    trunk/rkward/rkward/plugins/distributions/tests/lillie_test.xml
    trunk/rkward/rkward/plugins/distributions/tests/pearson_test.php
    trunk/rkward/rkward/plugins/distributions/tests/pearson_test.xml
    trunk/rkward/rkward/plugins/distributions/tests/sf_test.php
    trunk/rkward/rkward/plugins/distributions/tests/sf_test.xml
    trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.php
    trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.xml

Removed Paths:
-------------
    trunk/rkward/rkward/plugins/distributions/ad_test.php
    trunk/rkward/rkward/plugins/distributions/ad_test.xml
    trunk/rkward/rkward/plugins/distributions/cvm_test.php
    trunk/rkward/rkward/plugins/distributions/cvm_test.xml
    trunk/rkward/rkward/plugins/distributions/lillie_test.php
    trunk/rkward/rkward/plugins/distributions/lillie_test.xml
    trunk/rkward/rkward/plugins/distributions/pearson_test.php
    trunk/rkward/rkward/plugins/distributions/pearson_test.xml
    trunk/rkward/rkward/plugins/distributions/sf_test.php
    trunk/rkward/rkward/plugins/distributions/sf_test.xml
    trunk/rkward/rkward/plugins/distributions/shapiro_test.php
    trunk/rkward/rkward/plugins/distributions/shapiro_test.xml

Modified: trunk/rkward/rkward/plugins/Makefile.am
===================================================================
--- trunk/rkward/rkward/plugins/Makefile.am	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/Makefile.am	2007-03-19 21:09:09 UTC (rev 1643)
@@ -142,18 +142,6 @@
 	distributions/tukey_probabilities.xml \
 	distributions/tukey_quantiles.php \
 	distributions/tukey_quantiles.xml \
-	distributions/shapiro_test.xml \
-	distributions/pearson_test.xml \
-	distributions/lillie_test.xml \
-	distributions/ad_test.xml \
-	distributions/cvm_test.xml \
-	distributions/sf_test.php \
-	distributions/shapiro_test.php \
-	distributions/pearson_test.php \
-	distributions/lillie_test.php \
-	distributions/sf_test.xml \
-	distributions/ad_test.php \
-	distributions/cvm_test.php \
 	distributions/plot_wilcoxon_distribution.php \
 	distributions/plot_gamma_distribution.php \
 	distributions/plot_gamma_distribution.xml \
@@ -225,6 +213,21 @@
 	distributions/clt/plot_negbinomial_clt.php \
 	distributions/clt/plot_poisson_clt.rkh
 
+pluginsXdistributionsXtestsdir = $(kde_datadir)/rkward/distributions/tests
+dist_pluginsXdistributionsXtests_DATA = \
+	distributions/tests/ad_test.php \
+	distributions/tests/ad_test.xml \
+	distributions/tests/lillie_test.xml \
+	distributions/tests/lillie_test.php \
+	distributions/tests/cvm_test.php \
+	distributions/tests/cvm_test.xml \
+	distributions/tests/sf_test.xml \
+	distributions/tests/sf_test.php \
+	distributions/tests/shapiro_test.php \
+	distributions/tests/shapiro_test.xml \
+	distributions/tests/pearson_test.php \
+	distributions/tests/pearson_test.xml
+
 pluginsXuni1D2dir = $(kde_datadir)/rkward/uni1.2
 dist_pluginsXuni1D2_DATA = \
 	uni1.2/code.php \

Deleted: trunk/rkward/rkward/plugins/distributions/ad_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/ad_test.php	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/ad_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,48 +0,0 @@
-<?
-function preprocess () {
-}
-
-function calculate () {
-$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-
-?>
-require(nortest)
-
-rk.temp.vars <- list (<? echo ($vars); ?>)
-rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
-local({
-i=0;
-for (rk.temp.var in rk.temp.vars) {
-	i = i+1
-	rk.temp.results$'Variable Name'[i] <<- rk.get.description (rk.temp.var, is.substitute=TRUE)
-	<? if (getRK_val ("length")) { ?>
-	try (rk.temp.results$'Length'[i] <<- length (eval (rk.temp.var)))
-	<? }
-	if (getRK_val ("nacount")) { ?>
-	try (rk.temp.results$'NAs'[i] <<- length (which(is.na(eval (rk.temp.var)))))
-	<? } ?>
-	try ({
-		rk.temp.test <- ad.test (eval (rk.temp.var))
-		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
-		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
-	})
-}
-})
-<?
-}
-
-function printout () {
-?>
-rk.header ("Anderson-Darling Normality Test")
-
-rk.results (rk.temp.results)
-<?
-}
-
-function cleanup () {
-
-?>
-rm (list=grep ("^rk.temp", ls (), value=TRUE))
-<?
-}
-?>
\ No newline at end of file

Deleted: trunk/rkward/rkward/plugins/distributions/ad_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/ad_test.xml	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/ad_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,30 +0,0 @@
-<!DOCTYPE rkplugin>
-
-<!-- This is the Anderson-Darling test for Normality -->
-
-<document>
-	<code file="ad_test.php"/>
-	<dialog label="Anderson-Darling Normality Test">
-		<tabbook>
-			<tab label="Select Variables" >
-				<row>
-					<column>
-						<varselector id="vars"/>
-					</column>
-					<column>
-						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="8"/>
-						<text>
-							Note: Objects must have at least 8 values
-						</text>
-						<stretch/>
-					</column>
-				</row>
-			</tab>
-			<tab label="Options">
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
-				<stretch/>
-			</tab>
-		</tabbook>
-	</dialog>
-</document>

Deleted: trunk/rkward/rkward/plugins/distributions/cvm_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/cvm_test.php	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/cvm_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,45 +0,0 @@
-<?
-        function preprocess () {
-        }
-
-	function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-
-?>
-require(nortest)
-
-rk.temp.vars <- list (<? echo ($vars); ?>)
-rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
-local({
-i=0;
-for (var in rk.temp.vars) {
-	i = i+1
-	rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
-	<? if (getRK_val ("length")) { ?>
-	rk.temp.results$'Length'[i] <<- try (length (eval (var)))
-	<? }
-	if (getRK_val ("nacount")) { ?>
-	rk.temp.results$'NAs'[i] <- try (length (which(is.na(eval (var)))))
-	<? } ?>
-	try ({
-		rk.temp.test <- cvm.test (eval (var))
-		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
-		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
-	})
-}
-})
-<?
-        }
-	function printout () {
-?>
-rk.header ("Cramer-von Mises Normality Test")
-rk.results (rk.temp.results)
-<?
-        }
-	function cleanup () {
-
-?>
-rm (list=grep ("^rk.temp", ls (), value=TRUE))
-<?
-        }
-?>
\ No newline at end of file

Deleted: trunk/rkward/rkward/plugins/distributions/cvm_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/cvm_test.xml	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/cvm_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,30 +0,0 @@
-<!DOCTYPE rkplugin>
-
-<!-- This is the Cramer-von Mises test for Normality -->
-
-<document>
-	<code file="cvm_test.php"/>
-	<dialog label="Cramer-von Mises Normality Test">
-		<tabbook>
-			<tab label="Select Variables" >
-				<row>
-					<column>
-						<varselector id="vars"/>
-					</column>
-					<column>
-						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="8"/>
-						<text>
-							Note: Objects must have at least 8 values
-						</text>
-						<stretch/>
-					</column>
-				</row>
-			</tab>
-			<tab label="Options">
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
-				<stretch/>
-			</tab>
-		</tabbook>
-	</dialog>
-</document>

Deleted: trunk/rkward/rkward/plugins/distributions/lillie_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/lillie_test.php	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/lillie_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,45 +0,0 @@
-<?
-        function preprocess () {
-        }
-
-	function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-
-?>
-require (nortest)
-
-rk.temp.vars <- list (<? echo ($vars); ?>)
-rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
-local({
-i=0;
-for (var in rk.temp.vars) {
-	i = i+1
-	rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
-	<? if (getRK_val ("length")) { ?>
-	rk.temp.results$'Length'[i] <<- try (length (eval (var)))
-	<? }
-	if (getRK_val ("nacount")) { ?>
-	rk.temp.results$'NAs'[i] <<- try (length (which(is.na(eval (var)))))
-	<? } ?>
-	try ({
-		rk.temp.test <<- lillie.test (eval (var))
-		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
-		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
-	})
-}
-})
-<?
-        }
-	function printout () {
-?>
-rk.header ("Lilliefors (Kolmogorov-Smirnov) Normality test")
-rk.results (rk.temp.results)
-<?
-        }
-	function cleanup () {
-
-?>
-rm (list=grep ("^rk.temp", ls (), value=TRUE))
-<?
-        }
-?>
\ No newline at end of file

Deleted: trunk/rkward/rkward/plugins/distributions/lillie_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/lillie_test.xml	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/lillie_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,30 +0,0 @@
-<!DOCTYPE rkplugin>
-
-<!-- This is the Lilliefors (Kolmogorov-Smirnov) Normality test-->
-
-<document>
-	<code file="lillie_test.php"/>
-	<dialog label="Lilliefors (Kolmogorov-Smirnov) Normality Test">
-		<tabbook>
-			<tab label="Select Variables" >
-				<row>
-					<column>
-						<varselector id="vars"/>
-					</column>
-					<column>
-						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="5"/>
-						<text>
-							Note: Objects must have at least 5 values
-						</text>
-						<stretch/>
-					</column>
-				</row>
-			</tab>
-			<tab label="Options">
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
-				<stretch/>
-			</tab>
-		</tabbook>
-	</dialog>
-</document>

Deleted: trunk/rkward/rkward/plugins/distributions/pearson_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/pearson_test.php	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/pearson_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,49 +0,0 @@
-<?
-        function preprocess () {
-        }
-
-	function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-	$adjust =  getRK_val ("adjust");
-
-?>
-require(nortest)
-
-rk.temp.vars <- list (<? echo ($vars); ?>)
-rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
-local({
-i=0;
-for (var in rk.temp.vars) {
-	i = i+1
-	rk.temp.results$'Variable Name'[i] <- rk.get.description (var, is.substitute=TRUE)
-	<? if (getRK_val ("length")) { ?>
-	rk.temp.results$'Length'[i] <<- try (length (eval (var)))
-	<? }
-	if (getRK_val ("nacount")) { ?>
-	rk.temp.results$'NAs'[i] <<- try (length (which(is.na(eval (var)))))
-	<? } ?>
-	try ({
-		rk.temp.test <- pearson.test (eval (var), <? echo $adjust; ?>)
-		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
-		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
-		rk.temp.results$'number of classes'[i] <<- rk.temp.test$n.classes
-		rk.temp.results$'degrees of freedom'[i] <<- rk.temp.test$df
-	})
-}
-})
-<?
-        }
-	function printout () {
-?>
-rk.header ("Pearson chi-square Normality Test",
-	parameters=list ("chi-square distribution with n.classes-3 df (TRUE) or chi-square distribution with n.classes-1 df (FALSE)", "<? getRK ("adjust"); ?>"))
-rk.results (rk.temp.results)
-<?
-        }
-	function cleanup () {
-
-?>
-rm (list=grep ("^rk.temp", ls (), value=TRUE))
-<?
-        }
-?>
\ No newline at end of file

Deleted: trunk/rkward/rkward/plugins/distributions/pearson_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/pearson_test.xml	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/pearson_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,34 +0,0 @@
-<!DOCTYPE rkplugin>
-
-<!-- This is the Cramer-von Mises test for Normality -->
-
-<document>
-	<code file="pearson_test.php"/>
-	<dialog label="Pearson chi-square Normality Test">
-		<tabbook>
-			<tab label="Select Variables" >
-				<row>
-					<column>
-						<varselector id="vars"/>
-					</column>
-					<column>
-						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="8"/>
-						<text>
-							Note: Objects must have at least 8 values
-						</text>
-						<stretch/>
-					</column>
-				</row>
-			</tab>
-			<tab label="Options">
-				<radio id="adjust" label="p-value from chi^2-distribution from:">
-					<option value="adjust = TRUE" label="n.classes-3 degrees of freedom" />
-					<option value="adjust = FALSE" label="n.classes-1 degrees of freedom" />
-				</radio>
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
-				<stretch/>
-			</tab>
-		</tabbook>
-	</dialog>
-</document>

Deleted: trunk/rkward/rkward/plugins/distributions/sf_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/sf_test.php	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/sf_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,45 +0,0 @@
-<?
-        function preprocess () {
-        }
-
-	function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-
-?>	
-require(nortest)
-
-rk.temp.vars <- list (<? echo ($vars); ?>)
-rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
-local({
-i=0;
-for (var in rk.temp.vars) {
-	i = i+1
-	rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
-	<? if (getRK_val ("length")) { ?>
-	rk.temp.results$'Length'[i] <<- try (length (eval (var)))
-	<? }
-	if (getRK_val ("nacount")) { ?>
-	rk.temp.results$'NAs'[i] <<- try (length (which(is.na(eval (var)))))
-	<? } ?>
-	try ({
-		rk.temp.test <- sf.test (eval (var))
-		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
-		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
-	})
-}
-})
-<?
-        }
-	function printout () {
-?>	
-rk.header ("Shapiro-Francia Normality Test")
-rk.results (rk.temp.results)
-<?
-        }
-	function cleanup () {
-
-?>
-rm (list=grep ("^rk.temp", ls (), value=TRUE))
-<?
-        }
-?>
\ No newline at end of file

Deleted: trunk/rkward/rkward/plugins/distributions/sf_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/sf_test.xml	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/sf_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,30 +0,0 @@
-<!DOCTYPE rkplugin>
-
-<!-- This is the Shapiro-Francia test for Normality -->
-
-<document>
-	<code file="sf_test.php"/>
-	<dialog label="Shapiro-Wilk Normality Test">
-		<tabbook>
-			<tab label="Select Variables" >
-				<row>
-					<column>
-						<varselector id="vars"/>
-					</column>
-					<column>
-						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="5" max_lenght="5000"/>
-						<text>
-							Note: Objects must have between 5 and 5000 values
-						</text>
-						<stretch/>
-					</column>
-				</row>
-			</tab>
-			<tab label="Options">
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
-				<stretch/>
-			</tab>
-		</tabbook>
-	</dialog>
-</document>
\ No newline at end of file

Deleted: trunk/rkward/rkward/plugins/distributions/shapiro_test.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/shapiro_test.php	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/shapiro_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,44 +0,0 @@
-<?
-        function preprocess () {
-        }
-
-	function calculate () {
-	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
-
-?>
-
-rk.temp.vars <- list (<? echo ($vars); ?>)
-rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
-local({
-i=0;
-for (var in rk.temp.vars) {
-	i = i+1
-	rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
-	<? if (getRK_val ("length")) { ?>
-	rk.temp.results$'Length'[i] <<- try (length (eval (var)))
-	<? }
-	if (getRK_val ("nacount")) { ?>
-	rk.temp.results$'NAs'[i] <<- try (length (which(is.na(eval (var)))))
-	<? } ?>
-	try ({
-		rk.temp.test <- shapiro.test (eval (var))
-		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
-		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
-	})
-}
-})
-<?
-        }
-	function printout () {
-?>
-rk.header ("Shapiro-Wilk Normality Test")
-rk.results (rk.temp.results)
-<?
-        }
-	function cleanup () {
-
-?>
-rm (list=grep ("^rk.temp", ls (), value=TRUE))
-<?
-        }
-?>
\ No newline at end of file

Deleted: trunk/rkward/rkward/plugins/distributions/shapiro_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/shapiro_test.xml	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions/shapiro_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -1,30 +0,0 @@
-<!DOCTYPE rkplugin>
-
-<!-- This is the Shapiro-Wilk’s test for Normality -->
-
-<document>
-	<code file="shapiro_test.php"/>
-	<dialog label="Shapiro-Wilk Normality Test">
-		<tabbook>
-			<tab label="Select Variables" >
-				<row>
-					<column>
-						<varselector id="vars"/>
-					</column>
-					<column>
-						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="3" max_length="5000"/>
-						<text>
-							Note: Objects must have between 3 and 5000 values
-						</text>
-						<stretch/>
-					</column>
-				</row>
-			</tab>
-			<tab label="Options">
-				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
-				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
-				<stretch/>
-			</tab>
-		</tabbook>
-	</dialog>
-</document>

Copied: trunk/rkward/rkward/plugins/distributions/tests/ad_test.php (from rev 1638, trunk/rkward/rkward/plugins/distributions/ad_test.php)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/ad_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/ad_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,48 @@
+<?
+function preprocess () {
+}
+
+function calculate () {
+$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+
+?>
+require(nortest)
+
+rk.temp.vars <- list (<? echo ($vars); ?>)
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
+local({
+i=0;
+for (rk.temp.var in rk.temp.vars) {
+	i = i+1
+	rk.temp.results$'Variable Name'[i] <<- rk.get.description (rk.temp.var, is.substitute=TRUE)
+	<? if (getRK_val ("length")) { ?>
+	try (rk.temp.results$'Length'[i] <<- length (eval (rk.temp.var)))
+	<? }
+	if (getRK_val ("nacount")) { ?>
+	try (rk.temp.results$'NAs'[i] <<- length (which(is.na(eval (rk.temp.var)))))
+	<? } ?>
+	try ({
+		rk.temp.test <- ad.test (eval (rk.temp.var))
+		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
+		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
+	})
+}
+})
+<?
+}
+
+function printout () {
+?>
+rk.header ("Anderson-Darling Normality Test")
+
+rk.results (rk.temp.results)
+<?
+}
+
+function cleanup () {
+
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+}
+?>
\ No newline at end of file

Copied: trunk/rkward/rkward/plugins/distributions/tests/ad_test.xml (from rev 1638, trunk/rkward/rkward/plugins/distributions/ad_test.xml)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/ad_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/ad_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,30 @@
+<!DOCTYPE rkplugin>
+
+<!-- This is the Anderson-Darling test for Normality -->
+
+<document>
+	<code file="ad_test.php"/>
+	<dialog label="Anderson-Darling Normality Test">
+		<tabbook>
+			<tab label="Select Variables" >
+				<row>
+					<column>
+						<varselector id="vars"/>
+					</column>
+					<column>
+						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="8"/>
+						<text>
+							Note: Objects must have at least 8 values
+						</text>
+						<stretch/>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options">
+				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
+				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<stretch/>
+			</tab>
+		</tabbook>
+	</dialog>
+</document>

Copied: trunk/rkward/rkward/plugins/distributions/tests/cvm_test.php (from rev 1638, trunk/rkward/rkward/plugins/distributions/cvm_test.php)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/cvm_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/cvm_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,45 @@
+<?
+        function preprocess () {
+        }
+
+	function calculate () {
+	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+
+?>
+require(nortest)
+
+rk.temp.vars <- list (<? echo ($vars); ?>)
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
+local({
+i=0;
+for (var in rk.temp.vars) {
+	i = i+1
+	rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
+	<? if (getRK_val ("length")) { ?>
+	rk.temp.results$'Length'[i] <<- try (length (eval (var)))
+	<? }
+	if (getRK_val ("nacount")) { ?>
+	rk.temp.results$'NAs'[i] <- try (length (which(is.na(eval (var)))))
+	<? } ?>
+	try ({
+		rk.temp.test <- cvm.test (eval (var))
+		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
+		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
+	})
+}
+})
+<?
+        }
+	function printout () {
+?>
+rk.header ("Cramer-von Mises Normality Test")
+rk.results (rk.temp.results)
+<?
+        }
+	function cleanup () {
+
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+        }
+?>
\ No newline at end of file

Copied: trunk/rkward/rkward/plugins/distributions/tests/cvm_test.xml (from rev 1638, trunk/rkward/rkward/plugins/distributions/cvm_test.xml)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/cvm_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/cvm_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,30 @@
+<!DOCTYPE rkplugin>
+
+<!-- This is the Cramer-von Mises test for Normality -->
+
+<document>
+	<code file="cvm_test.php"/>
+	<dialog label="Cramer-von Mises Normality Test">
+		<tabbook>
+			<tab label="Select Variables" >
+				<row>
+					<column>
+						<varselector id="vars"/>
+					</column>
+					<column>
+						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="8"/>
+						<text>
+							Note: Objects must have at least 8 values
+						</text>
+						<stretch/>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options">
+				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
+				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<stretch/>
+			</tab>
+		</tabbook>
+	</dialog>
+</document>

Copied: trunk/rkward/rkward/plugins/distributions/tests/lillie_test.php (from rev 1638, trunk/rkward/rkward/plugins/distributions/lillie_test.php)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/lillie_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/lillie_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,45 @@
+<?
+        function preprocess () {
+        }
+
+	function calculate () {
+	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+
+?>
+require (nortest)
+
+rk.temp.vars <- list (<? echo ($vars); ?>)
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
+local({
+i=0;
+for (var in rk.temp.vars) {
+	i = i+1
+	rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
+	<? if (getRK_val ("length")) { ?>
+	rk.temp.results$'Length'[i] <<- try (length (eval (var)))
+	<? }
+	if (getRK_val ("nacount")) { ?>
+	rk.temp.results$'NAs'[i] <<- try (length (which(is.na(eval (var)))))
+	<? } ?>
+	try ({
+		rk.temp.test <<- lillie.test (eval (var))
+		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
+		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
+	})
+}
+})
+<?
+        }
+	function printout () {
+?>
+rk.header ("Lilliefors (Kolmogorov-Smirnov) Normality test")
+rk.results (rk.temp.results)
+<?
+        }
+	function cleanup () {
+
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+        }
+?>
\ No newline at end of file

Copied: trunk/rkward/rkward/plugins/distributions/tests/lillie_test.xml (from rev 1638, trunk/rkward/rkward/plugins/distributions/lillie_test.xml)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/lillie_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/lillie_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,30 @@
+<!DOCTYPE rkplugin>
+
+<!-- This is the Lilliefors (Kolmogorov-Smirnov) Normality test-->
+
+<document>
+	<code file="lillie_test.php"/>
+	<dialog label="Lilliefors (Kolmogorov-Smirnov) Normality Test">
+		<tabbook>
+			<tab label="Select Variables" >
+				<row>
+					<column>
+						<varselector id="vars"/>
+					</column>
+					<column>
+						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="5"/>
+						<text>
+							Note: Objects must have at least 5 values
+						</text>
+						<stretch/>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options">
+				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
+				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<stretch/>
+			</tab>
+		</tabbook>
+	</dialog>
+</document>

Copied: trunk/rkward/rkward/plugins/distributions/tests/pearson_test.php (from rev 1638, trunk/rkward/rkward/plugins/distributions/pearson_test.php)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/pearson_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/pearson_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,49 @@
+<?
+        function preprocess () {
+        }
+
+	function calculate () {
+	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+	$adjust =  getRK_val ("adjust");
+
+?>
+require(nortest)
+
+rk.temp.vars <- list (<? echo ($vars); ?>)
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
+local({
+i=0;
+for (var in rk.temp.vars) {
+	i = i+1
+	rk.temp.results$'Variable Name'[i] <- rk.get.description (var, is.substitute=TRUE)
+	<? if (getRK_val ("length")) { ?>
+	rk.temp.results$'Length'[i] <<- try (length (eval (var)))
+	<? }
+	if (getRK_val ("nacount")) { ?>
+	rk.temp.results$'NAs'[i] <<- try (length (which(is.na(eval (var)))))
+	<? } ?>
+	try ({
+		rk.temp.test <- pearson.test (eval (var), <? echo $adjust; ?>)
+		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
+		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
+		rk.temp.results$'number of classes'[i] <<- rk.temp.test$n.classes
+		rk.temp.results$'degrees of freedom'[i] <<- rk.temp.test$df
+	})
+}
+})
+<?
+        }
+	function printout () {
+?>
+rk.header ("Pearson chi-square Normality Test",
+	parameters=list ("chi-square distribution with n.classes-3 df (TRUE) or chi-square distribution with n.classes-1 df (FALSE)", "<? getRK ("adjust"); ?>"))
+rk.results (rk.temp.results)
+<?
+        }
+	function cleanup () {
+
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+        }
+?>
\ No newline at end of file

Copied: trunk/rkward/rkward/plugins/distributions/tests/pearson_test.xml (from rev 1638, trunk/rkward/rkward/plugins/distributions/pearson_test.xml)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/pearson_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/pearson_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,34 @@
+<!DOCTYPE rkplugin>
+
+<!-- This is the Cramer-von Mises test for Normality -->
+
+<document>
+	<code file="pearson_test.php"/>
+	<dialog label="Pearson chi-square Normality Test">
+		<tabbook>
+			<tab label="Select Variables" >
+				<row>
+					<column>
+						<varselector id="vars"/>
+					</column>
+					<column>
+						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="8"/>
+						<text>
+							Note: Objects must have at least 8 values
+						</text>
+						<stretch/>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options">
+				<radio id="adjust" label="p-value from chi^2-distribution from:">
+					<option value="adjust = TRUE" label="n.classes-3 degrees of freedom" />
+					<option value="adjust = FALSE" label="n.classes-1 degrees of freedom" />
+				</radio>
+				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
+				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<stretch/>
+			</tab>
+		</tabbook>
+	</dialog>
+</document>

Copied: trunk/rkward/rkward/plugins/distributions/tests/sf_test.php (from rev 1638, trunk/rkward/rkward/plugins/distributions/sf_test.php)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/sf_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/sf_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,45 @@
+<?
+        function preprocess () {
+        }
+
+	function calculate () {
+	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+
+?>	
+require(nortest)
+
+rk.temp.vars <- list (<? echo ($vars); ?>)
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
+local({
+i=0;
+for (var in rk.temp.vars) {
+	i = i+1
+	rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
+	<? if (getRK_val ("length")) { ?>
+	rk.temp.results$'Length'[i] <<- try (length (eval (var)))
+	<? }
+	if (getRK_val ("nacount")) { ?>
+	rk.temp.results$'NAs'[i] <<- try (length (which(is.na(eval (var)))))
+	<? } ?>
+	try ({
+		rk.temp.test <- sf.test (eval (var))
+		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
+		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
+	})
+}
+})
+<?
+        }
+	function printout () {
+?>	
+rk.header ("Shapiro-Francia Normality Test")
+rk.results (rk.temp.results)
+<?
+        }
+	function cleanup () {
+
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+        }
+?>
\ No newline at end of file

Copied: trunk/rkward/rkward/plugins/distributions/tests/sf_test.xml (from rev 1638, trunk/rkward/rkward/plugins/distributions/sf_test.xml)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/sf_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/sf_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,30 @@
+<!DOCTYPE rkplugin>
+
+<!-- This is the Shapiro-Francia test for Normality -->
+
+<document>
+	<code file="sf_test.php"/>
+	<dialog label="Shapiro-Wilk Normality Test">
+		<tabbook>
+			<tab label="Select Variables" >
+				<row>
+					<column>
+						<varselector id="vars"/>
+					</column>
+					<column>
+						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="5" max_lenght="5000"/>
+						<text>
+							Note: Objects must have between 5 and 5000 values
+						</text>
+						<stretch/>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options">
+				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
+				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<stretch/>
+			</tab>
+		</tabbook>
+	</dialog>
+</document>
\ No newline at end of file

Copied: trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.php (from rev 1638, trunk/rkward/rkward/plugins/distributions/shapiro_test.php)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.php	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,44 @@
+<?
+        function preprocess () {
+        }
+
+	function calculate () {
+	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+
+?>
+
+rk.temp.vars <- list (<? echo ($vars); ?>)
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.vars)), check.names=FALSE)
+local({
+i=0;
+for (var in rk.temp.vars) {
+	i = i+1
+	rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
+	<? if (getRK_val ("length")) { ?>
+	rk.temp.results$'Length'[i] <<- try (length (eval (var)))
+	<? }
+	if (getRK_val ("nacount")) { ?>
+	rk.temp.results$'NAs'[i] <<- try (length (which(is.na(eval (var)))))
+	<? } ?>
+	try ({
+		rk.temp.test <- shapiro.test (eval (var))
+		rk.temp.results$'Statistic'[i] <<- paste (names (rk.temp.test$statistic), rk.temp.test$statistic, sep=" = ")
+		rk.temp.results$'p-value'[i] <<- rk.temp.test$p.value
+	})
+}
+})
+<?
+        }
+	function printout () {
+?>
+rk.header ("Shapiro-Wilk Normality Test")
+rk.results (rk.temp.results)
+<?
+        }
+	function cleanup () {
+
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+        }
+?>
\ No newline at end of file

Copied: trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.xml (from rev 1638, trunk/rkward/rkward/plugins/distributions/shapiro_test.xml)
===================================================================
--- trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/tests/shapiro_test.xml	2007-03-19 21:09:09 UTC (rev 1643)
@@ -0,0 +1,30 @@
+<!DOCTYPE rkplugin>
+
+<!-- This is the Shapiro-Wilk’s test for Normality -->
+
+<document>
+	<code file="shapiro_test.php"/>
+	<dialog label="Shapiro-Wilk Normality Test">
+		<tabbook>
+			<tab label="Select Variables" >
+				<row>
+					<column>
+						<varselector id="vars"/>
+					</column>
+					<column>
+						<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):" min_length="3" max_length="5000"/>
+						<text>
+							Note: Objects must have between 3 and 5000 values
+						</text>
+						<stretch/>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options">
+				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="true" />
+				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				<stretch/>
+			</tab>
+		</tabbook>
+	</dialog>
+</document>

Modified: trunk/rkward/rkward/plugins/distributions.pluginmap
===================================================================
--- trunk/rkward/rkward/plugins/distributions.pluginmap	2007-03-19 21:05:37 UTC (rev 1642)
+++ trunk/rkward/rkward/plugins/distributions.pluginmap	2007-03-19 21:09:09 UTC (rev 1643)
@@ -3,12 +3,12 @@
 <document base_prefix="distributions/" namespace="rkward">
 	<components>
 
-		<component type="standard" id="shapiro_test" file="shapiro_test.xml" label="Shapiro-Wilk Normality Test" />
-		<component type="standard" id="ad_test" file="ad_test.xml" label="Anderson-Darling Normality Test" />
-		<component type="standard" id="cvm_test" file="cvm_test.xml" label="Cramer-von Mises Normality Test" />
-		<component type="standard" id="pearson_test" file="pearson_test.xml" label="Pearson chi-square Normality Test" />
-		<component type="standard" id="sf_test" file="sf_test.xml" label="Shapiro-Francia Normality Test" />
-		<component type="standard" id="lillie_test" file="lillie_test.xml" label="Lilliefors (Kolmogorov-Smirnov) Normality Test" />
+		<component type="standard" id="shapiro_test" file="tests/shapiro_test.xml" label="Shapiro-Wilk Normality Test" />
+		<component type="standard" id="ad_test" file="tests/ad_test.xml" label="Anderson-Darling Normality Test" />
+		<component type="standard" id="cvm_test" file="tests/cvm_test.xml" label="Cramer-von Mises Normality Test" />
+		<component type="standard" id="pearson_test" file="tests/pearson_test.xml" label="Pearson chi-square Normality Test" />
+		<component type="standard" id="sf_test" file="tests/sf_test.xml" label="Shapiro-Francia Normality Test" />
+		<component type="standard" id="lillie_test" file="tests/lillie_test.xml" label="Lilliefors (Kolmogorov-Smirnov) Normality Test" />
 
 		<component type="standard" id="beta_quantiles" file="beta_quantiles.xml" label="Beta quantiles" />
 		<component type="standard" id="beta_probabilities" file="beta_probabilities.xml" label="Beta probabilities" />


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