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

sjar at users.sourceforge.net sjar at users.sourceforge.net
Thu Feb 22 19:07:37 UTC 2007


Revision: 1437
          http://svn.sourceforge.net/rkward/?rev=1437&view=rev
Author:   sjar
Date:     2007-02-22 11:07:37 -0800 (Thu, 22 Feb 2007)

Log Message:
-----------
Buch of changes here (@Thomas: hope its okay to send them as a buch)

* new folder /moments/ which includes all test of moments package
* agostino.test moved here
* fixed bug for agostino.test 
* help for agostino.test 

* new anscombe.test (including help)
* new bonett.test (including help)
* new moment test (including help)

* skewness_kurtosis moved here (help added)

Added Paths:
-----------
    trunk/rkward/rkward/plugins/analysis/moments/
    trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php
    trunk/rkward/rkward/plugins/analysis/moments/agostino_test.rkh
    trunk/rkward/rkward/plugins/analysis/moments/agostino_test.xml
    trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.php
    trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.rkh
    trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.xml
    trunk/rkward/rkward/plugins/analysis/moments/bonett_test.php
    trunk/rkward/rkward/plugins/analysis/moments/bonett_test.rkh
    trunk/rkward/rkward/plugins/analysis/moments/bonett_test.xml
    trunk/rkward/rkward/plugins/analysis/moments/moment.php
    trunk/rkward/rkward/plugins/analysis/moments/moment.rkh
    trunk/rkward/rkward/plugins/analysis/moments/moment.xml
    trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.php
    trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.rkh
    trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.xml

Added: trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,46 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+
+?>
+require(moments)
+
+rk.temp.objects <- list (<? echo ($vars); ?>)
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.objects)), check.names=FALSE)
+i=0;
+for (var in rk.temp.objects) {
+	i = i+1
+	rk.temp.results$'Variable Name'[i] <- rk.get.description (var, is.substitute=TRUE)
+	try ({
+		rk.temp.t <- agostino.test (eval (var), alternative = "<? getRK ("alternative"); ?>")
+		rk.temp.results$'skewness estimator (skew)'[i] <- rk.temp.t$statistic["skew"]
+		rk.temp.results$'transformation (z)'[i] <- rk.temp.t$statistic["z"]
+		rk.temp.results$'p-value'[i] <- rk.temp.t$p.value
+	})
+	<? if (getRK_val ("length")) { ?>
+	try (rk.temp.results$'Length'[i] <- length (eval (var)))
+	<? }
+	if (getRK_val ("nacount")) { ?>
+	try (rk.temp.results$'NAs'[i] <- length (which(is.na(eval (var)))))
+	<? } ?>
+}
+<?
+        }
+
+function printout () {
+?>
+rk.header ("D'Agostino test of skewness",
+	parameters=list ("Alternative Hypothesis", "<? getRK ("alternative"); ?>"))
+rk.results (rk.temp.results)
+<?
+}
+
+function cleanup () {
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+}
+?>


Property changes on: trunk/rkward/rkward/plugins/analysis/moments/agostino_test.php
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/rkward/rkward/plugins/analysis/moments/agostino_test.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/agostino_test.rkh	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/agostino_test.rkh	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,30 @@
+<!DOCTYPE rkhelp>
+<document>
+	<summary>
+		This test performs the D'Agostino test for skewness in normally distributed data.
+	</summary>
+
+	<usage>
+		Chose the data to perform the D'Agostino test for skewness in normally distributed data. You can chose multiple data.
+	</usage>
+
+	<settings>
+		<caption id="tab_variables"/>
+		<setting id="x">Select the data to be computed. The vectors need to be numeric, and can be of different length.</setting>
+		<setting id="alternative">Here you can specify the alternative hypothesis. It must be one of "two sided", "greater" or "less".</setting>
+		<setting id="length">If checked, the length of the data vectors will be shown. However, this will not effect your results but is just an optional information.</setting>
+		<setting id="nacount">If checked, and in case of missing values this will show you the number of those. However, this will not effect your results but is just an optional information.</setting>
+	</settings>
+	<related>
+		<ul>
+			<li><link href="rkward://rhelp/agostino.test"/></li>
+			<li><link href="rkward://rhelp/bonett.test"/></li>
+			<li><link href="rkward://rhelp/skewness"/></li>
+			<li><link href="rkward://rhelp/geary"/></li>
+			<li><link href="rkward://rhelp/kurtosis"/></li>
+			<li><link href="rkward://rhelp/moment"/></li>
+			<li><link href="rkward://rhelp/anscombe.test"/></li>
+		</ul>
+
+	</related>
+</document>

Added: trunk/rkward/rkward/plugins/analysis/moments/agostino_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/agostino_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/agostino_test.xml	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,33 @@
+<!DOCTYPE rkplugin>
+
+
+<document>
+	<code file="agostino_test.php"/>	
+	<help file="agostino_test.rkh" />
+	
+	<dialog label="D'Agostino test of skewness">
+		<tabbook>
+			<tab label="Basic settings">
+				<row>
+					<varselector id="vars"/>
+					<column>
+						<varslot type="numeric" id="x" multi="true" source="vars" required="true" label="variable(s):"/>
+						<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">
+				<frame label="additional settings">
+					<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" />
+				</frame>
+				
+			</tab>
+		</tabbook>
+	</dialog>
+	
+</document>


Property changes on: trunk/rkward/rkward/plugins/analysis/moments/agostino_test.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.php	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,46 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+
+?>
+require(moments)
+
+rk.temp.objects <- list (<? echo ($vars); ?>)
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.objects)), check.names=FALSE)
+i=0;
+for (var in rk.temp.objects) {
+	i = i+1
+	rk.temp.results$'Variable Name'[i] <- rk.get.description (var, is.substitute=TRUE)
+	try ({
+		rk.temp.t <- anscombe.test (eval (var), alternative = "<? getRK ("alternative"); ?>")
+		rk.temp.results$'kurtosis estimator (tau)'[i] <- rk.temp.t$statistic["tau"]
+		rk.temp.results$'transformation (z)'[i] <- rk.temp.t$statistic["z"]
+		rk.temp.results$'p-value'[i] <- rk.temp.t$p.value
+	})
+	<? if (getRK_val ("length")) { ?>
+	try (rk.temp.results$'Length'[i] <- length (eval (var)))
+	<? }
+	if (getRK_val ("nacount")) { ?>
+	try (rk.temp.results$'NAs'[i] <- length (which(is.na(eval (var)))))
+	<? } ?>
+}
+<?
+        }
+
+function printout () {
+?>
+rk.header ("Anscombe-Glynn test of kurtosis",
+	parameters=list ("Alternative Hypothesis", "<? getRK ("alternative"); ?>"))
+rk.results (rk.temp.results)
+<?
+}
+
+function cleanup () {
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+}
+?>

Added: trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.rkh	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.rkh	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,30 @@
+<!DOCTYPE rkhelp>
+<document>
+	<summary>
+		This test performs the Anscombe-Glynn test of kurtosis for normal samples.
+	</summary>
+
+	<usage>
+		Chose the data to perform the Anscombe-Glynn test of kurtosis for normal samples. You can chose multiple data.
+	</usage>
+
+	<settings>
+		<caption id="tab_variables"/>
+		<setting id="x">Select the data to be computed. The vectors need to be numeric, and can be of different length.</setting>
+		<setting id="alternative">Here you can specify the alternative hypothesis. It must be one of "two sided", "greater" or "less".</setting>
+		<setting id="length">If checked, the length of the data vectors will be shown. However, this will not effect your results but is just an optional information.</setting>
+		<setting id="nacount">If checked, and in case of missing values this will show you the number of those. However, this will not effect your results but is just an optional information.</setting>
+	</settings>
+	<related>
+		<ul>
+			<li><link href="rkward://rhelp/anscombe.test"/></li>
+			<li><link href="rkward://rhelp/bonett.test"/></li>
+			<li><link href="rkward://rhelp/skewness"/></li>
+			<li><link href="rkward://rhelp/geary"/></li>
+			<li><link href="rkward://rhelp/kurtosis"/></li>
+			<li><link href="rkward://rhelp/agostino.test"/></li>
+			<li><link href="rkward://rhelp/moment"/></li>
+		</ul>
+
+	</related>
+</document>

Added: trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/anscombe_test.xml	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,33 @@
+<!DOCTYPE rkplugin>
+
+
+<document>
+	<code file="anscombe_test.php"/>	
+	<help file="anscombe_test.rkh" />
+	
+	<dialog label="Anscombe-Glynn test of kurtosis">
+		<tabbook>
+			<tab label="Basic settings">
+				<row>
+					<varselector id="vars"/>
+					<column>
+						<varslot type="numeric" id="x" multi="true" source="vars" required="true" label="variable(s):"/>
+						<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">
+				<frame label="additional settings">
+					<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" />
+				</frame>
+				
+			</tab>
+		</tabbook>
+	</dialog>
+	
+</document>

Added: trunk/rkward/rkward/plugins/analysis/moments/bonett_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/bonett_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/bonett_test.php	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,46 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+
+?>
+require(moments)
+
+rk.temp.objects <- list (<? echo ($vars); ?>)
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.objects)), check.names=FALSE)
+i=0;
+for (var in rk.temp.objects) {
+	i = i+1
+	rk.temp.results$'Variable Name'[i] <- rk.get.description (var, is.substitute=TRUE)
+	try ({
+		rk.temp.t <- bonett.test (eval (var), alternative = "<? getRK ("alternative"); ?>")
+		rk.temp.results$'kurtosis estimator (tau)'[i] <- rk.temp.t$statistic["tau"]
+		rk.temp.results$'transformation (z)'[i] <- rk.temp.t$statistic["z"]
+		rk.temp.results$'p-value'[i] <- rk.temp.t$p.value
+	})
+	<? if (getRK_val ("length")) { ?>
+	try (rk.temp.results$'Length'[i] <- length (eval (var)))
+	<? }
+	if (getRK_val ("nacount")) { ?>
+	try (rk.temp.results$'NAs'[i] <- length (which(is.na(eval (var)))))
+	<? } ?>
+}
+<?
+        }
+
+function printout () {
+?>
+rk.header ("Bonett-Seier test of Geary's kurtosis",
+	parameters=list ("Alternative Hypothesis", "<? getRK ("alternative"); ?>"))
+rk.results (rk.temp.results)
+<?
+}
+
+function cleanup () {
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+}
+?>

Added: trunk/rkward/rkward/plugins/analysis/moments/bonett_test.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/bonett_test.rkh	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/bonett_test.rkh	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,30 @@
+<!DOCTYPE rkhelp>
+<document>
+	<summary>
+		This test performs the Bonett-Seier test of Geary's measure of kurtosis for normally distributed data.
+	</summary>
+
+	<usage>
+		Chose the data to perform the Bonett-Seier test of Geary's measure of kurtosis for normally distributed data. You can chose multiple data.
+	</usage>
+
+	<settings>
+		<caption id="tab_variables"/>
+		<setting id="x">Select the data to be computed. The vectors need to be numeric, and can be of different length.</setting>
+		<setting id="alternative">Here you can specify the alternative hypothesis. It must be one of "two sided", "greater" or "less".</setting>
+		<setting id="length">If checked, the length of the data vectors will be shown. However, this will not effect your results but is just an optional information.</setting>
+		<setting id="nacount">If checked, and in case of missing values this will show you the number of those. However, this will not effect your results but is just an optional information.</setting>
+	</settings>
+	<related>
+		<ul>
+			<li><link href="rkward://rhelp/bonett.test"/></li>
+			<li><link href="rkward://rhelp/skewness"/></li>
+			<li><link href="rkward://rhelp/geary"/></li>
+			<li><link href="rkward://rhelp/kurtosis"/></li>
+			<li><link href="rkward://rhelp/agostino.test"/></li>
+			<li><link href="rkward://rhelp/moment"/></li>
+			<li><link href="rkward://rhelp/anscombe.test"/></li>
+		</ul>
+
+	</related>
+</document>

Added: trunk/rkward/rkward/plugins/analysis/moments/bonett_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/bonett_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/bonett_test.xml	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,33 @@
+<!DOCTYPE rkplugin>
+
+
+<document>
+	<code file="bonett_test.php"/>	
+	<help file="bonett_test.rkh" />
+	
+	<dialog label="Bonett-Seier test of Geary's kurtosis">
+		<tabbook>
+			<tab label="Basic settings">
+				<row>
+					<varselector id="vars"/>
+					<column>
+						<varslot type="numeric" id="x" multi="true" source="vars" required="true" label="variable(s):"/>
+						<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">
+				<frame label="additional settings">
+					<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" />
+				</frame>
+				
+			</tab>
+		</tabbook>
+	</dialog>
+	
+</document>

Added: trunk/rkward/rkward/plugins/analysis/moments/moment.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/moment.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/moment.php	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,41 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+
+?>
+require(moments)
+
+rk.temp.objects <- list (<? echo ($vars); ?>)
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.objects)), check.names=FALSE)
+i=0;
+for (var in rk.temp.objects) {
+	i = i+1
+	rk.temp.results$'Variable Name'[i] <- rk.get.description (var, is.substitute=TRUE)
+	try (rk.temp.results$'Moment'[i] <- moment (eval (var), central = <? getRK ("central"); ?>, absolute = <? getRK ("absolute"); ?>, na.rm = <? getRK ("narm"); ?>))
+	<? if (getRK_val ("length")) { ?>
+	try (rk.temp.results$'Length'[i] <- length (eval (var)))
+	<? }
+	if (getRK_val ("nacount")) { ?>
+	try (rk.temp.results$'NAs'[i] <- length (which(is.na(eval (var)))))
+	<? } ?>
+}
+<?
+        }
+
+function printout () {
+?>
+rk.header ("Statistical Moment",
+	parameters=list ("Compute central moments", "<? getRK ("central"); ?>","Compute absolute moments", "<? getRK ("absolute"); ?>", "Remove missing values", "<? getRK ("narm"); ?>"))
+rk.results (rk.temp.results)
+<?
+}
+
+function cleanup () {
+?>
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
+<?
+}
+?>

Added: trunk/rkward/rkward/plugins/analysis/moments/moment.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/moment.rkh	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/moment.rkh	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,33 @@
+<!DOCTYPE rkhelp>
+<document>
+	<summary>
+This test computes the sample moment of specified order.
+	</summary>
+
+	<usage>
+Chose the data to computes the sample moments. You can chose multiple data.
+	</usage>
+
+	<settings>
+		<caption id="tab_variables"/>
+		<setting id="x">Select the data to be computed. The vectors need to be numeric, and can be of different length.</setting>
+		<caption id="tab_options"/>
+		<setting id="central">If checked,  central moments are computed.</setting>
+		<setting id="absolute">If checked, absolute moments are computed</setting>
+		<setting id="narm">If checked, missing values will be excluded from calculation.</setting>
+		<setting id="length">If checked, the length of the data vectors will be shown. However, this will not effect your results but is just an optional information.</setting>
+		<setting id="nacount">If checked, and in case of missing values this will show you the number of those. However, this will not effect your results but is just an optional information.</setting>
+	</settings>
+	<related>
+		<ul>
+			<li><link href="rkward://rhelp/moment"/></li>
+			<li><link href="rkward://rhelp/skewness"/></li>
+			<li><link href="rkward://rhelp/geary"/></li>
+			<li><link href="rkward://rhelp/kurtosis"/></li>
+			<li><link href="rkward://rhelp/agostino.test"/></li>
+			<li><link href="rkward://rhelp/anscombe.test"/></li>
+			<li><link href="rkward://rhelp/bonett.test"/></li>
+		</ul>
+
+	</related>
+</document>

Added: trunk/rkward/rkward/plugins/analysis/moments/moment.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/moment.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/moment.xml	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,34 @@
+<!DOCTYPE rkplugin>
+
+
+<document>
+	<code file="moment.php"/>	
+	<help file="moment.rkh" />
+	
+	<dialog label="sample moment">
+		<tabbook>
+			<tab label="Basic settings">
+				<row>
+					<varselector id="vars"/>
+					<column>
+						<varslot type="numeric" id="x" multi="true" source="vars" required="true" label="variable(s):"/>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options">
+				<spinbox type="integer" id="order" label="Order" initial="1"/>
+				<frame label="specific test settings">
+					<checkbox id="central" label="compute central moments" checked="false" value="TRUE" value_unchecked="FALSE" />
+					<checkbox id="absolute" label="compute absolute moments" checked="false" value="TRUE" value_unchecked="FALSE" />
+					<checkbox id="narm" label="remove missing values" checked="false" value="TRUE" value_unchecked="FALSE" />
+				</frame>
+				<frame label="additional settings">
+					<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="false" />
+					<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+				</frame>
+				
+			</tab>
+		</tabbook>
+	</dialog>
+	
+</document>

Added: trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.php	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,50 @@
+<?
+        function preprocess () {
+        }
+
+	function calculate () {
+	$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
+
+?>
+require(moments)
+
+rk.temp.objects <- list (<? echo ($vars); ?>)
+rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.objects)), check.names=FALSE)
+i=0;
+for (var in rk.temp.objects) {
+	i = i+1
+	rk.temp.results$'Variable Name'[i] <- rk.get.description (var, is.substitute=TRUE)
+	<? 
+	if (getRK_val ("skewness")) { ?>
+	try (rk.temp.results$'Skewness'[i] <- skewness (eval (var), <? getRK ("narm_skewness"); ?>))
+	<? }
+	if (getRK_val ("kurtosis")) { ?>
+	try (rk.temp.results$'Kurtosis'[i] <- kurtosis (eval (var), <? getRK ("narm_kurtosis"); ?>))
+	<? }
+	if (getRK_val ("geary")) { ?>
+	try (rk.temp.results$'Geary kurtosis'[i] <- geary (eval (var), <? getRK ("narm_geary_kurtosis"); ?>))
+	<? }
+	if (getRK_val ("length")) { ?>
+	try (rk.temp.results$'Length'[i] <- length (eval (var)))
+	<? }
+	if (getRK_val ("nacount")) { ?>
+	try (rk.temp.results$'NAs'[i] <- length (which(is.na(eval (var)))))
+	<? } ?>
+}
+<?
+        }
+	function printout () {
+?>
+rk.header ("Skewness and Kurtosis")
+rk.results (rk.temp.results)
+<?
+        }
+	function cleanup () {
+
+?>
+	rm (rk.temp.results)
+	rm (rk.temp.objects)
+	rm (var)
+<?
+        }
+?>
\ No newline at end of file


Property changes on: trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.php
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.rkh	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.rkh	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,35 @@
+<!DOCTYPE rkhelp>
+<document>
+	<summary>
+		This computes the estimator of Pearson's measure of kurtosis, Geary's kurtosis and skewness of given data.
+	</summary>
+
+	<usage>
+		Chose the data to compute the kurtosis and/or skewness. You can chose multiple data.
+	</usage>
+
+	<settings>
+		<caption id="tab_variables"/>
+		<setting id="x">Select the data to be computed. The vectors need to be numeric, and can be of different length.</setting>
+		<caption id="tab_options"/>
+		<setting id="skewness">If this option is chosen, Skewness will be computed.</setting>
+		<setting id="narm_skewness">If 'Yes' is checked, missing values will be excluded from calculation of skewness.</setting>
+		<setting id="kurtosis">If this option is chosen, Pearson's kurtosis will be computed.</setting>
+		<setting id="narm_kurtosis">If 'Yes' is checked, missing values will be excluded from calculation of Pearson's kurtosis.</setting>
+		<setting id="geary">If this option is chosen, Geary's kurtosis will be computed.</setting>
+		<setting id="narm_geary_kurtosis">If 'Yes' is checked, missing values will be excluded from calculation of Geary's kurtosis.</setting>
+		<setting id="length">If checked, the length of the data vectors will be shown. However, this will not effect your results but is just an optional information.</setting>
+		<setting id="nacount">If checked, and in case of missing values this will show you the number of those. However, this will not effect your results but is just an optional information.</setting>
+	</settings>
+	<related>
+		<ul>
+			<li><link href="rkward://rhelp/skewness"/></li>
+			<li><link href="rkward://rhelp/geary"/></li>
+			<li><link href="rkward://rhelp/kurtosis"/></li>
+			<li><link href="rkward://rhelp/agostino.test"/></li>
+			<li><link href="rkward://rhelp/moment"/></li>
+			<li><link href="rkward://rhelp/anscombe.test"/></li>
+			<li><link href="rkward://rhelp/bonett.test"/></li>
+		</ul>
+	</related>
+</document>

Added: trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.xml	2007-02-22 19:07:37 UTC (rev 1437)
@@ -0,0 +1,50 @@
+<!DOCTYPE rkplugin>
+
+<!-- This is the skewness and kurtosis plug-in-->
+
+<document>
+	<code file="skewness_kurtosis_test.php"/>
+	<help file="skewness_kurtosis_test.rkh" />
+	<dialog label="Skewness and Kurtosis">
+		<tabbook>
+			<tab label="Select Variables" >
+				<row>
+					<column>
+						<varselector id="vars"/>
+					</column>
+					<column>
+						<frame>
+							<varslot type="numeric" multi="true" id="x" source="vars" required="true" label="variable(s):"/>
+						</frame>
+						<stretch/>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options">
+				<frame label="Skewness">
+					<checkbox id="skewness" label="Skewness" value_unchecked="0" value="1" checked="true" />
+					<radio id="narm_skewness" label="Remove missing values for Skewness calculation">
+						<option value="na.rm = FALSE" label="No (FALSE)"/>
+						<option value="na.rm = TRUE" label="Yes (TRUE)"/>
+					</radio>
+				</frame>
+				<frame label="Kurtosis">
+					<checkbox id="kurtosis" label="Kurtosis" value_unchecked="0" value="1" checked="true" />
+					<radio id="narm_kurtosis" label="Remove missing values for Kurtosis calculation">
+						<option value="na.rm = FALSE" label="No (FALSE)"/>
+						<option value="na.rm = TRUE" label="Yes (TRUE)"/>
+					</radio>
+				</frame>
+				<frame label="Geary's kurtosis">
+					<checkbox id="geary" label="Geary's kurtosis" value_unchecked="0" value="1" checked="false" />
+					<radio id="narm_geary_kurtosis" label="Remove missing values for Geary's kurtosis calculation">
+						<option value="na.rm = FALSE" label="No (FALSE)"/>
+						<option value="na.rm = TRUE" label="Yes (TRUE)"/>
+					</radio>
+				</frame>
+				<checkbox id="length" label="Show Length" value_unchecked="0" value="1" checked="false" />
+				<checkbox id="nacount" label="Show Missing Values" value_unchecked="0" value="1" checked="false" />
+			</tab>
+		</tabbook>
+	</dialog>
+</document>


Property changes on: trunk/rkward/rkward/plugins/analysis/moments/skewness_kurtosis_test.xml
___________________________________________________________________
Name: svn:executable
   + *


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