[rkward-cvs] SF.net SVN: rkward: [1573] trunk/rkward/rkward/plugins/analysis/outliers
sjar at users.sourceforge.net
sjar at users.sourceforge.net
Tue Mar 13 22:43:24 UTC 2007
Revision: 1573
http://svn.sourceforge.net/rkward/?rev=1573&view=rev
Author: sjar
Date: 2007-03-13 15:43:24 -0700 (Tue, 13 Mar 2007)
Log Message:
-----------
* new variable introduced
* minor fixes && additions
Modified Paths:
--------------
trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.php
trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.rkh
trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.php
trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.rkh
trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.xml
trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.php
trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.rkh
trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.xml
trunk/rkward/rkward/plugins/analysis/outliers/outlier.php
trunk/rkward/rkward/plugins/analysis/outliers/outlier.rkh
Modified: trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.php 2007-03-13 18:52:50 UTC (rev 1572)
+++ trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.php 2007-03-13 22:43:24 UTC (rev 1573)
@@ -12,37 +12,38 @@
rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.objects)), check.names=FALSE)
local({
i=0;
- for (var in rk.temp.objects) {
+ for (sub in rk.temp.objects) {
i = i+1
- rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
+ rk.temp.results$'Variable Name'[i] <<- rk.get.description (sub, is.substitute=TRUE)
+ var <- na.omit (eval (sub))
try ({
- rk.temp.t <- chisq.out.test (na.omit(eval (var)), opposite = <? getRK ("opposite"); ?>, variance = var (na.omit(eval (var))))
- rk.temp.variance <- var (na.omit(eval (var)))
+ rk.temp.t <- chisq.out.test (var, opposite = <? getRK ("opposite"); ?>, variance = var (var))
+ rk.temp.variance <- var (var)
rk.temp.results$'X-squared'[i] <<- rk.temp.t$statistic
rk.temp.results$'p-value'[i] <<- rk.temp.t$p.value
rk.temp.results$'Alternative Hypothesis'[i] <<- rk.describe.alternative(rk.temp.t)
rk.temp.results$'Variance'[i] <<- rk.temp.variance
})
<? if (getRK_val ("mean")) { ?>
- try (rk.temp.results$'Mean'[i] <<- mean (eval (var)))
+ try (rk.temp.results$'Mean'[i] <<- mean (var))
<? } ?>
<? if (getRK_val ("sd")) { ?>
- try (rk.temp.results$'Standard Deviation'[i] <<- sd (eval (var)))
+ try (rk.temp.results$'Standard Deviation'[i] <<- sd (var))
<? } ?>
<? if (getRK_val ("median")) { ?>
- try (rk.temp.results$'Median'[i] <<- median (eval (var)))
+ try (rk.temp.results$'Median'[i] <<- median (var))
<? } ?>
<? if (getRK_val ("min")) { ?>
- try (rk.temp.results$'Minimum'[i] <<- min (eval (var)))
+ try (rk.temp.results$'Minimum'[i] <<- min (var))
<? } ?>
<? if (getRK_val ("max")) { ?>
- try (rk.temp.results$'Maximum'[i] <<- max (eval (var)))
+ try (rk.temp.results$'Maximum'[i] <<- max (var))
<? } ?>
<? if (getRK_val ("length")) { ?>
- try (rk.temp.results$'Length'[i] <<- length (eval (var)))
+ try (rk.temp.results$'Length'[i] <<- length (eval (sub)))
<? }
if (getRK_val ("nacount")) { ?>
- try (rk.temp.results$'NAs'[i] <<- length (which(is.na(eval (var)))))
+ try (rk.temp.results$'NAs'[i] <<- length (which(is.na(eval (sub)))))
<? } ?>
}
})
Modified: trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.rkh 2007-03-13 18:52:50 UTC (rev 1572)
+++ trunk/rkward/rkward/plugins/analysis/outliers/chisq_out_test.rkh 2007-03-13 22:43:24 UTC (rev 1573)
@@ -10,10 +10,10 @@
<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 but 30 is the limit.</setting>
+ <setting id="x">Select the data to be computed. The vectors need to be numeric, and can be of different length but 30 is the limit. For the calculation missing values are removed from the data.</setting>
<caption id="tab_options"/>
<setting id="opposite">Check if you want not the value with largest difference from the mean, but opposite (lowest, if most suspicious is highest etc.).</setting>
- <setting id="mean">If checked this will calculate you the mean (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
+ <setting id="mean">If checked this will calculate you the arithmetic mean is an additional out put. However, this will not effect your results but is just an optional information.</setting>
<setting id="sd">If checked this will calculate you the standard deviation (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
<setting id="median">If checked this will calculate you the median (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
<setting id="min">If checked this will calculate you the minimum (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
Modified: trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.php 2007-03-13 18:52:50 UTC (rev 1572)
+++ trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.php 2007-03-13 22:43:24 UTC (rev 1573)
@@ -12,20 +12,36 @@
rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.objects)), check.names=FALSE)
local({
i=0;
- for (var in rk.temp.objects) {
+ for (sub in rk.temp.objects) {
i = i+1
- rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
+ rk.temp.results$'Variable Name'[i] <<- rk.get.description (sub, is.substitute=TRUE)
+ var <- na.omit (eval (sub))
try ({
- rk.temp.t <- dixon.test (eval (var), type = <? getRK ("type"); ?>, opposite = <? getRK ("opposite"); ?>, two.sided = <? getRK ("two_sided"); ?>)
+ rk.temp.t <- dixon.test (var, type = <? getRK ("type"); ?>, opposite = <? getRK ("opposite"); ?>, two.sided = <? getRK ("two_sided"); ?>)
rk.temp.results$'Dixon Q-statistic'[i] <<- rk.temp.t$statistic["Q"]
rk.temp.results$'p-value'[i] <<- rk.temp.t$p.value
rk.temp.results$'Alternative'[i] <<- rk.temp.t$"alternative"
})
+ <? if (getRK_val ("mean")) { ?>
+ try (rk.temp.results$'Mean'[i] <<- mean (var))
+ <? } ?>
+ <? if (getRK_val ("sd")) { ?>
+ try (rk.temp.results$'Standard Deviation'[i] <<- sd (var))
+ <? } ?>
+ <? if (getRK_val ("median")) { ?>
+ try (rk.temp.results$'Median'[i] <<- median (var))
+ <? } ?>
+ <? if (getRK_val ("min")) { ?>
+ try (rk.temp.results$'Minimum'[i] <<- min (var))
+ <? } ?>
+ <? if (getRK_val ("max")) { ?>
+ try (rk.temp.results$'Maximum'[i] <<- max (var))
+ <? } ?>
<? if (getRK_val ("length")) { ?>
- try (rk.temp.results$'Length'[i] <<- length (eval (var)))
+ try (rk.temp.results$'Length'[i] <<- length (eval (sub)))
<? }
if (getRK_val ("nacount")) { ?>
- try (rk.temp.results$'NAs'[i] <<- length (which(is.na(eval (var)))))
+ try (rk.temp.results$'NAs'[i] <<- length (which(is.na(eval (sub)))))
<? } ?>
}
})
Modified: trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.rkh 2007-03-13 18:52:50 UTC (rev 1572)
+++ trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.rkh 2007-03-13 22:43:24 UTC (rev 1573)
@@ -13,8 +13,13 @@
<setting id="x">Select the data to be computed. The vectors need to be numeric, and can be of different length but 30 is the limit.</setting>
<caption id="tab_options"/>
<setting id="type">This is specyfying the variant of test to be performed.</setting>
- <setting id="two_sided">Here you can specify the alternative hypothesis. It must be one of "two-sided" or "not two-sided"</setting>
+ <setting id="two_sided">Here you can specify the alternative hypothesis. It must be one of "two-sided" or "not two-sided".</setting>
<setting id="opposite">Here you can define if you want to check not the value with largest difference from the mean, but opposite.</setting>
+ <setting id="mean">If checked this will calculate you the arithmetic mean is an additional out put. However, this will not effect your results but is just an optional information.</setting>
+ <setting id="sd">If checked this will calculate you the standard deviation (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
+ <setting id="median">If checked this will calculate you the median (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
+ <setting id="min">If checked this will calculate you the minimum (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
+ <setting id="max">If checked this will calculate you the maximum (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</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>
Modified: trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.xml 2007-03-13 18:52:50 UTC (rev 1572)
+++ trunk/rkward/rkward/plugins/analysis/outliers/dixon_test.xml 2007-03-13 22:43:24 UTC (rev 1573)
@@ -20,18 +20,31 @@
<frame label="test specific settings">
<dropdown id="type" label="Variant of test">
<option value="0" label="0"/>
- <option value="10" label="10"/>
- <option value="11" label="11"/>
+ <option value="10" label="10 equals sample size 3-7"/>
+ <option value="11" label="11 equals sample size 8-10"/>
<option value="12" label="12"/>
- <option value="20" label="20"/>
- <option value="21" label="21"/>
+ <option value="20" label="20 equals sample size 11-13"/>
+ <option value="21" label="21 equals sample size 14 and more"/>
+ <option value="22" label="22"/>
</dropdown>
<checkbox id="opposite" label="Opposite" value_unchecked="FALSE" value="TRUE" checked="false" />
<checkbox id="two_sided" label="two-sided (default)" value_unchecked="FALSE" value="TRUE" checked="true" />
</frame>
<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" />
+ <row>
+ <column>
+ <checkbox id="mean" label="Show mean" value_unchecked="0" value="1" checked="false" />
+ <checkbox id="sd" label="Show standard deviation" value_unchecked="0" value="1" checked="false" />
+ <checkbox id="median" label="Show median" value_unchecked="0" value="1" checked="false" />
+ </column>
+ <column>
+ <checkbox id="min" label="Show Minimum" value_unchecked="0" value="1" checked="false" />
+ <checkbox id="max" label="Show Maximum" value_unchecked="0" value="1" checked="false" />
+ <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="true" />
+ </column>
+ <stretch/>
+ </row>
</frame>
</column>
<stretch/>
Modified: trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.php 2007-03-13 18:52:50 UTC (rev 1572)
+++ trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.php 2007-03-13 22:43:24 UTC (rev 1573)
@@ -12,21 +12,37 @@
rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.objects)), check.names=FALSE)
local({
i=0;
- for (var in rk.temp.objects) {
+ for (sub in rk.temp.objects) {
i = i+1
- rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
+ rk.temp.results$'Variable Name'[i] <<- rk.get.description (sub, is.substitute=TRUE)
+ var <- na.omit (eval (sub))
try ({
- rk.temp.t <- grubbs.test (eval (var), type = <? getRK ("type"); ?>, opposite = <? getRK ("opposite"); ?>, two.sided = <? getRK ("two_sided"); ?>)
+ rk.temp.t <- grubbs.test (var, type = <? getRK ("type"); ?>, opposite = <? getRK ("opposite"); ?>, two.sided = <? getRK ("two_sided"); ?>)
rk.temp.results$'G'[i] <<- rk.temp.t$statistic["G"]
rk.temp.results$'U'[i] <<- rk.temp.t$statistic["U"]
rk.temp.results$'p-value'[i] <<- rk.temp.t$p.value
rk.temp.results$'Alternative Hypothesis'[i] <<- rk.describe.alternative (rk.temp.t)
})
+ <? if (getRK_val ("mean")) { ?>
+ try (rk.temp.results$'Mean'[i] <<- mean (var))
+ <? } ?>
+ <? if (getRK_val ("sd")) { ?>
+ try (rk.temp.results$'Standard Deviation'[i] <<- sd (var))
+ <? } ?>
+ <? if (getRK_val ("median")) { ?>
+ try (rk.temp.results$'Median'[i] <<- median (var))
+ <? } ?>
+ <? if (getRK_val ("min")) { ?>
+ try (rk.temp.results$'Minimum'[i] <<- min (var))
+ <? } ?>
+ <? if (getRK_val ("max")) { ?>
+ try (rk.temp.results$'Maximum'[i] <<- max (var))
+ <? } ?>
<? if (getRK_val ("length")) { ?>
- try (rk.temp.results$'Length'[i] <<- length (eval (var)))
+ try (rk.temp.results$'Length'[i] <<- length (eval (sub)))
<? }
if (getRK_val ("nacount")) { ?>
- try (rk.temp.results$'NAs'[i] <<- length (which(is.na(eval (var)))))
+ try (rk.temp.results$'NAs'[i] <<- length (which(is.na(eval (sub)))))
<? } ?>
}
})
Modified: trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.rkh 2007-03-13 18:52:50 UTC (rev 1572)
+++ trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.rkh 2007-03-13 22:43:24 UTC (rev 1573)
@@ -15,6 +15,11 @@
<setting id="type">This is specyfying the variant of test to be performed. Please refere to the R-help here.</setting>
<setting id="two_sided">Here you can specify the alternative hypothesis. It must be one of "two-sided" or "not two-sided"</setting>
<setting id="opposite">Here you can define if you want to check not the value with largest difference from the mean, but opposite.</setting>
+ <setting id="mean">If checked this will calculate you the arithmetic mean is an additional out put. However, this will not effect your results but is just an optional information.</setting>
+ <setting id="sd">If checked this will calculate you the standard deviation (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
+ <setting id="median">If checked this will calculate you the median (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
+ <setting id="min">If checked this will calculate you the minimum (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
+ <setting id="max">If checked this will calculate you the maximum (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</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>
Modified: trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.xml 2007-03-13 18:52:50 UTC (rev 1572)
+++ trunk/rkward/rkward/plugins/analysis/outliers/grubbs_test.xml 2007-03-13 22:43:24 UTC (rev 1573)
@@ -27,8 +27,20 @@
<checkbox id="two_sided" label="two-sided (default)" value_unchecked="FALSE" value="TRUE" checked="true" />
</frame>
<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" />
+ <row>
+ <column>
+ <checkbox id="mean" label="Show mean" value_unchecked="0" value="1" checked="false" />
+ <checkbox id="sd" label="Show standard deviation" value_unchecked="0" value="1" checked="false" />
+ <checkbox id="median" label="Show median" value_unchecked="0" value="1" checked="false" />
+ </column>
+ <column>
+ <checkbox id="min" label="Show Minimum" value_unchecked="0" value="1" checked="false" />
+ <checkbox id="max" label="Show Maximum" value_unchecked="0" value="1" checked="false" />
+ <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="true" />
+ </column>
+ <stretch/>
+ </row>
</frame>
</column>
<stretch/>
Modified: trunk/rkward/rkward/plugins/analysis/outliers/outlier.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/outlier.php 2007-03-13 18:52:50 UTC (rev 1572)
+++ trunk/rkward/rkward/plugins/analysis/outliers/outlier.php 2007-03-13 22:43:24 UTC (rev 1573)
@@ -12,33 +12,34 @@
rk.temp.results <- data.frame ('Variable Name'=rep (NA, length (rk.temp.objects)), check.names=FALSE)
local({
i=0;
- for (var in rk.temp.objects) {
+ for (sub in rk.temp.objects) {
i = i+1
- rk.temp.results$'Variable Name'[i] <<- rk.get.description (var, is.substitute=TRUE)
+ rk.temp.results$'Variable Name'[i] <<- rk.get.description (sub, is.substitute=TRUE)
+ var <- na.omit (eval (sub))
try ({
- rk.temp.t <- outlier (eval (var), opposite = <? getRK ("opposite"); ?>)
+ rk.temp.t <- outlier (var, opposite = <? getRK ("opposite"); ?>)
rk.temp.results$'Outlier'[i] <<- rk.temp.t
})
<? if (getRK_val ("mean")) { ?>
- try (rk.temp.results$'Mean'[i] <<- mean (eval (var)))
+ try (rk.temp.results$'Mean'[i] <<- mean (var))
<? } ?>
<? if (getRK_val ("sd")) { ?>
- try (rk.temp.results$'Standard Deviation'[i] <<- sd (eval (var)))
+ try (rk.temp.results$'Standard Deviation'[i] <<- sd (var))
<? } ?>
<? if (getRK_val ("median")) { ?>
- try (rk.temp.results$'Median'[i] <<- median (eval (var)))
+ try (rk.temp.results$'Median'[i] <<- median (var))
<? } ?>
<? if (getRK_val ("min")) { ?>
- try (rk.temp.results$'Minimum'[i] <<- min (eval (var)))
+ try (rk.temp.results$'Minimum'[i] <<- min (var))
<? } ?>
<? if (getRK_val ("max")) { ?>
- try (rk.temp.results$'Maximum'[i] <<- max (eval (var)))
+ try (rk.temp.results$'Maximum'[i] <<- max (var))
<? } ?>
<? if (getRK_val ("length")) { ?>
- try (rk.temp.results$'Length'[i] <<- length (eval (var)))
+ try (rk.temp.results$'Length'[i] <<- length (eval (sub)))
<? }
if (getRK_val ("nacount")) { ?>
- try (rk.temp.results$'NAs'[i] <<- length (which(is.na(eval (var)))))
+ try (rk.temp.results$'NAs'[i] <<- length (which(is.na(eval (sub)))))
<? } ?>
}
})
Modified: trunk/rkward/rkward/plugins/analysis/outliers/outlier.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/outliers/outlier.rkh 2007-03-13 18:52:50 UTC (rev 1572)
+++ trunk/rkward/rkward/plugins/analysis/outliers/outlier.rkh 2007-03-13 22:43:24 UTC (rev 1573)
@@ -10,15 +10,15 @@
<settings>
<caption id="tab_variables"/>
- <setting id="x">Select the data to be computed. The vectors need to be numeric.</setting>
+ <setting id="x">Select the data to be computed. The vectors need to be numeric and can have missing values included. For the calculation missing values are removed from the data.</setting>
<caption id="tab_options"/>
<setting id="opposite">Set to give the opposite value. If the largest value has maximum difference from the mean, it gives smallest and vice versa.</setting>
- <setting id="mean">If checked this will calculate you the mean (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
+ <setting id="mean">If checked this will calculate you the arithmetic mean is an additional out put. However, this will not effect your results but is just an optional information.</setting>
<setting id="sd">If checked this will calculate you the standard deviation (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
<setting id="median">If checked this will calculate you the median (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
<setting id="min">If checked this will calculate you the minimum (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</setting>
<setting id="max">If checked this will calculate you the maximum (regardless of missing values) is an additional out put. However, this will not effect your results but is just an optional information.</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="length">If checked, the length of the data vectors will be shown, including missing values (NAs). 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>
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