[rkward-cvs] SF.net SVN: rkward:[2660] trunk/rkward/tests
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Sep 24 14:09:07 UTC 2009
Revision: 2660
http://rkward.svn.sourceforge.net/rkward/?rev=2660&view=rev
Author: tfry
Date: 2009-09-24 14:09:03 +0000 (Thu, 24 Sep 2009)
Log Message:
-----------
Add the remaining distribution tests and test standards
Modified Paths:
--------------
trunk/rkward/tests/all_tests.R
trunk/rkward/tests/distributions.R
Added Paths:
-----------
trunk/rkward/tests/distributions/RKTestStandard.binomial_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.binomial_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.binomial_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.binomial_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.binomial_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.binomial_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.cauchy_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.cauchy_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.cauchy_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.cauchy_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.chi_squared_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.chi_squared_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.chi_squared_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.chi_squared_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.chi_squared_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.chi_squared_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.exponential_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.exponential_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.exponential_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.exponential_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.exponential_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.exponential_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.f_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.f_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.f_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.f_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.f_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.f_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.gamma_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.gamma_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.gamma_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.gamma_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.gamma_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.gamma_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.geom_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.geom_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.geom_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.geom_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.geometric_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.geometric_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.gumbel_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.gumbel_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.gumbel_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.gumbel_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.log_normal_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.log_normal_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.log_normal_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.log_normal_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.log_normal_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.log_normal_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.logistic_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.logistic_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.logistic_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.logistic_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.logistic_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.logistic_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.negbinomial_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.negbinomial_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.normal_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.normal_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.normal_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.normal_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.normal_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.normal_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_binomial_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_binomial_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_cauchy_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_cauchy_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_chi_squared_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_chi_squared_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_exponential_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_exponential_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_f_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_f_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_gamma_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_gamma_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_geometric_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_geometric_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_hypergeometric_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_hypergeometric_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_log_normal_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_log_normal_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_logistic_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_logistic_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_negbinomial_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_negbinomial_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_normal_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_normal_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_poisson_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_poisson_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_t_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_t_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_tukey_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_tukey_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_uniform_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_uniform_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_weibull_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_weibull_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.plot_wilcoxon_distribution.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.plot_wilcoxon_distribution.rkout
trunk/rkward/tests/distributions/RKTestStandard.poisson_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.poisson_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.poisson_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.poisson_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.poisson_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.poisson_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.t_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.t_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.t_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.t_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.t_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.t_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.tukey_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.tukey_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.tukey_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.tukey_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.uniform_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.uniform_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.uniform_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.uniform_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.uniform_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.uniform_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.weibull_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.weibull_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.weibull_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.weibull_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.weibull_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.weibull_quantiles.rkout
trunk/rkward/tests/distributions/RKTestStandard.wilcoxon_clt.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.wilcoxon_clt.rkout
trunk/rkward/tests/distributions/RKTestStandard.wilcoxon_probabilities.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.wilcoxon_probabilities.rkout
trunk/rkward/tests/distributions/RKTestStandard.wilcoxon_quantiles.rkcommands.R
trunk/rkward/tests/distributions/RKTestStandard.wilcoxon_quantiles.rkout
Modified: trunk/rkward/tests/all_tests.R
===================================================================
--- trunk/rkward/tests/all_tests.R 2009-09-24 13:51:37 UTC (rev 2659)
+++ trunk/rkward/tests/all_tests.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -1,7 +1,7 @@
if (!isClass ("RKTestSuite")) source ("test_framework.R")
## add your test suite files, to this vector:
-testsuites <- c ("rkward_application_tests.R", "import_export_plugins.R", "item_response_theory.R", "analysis_plugins.R")
+testsuites <- c ("rkward_application_tests.R", "import_export_plugins.R", "item_response_theory.R", "analysis_plugins.R", "distributions.R")
allresults <- new ("RKTestResult")
for (testsuite in testsuites) {
Added: trunk/rkward/tests/distributions/RKTestStandard.binomial_clt.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.binomial_clt.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.binomial_clt.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,28 @@
+local({
+## Prepare
+## Compute
+## Print result
+# parameters:
+size <- 11; prob <- 0.50000000;
+# mean and variances of the distribution of sample averages:
+avg.exp <- size*prob;
+avg.var <- (size*prob*(1-prob))/1;
+# generate the entire data:
+data <- matrix(rbinom(n=1000, size=size, prob=prob), nrow=1);
+# get the sample averages:
+avg <- colMeans(data);
+# generate random normal samples:
+normX <- seq(from=min(avg), to=max(avg), length=1000);
+normY <- dnorm (normX, mean = avg.exp, sd = sqrt(avg.var));
+dist.hist <- hist(avg, plot=FALSE, breaks=seq (floor (min (avg, na.rm=TRUE))-0.5, ceiling (max (avg, na.rm=TRUE))+0.5));
+# calculate the ylims appropriately:
+ylim <- c(0,max(c(dist.hist$density, normY)));
+rk.graph.on ()
+try ({
+ plot(dist.hist, ylim=ylim, freq=FALSE, lty="solid", density=-1, xlab="Sample Averages", main="Binomial")
+ lines (x=normX, y=normY, type="l", col="red")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_binomial_clt", settings="drawnorm.state=1\nfunction.string=hist\nhistogram_opt.addtoplot.state=\nhistogram_opt.barlabels.state=\nhistogram_opt.density.real=-1.000000\nhistogram_opt.doborder.state=1\nhistogram_opt.freq.state=0\nhistogram_opt.histbordercol.color.string=\nhistogram_opt.histbreaksFunction.string=int\nhistogram_opt.histlinetype.string=solid\nhistogram_opt.include_lowest.state=1\nhistogram_opt.rightclosed.state=1\nhistogram_opt.usefillcol.state=\nnAvg.real=1.000000\nnDist.real=1000.000000\nnormlinecol.color.string=red\nnormpointtype.string=l\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nprob.real=0.50000000\nscalenorm.state=0\nsize.real=11.000000", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.binomial_clt.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.binomial_clt.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.binomial_clt.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1 @@
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.binomial_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.binomial_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.binomial_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (pbinom (q = c (0.95, 2), size = 3, prob = 0.50000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Binomial tail probability", list ("Vector of quantiles", "c (0.95, 2)", "Binomial trials", "3", "Probability of success", "0.50000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"));
+rk.results (result, titles="Binomial tail probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::binomial_tail_probabilities", settings="logp.string=log.p = FALSE\nprob.real=0.50000000\nq.text=0.95 2\nsize.real=3.000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.binomial_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.binomial_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.binomial_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Binomial tail probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.95, 2)</li>
+<li>Binomial trials: 3</li>
+<li>Probability of success: 0.50000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Binomial tail probabilities: 0.125 0.875</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.binomial_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.binomial_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.binomial_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (qbinom (p = c (0.95, .5), size = 3, prob = 0.50000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Binomial quantile", list ("Vector of quantiles probabilities", "c (0.95, .5)", "Binomial trials", "3", "Probability of success", "0.50000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"));
+rk.results (result, titles="Binomial quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::binomial_quantiles", settings="logp.string=log.p = FALSE\np.text=0.95 .5\nprob.real=0.50000000\nsize.real=3.000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.binomial_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.binomial_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.binomial_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Binomial quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles probabilities: c (0.95, .5)</li>
+<li>Binomial trials: 3</li>
+<li>Probability of success: 0.50000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Binomial quantiles: 3 1</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.cauchy_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.cauchy_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.cauchy_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,20 @@
+local({
+## Prepare
+## Compute
+result <- (pcauchy (q = c (0.95), location = 0.03000000, scale = 1.02000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Cauchy probabilities", list ("Vector of quantiles", "c (0.95)", "Location", "0.03000000", "Scale", "1.02000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Cauchy probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::cauchy_probabilities", settings="location.real=0.03000000\nlogp.string=log.p = FALSE\nq.text=0.95\nscale.real=1.02000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
+local({
+## Prepare
+## Compute
+result <- (pcauchy (q = c (0.95), location = -0.02000000, scale = 1.03000000, lower.tail=FALSE, log.p = TRUE))
+## Print result
+rk.header ("Cauchy probabilities", list ("Vector of quantiles", "c (0.95)", "Location", "-0.02000000", "Scale", "1.03000000", "Tail", "lower.tail=FALSE", "Probabilities p are given as", "log.p = TRUE"))
+rk.results (result, titles="Cauchy probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::cauchy_probabilities", settings="location.real=-0.02000000\nlogp.string=log.p = TRUE\nq.text=0.95\nscale.real=1.03000000\ntail.string=lower.tail=FALSE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.cauchy_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.cauchy_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.cauchy_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,19 @@
+<h1>Cauchy probabilities</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.95)</li>
+<li>Location: 0.03000000</li>
+<li>Scale: 1.02000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Cauchy probabilities: 0.7336</h3><h1>Cauchy probabilities</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.95)</li>
+<li>Location: -0.02000000</li>
+<li>Scale: 1.03000000</li>
+<li>Tail: lower.tail=FALSE</li>
+<li>Probabilities p are given as: log.p = TRUE</li>
+</ul>
+DATE<br>
+<h3>Cauchy probabilities: -1.3488</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.cauchy_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.cauchy_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.cauchy_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,20 @@
+local({
+## Prepare
+## Compute
+result <- (qcauchy (p = c (0.95), location = -0.03000000, scale = 1.03000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Cauchy quantiles", list ("Vector of probabilities", "c (0.95)", "Location", "-0.03000000", "Scale", "1.03000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"));
+rk.results (result, titles="Cauchy quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::cauchy_quantiles", settings="location.real=-0.03000000\nlogp.string=log.p = FALSE\np.text=0.95\nscale.real=1.03000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
+local({
+## Prepare
+## Compute
+result <- (qcauchy (p = c (-1, -2), location = 0.02000000, scale = 0.98000000, lower.tail=FALSE, log.p = TRUE))
+## Print result
+rk.header ("Cauchy quantiles", list ("Vector of probabilities", "c (-1, -2)", "Location", "0.02000000", "Scale", "0.98000000", "Tail", "lower.tail=FALSE", "Probabilities p are given as", "log.p = TRUE"));
+rk.results (result, titles="Cauchy quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::cauchy_quantiles", settings="location.real=0.02000000\nlogp.string=log.p = TRUE\np.text=-1 -2\nscale.real=0.98000000\ntail.string=lower.tail=FALSE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.cauchy_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.cauchy_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.cauchy_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,19 @@
+<h1>Cauchy quantiles</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (0.95)</li>
+<li>Location: -0.03000000</li>
+<li>Scale: 1.03000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Cauchy quantiles: 6.4732</h3><h1>Cauchy quantiles</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (-1, -2)</li>
+<li>Location: 0.02000000</li>
+<li>Scale: 0.98000000</li>
+<li>Tail: lower.tail=FALSE</li>
+<li>Probabilities p are given as: log.p = TRUE</li>
+</ul>
+DATE<br>
+<h3>Cauchy quantiles: 0.45186 2.1844</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.chi_squared_clt.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.chi_squared_clt.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.chi_squared_clt.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,27 @@
+local({
+## Prepare
+## Compute
+## Print result
+# parameters:
+df <- 4.00000000; ncp <- 0.60000000;
+# mean and variances of the distribution of sample averages:
+avg.exp <- df + ncp;
+avg.var <- (2*df + 4*ncp)/12;
+# generate the entire data:
+data <- matrix(rchisq(n=12000, df=df, ncp=ncp), nrow=12);
+# get the sample averages:
+avg <- colMeans(data);
+# normalise the variables:
+avg <- (avg - avg.exp)/sqrt(avg.var);
+# generate random normal samples:
+normX <- seq(from=min(avg), to=max(avg), length=1000);
+normY <- pnorm (normX);
+rk.graph.on ()
+try ({
+ plot(ecdf(avg), xlab="Sample Averages", main="Chi-Squared", verticals=TRUE, do.points=FALSE)
+ lines (x=normX, y=normY, type="l", col="red")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_chi_squared_clt", settings="df.real=4.00000000\ndist_stepfun.addtoplot.state=\ndist_stepfun.col_hor.color.string=\ndist_stepfun.col_y0.color.string=\ndist_stepfun.col_y1.color.string=\ndist_stepfun.do_points.state=\ndist_stepfun.linetype.string=\ndist_stepfun.verticals.state=1\ndrawnorm.state=1\nfunction.string=dist\nnAvg.real=12.000000\nnDist.real=1000.000000\nncp.real=0.60000000\nnormlinecol.color.string=red\nnormpointtype.string=l\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nscalenorm.state=1", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.chi_squared_clt.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.chi_squared_clt.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.chi_squared_clt.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1 @@
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.chi_squared_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.chi_squared_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.chi_squared_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,20 @@
+local({
+## Prepare
+## Compute
+result <- (pchisq (q = c (0.97, 0.65), df = 3.00000000, ncp = 0.05000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Chi-squared probability", list ("Vector of quantiles", "c (0.97, 0.65)", "Degrees of Freedom", "3.00000000", "non-centrality parameter", "0.05000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"));
+rk.results (result, titles="Chi-squared probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::chi_squared_probabilities", settings="df.real=3.00000000\nlogp.string=log.p = FALSE\nncp.real=0.05000000\nq.text=0.97 0.65\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
+local({
+## Prepare
+## Compute
+result <- (pchisq (q = c (1), df = 1.01000000, ncp = 0.02000000, lower.tail=FALSE, log.p = TRUE))
+## Print result
+rk.header ("Chi-squared probability", list ("Vector of quantiles", "c (1)", "Degrees of Freedom", "1.01000000", "non-centrality parameter", "0.02000000", "Tail", "lower.tail=FALSE", "Probabilities p are given as", "log.p = TRUE"));
+rk.results (result, titles="Chi-squared probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::chi_squared_probabilities", settings="df.real=1.01000000\nlogp.string=log.p = TRUE\nncp.real=0.02000000\nq.text=1\ntail.string=lower.tail=FALSE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.chi_squared_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.chi_squared_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.chi_squared_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,19 @@
+<h1>Chi-squared probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.97, 0.65)</li>
+<li>Degrees of Freedom: 3.00000000</li>
+<li>non-centrality parameter: 0.05000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Chi-squared probabilities: 0.18762 0.11261</h3><h1>Chi-squared probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (1)</li>
+<li>Degrees of Freedom: 1.01000000</li>
+<li>non-centrality parameter: 0.02000000</li>
+<li>Tail: lower.tail=FALSE</li>
+<li>Probabilities p are given as: log.p = TRUE</li>
+</ul>
+DATE<br>
+<h3>Chi-squared probabilities: -1.1229</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.chi_squared_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.chi_squared_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.chi_squared_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,20 @@
+local({
+## Prepare
+## Compute
+result <- (qchisq (p = c (0.95), df = 1.00000000, ncp = 0.00000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Chi-squared quantile", list ("Vector of probabilities", "c (0.95)", "Degrees of freedom", "1.00000000", "non-centrality parameter", "0.00000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"));
+rk.results (result, titles="Chi-squared quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::chi_squared_quantiles", settings="df.real=1.00000000\nlogp.string=log.p = FALSE\nncp.real=0.00000000\np.text=0.95\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
+local({
+## Prepare
+## Compute
+result <- (qchisq (p = c (-1, -2), df = 1.02000000, ncp = 3.00000000, lower.tail=FALSE, log.p = TRUE))
+## Print result
+rk.header ("Chi-squared quantile", list ("Vector of probabilities", "c (-1, -2)", "Degrees of freedom", "1.02000000", "non-centrality parameter", "3.00000000", "Tail", "lower.tail=FALSE", "Probabilities p are given as", "log.p = TRUE"));
+rk.results (result, titles="Chi-squared quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::chi_squared_quantiles", settings="df.real=1.02000000\nlogp.string=log.p = TRUE\nncp.real=3.00000000\np.text=-1 -2\ntail.string=lower.tail=FALSE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.chi_squared_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.chi_squared_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.chi_squared_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,19 @@
+<h1>Chi-squared quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (0.95)</li>
+<li>Degrees of freedom: 1.00000000</li>
+<li>non-centrality parameter: 0.00000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Chi-squared quantiles: 3.8415</h3><h1>Chi-squared quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (-1, -2)</li>
+<li>Degrees of freedom: 1.02000000</li>
+<li>non-centrality parameter: 3.00000000</li>
+<li>Tail: lower.tail=FALSE</li>
+<li>Probabilities p are given as: log.p = TRUE</li>
+</ul>
+DATE<br>
+<h3>Chi-squared quantiles: 4.3068 8.0555</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.exponential_clt.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.exponential_clt.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.exponential_clt.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,30 @@
+local({
+## Prepare
+## Compute
+## Print result
+# parameters:
+rate <- 1.00000000;
+# mean and variances of the distribution of sample averages:
+avg.exp <- 1/rate;
+avg.var <- (1/(rate^2))/10;
+# generate the entire data:
+data <- matrix(rexp(n=10000, rate=rate), nrow=10);
+# get the sample averages:
+avg <- colMeans(data);
+# normalise the variables:
+avg <- (avg - avg.exp)/sqrt(avg.var);
+# generate random normal samples:
+normX <- seq(from=min(avg), to=max(avg), length=1000);
+normY <- dnorm (normX);
+dist.hist <- hist(avg, plot=FALSE, breaks="Sturges");
+# calculate the ylims appropriately:
+ylim <- c(0,max(c(dist.hist$density, normY)));
+rk.graph.on ()
+try ({
+ plot(dist.hist, ylim=ylim, freq=FALSE, lty="solid", density=-1, xlab="Sample Averages", main="Exponential")
+ lines (x=normX, y=normY, type="h", col="grey4")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_exponential_clt", settings="drawnorm.state=1\nfunction.string=hist\nhistogram_opt.addtoplot.state=\nhistogram_opt.barlabels.state=\nhistogram_opt.density.real=-1.000000\nhistogram_opt.doborder.state=1\nhistogram_opt.freq.state=0\nhistogram_opt.histbordercol.color.string=\nhistogram_opt.histbreaksFunction.string=Sturges\nhistogram_opt.histlinetype.string=solid\nhistogram_opt.rightclosed.state=1\nhistogram_opt.usefillcol.state=\nnAvg.real=10.000000\nnDist.real=1000.000000\nnormlinecol.color.string=grey4\nnormpointtype.string=h\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nrate.real=1.00000000\nscalenorm.state=1", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.exponential_clt.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.exponential_clt.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.exponential_clt.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1 @@
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.exponential_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.exponential_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.exponential_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (pexp (q = c (0.96), rate = 1.07000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Exponential probabilities", list ("Vector of quantiles", "c (0.96)", "Rate", "1.07000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Exponential probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::exponential_probabilities", settings="logp.string=log.p = FALSE\nq.text=0.96\nrate.real=1.07000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.exponential_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.exponential_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.exponential_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,9 @@
+<h1>Exponential probabilities</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.96)</li>
+<li>Rate: 1.07000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Exponential probabilities: 0.64199</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.exponential_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.exponential_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.exponential_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (qexp (p = c (-1.1), rate = 1.05000000, lower.tail=FALSE, log.p = TRUE))
+## Print result
+rk.header ("Exponential quantiles", list ("Vector of probabilities", "c (-1.1)", "Rate", "1.05000000", "Tail", "lower.tail=FALSE", "Probabilities p are given as", "log.p = TRUE"))
+rk.results (result, titles="Exponential quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::exponential_quantiles", settings="logp.string=log.p = TRUE\np.text=-1.1\nrate.real=1.05000000\ntail.string=lower.tail=FALSE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.exponential_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.exponential_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.exponential_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,9 @@
+<h1>Exponential quantiles</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (-1.1)</li>
+<li>Rate: 1.05000000</li>
+<li>Tail: lower.tail=FALSE</li>
+<li>Probabilities p are given as: log.p = TRUE</li>
+</ul>
+DATE<br>
+<h3>Exponential quantiles: 1.0476</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.f_clt.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.f_clt.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.f_clt.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,19 @@
+local({
+## Prepare
+## Compute
+## Print result
+# parameters:
+df1 <- 5.00000000; df2 <- 5.00000000; ncp <- 0.00000000;
+# generate the entire data:
+data <- matrix(rf(n=10000, df1=df1, df2=df2, ncp=ncp), nrow=10);
+# get the sample averages:
+avg <- colMeans(data);
+dist.hist <- hist(avg, plot=FALSE, breaks="Sturges");
+rk.graph.on ()
+try ({
+ plot(dist.hist, freq=FALSE, lty="solid", density=-1, xlab="Sample Averages", main="F")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_f_clt", settings="df1.real=5.00000000\ndf2.real=5.00000000\ndrawnorm.state=0\nfunction.string=hist\nhistogram_opt.addtoplot.state=\nhistogram_opt.barlabels.state=\nhistogram_opt.density.real=-1.000000\nhistogram_opt.doborder.state=1\nhistogram_opt.freq.state=0\nhistogram_opt.histbordercol.color.string=\nhistogram_opt.histbreaksFunction.string=Sturges\nhistogram_opt.histlinetype.string=solid\nhistogram_opt.rightclosed.state=1\nhistogram_opt.usefillcol.state=\nnAvg.real=10.000000\nnDist.real=1000.000000\nncp.real=0.00000000\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nscalenorm.state=0", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.f_clt.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.f_clt.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.f_clt.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1 @@
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.f_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.f_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.f_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (pf (q = c (.1, .2), df1 = 1.02000000, df2 = 1.11000000, ncp = 0.02000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("F probability", list ("Vector of quantiles", "c (.1, .2)", "Numerator degrees of freedom", "1.02000000", "Denominator degrees of freedom", "1.11000000", "non-centrality parameter", "0.02000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"));
+rk.results (result, titles="F probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::f_probabilities", settings="df1.real=1.02000000\ndf2.real=1.11000000\nlogp.string=log.p = FALSE\nncp.real=0.02000000\nq.text=.1, .2\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.f_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.f_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.f_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,11 @@
+<h1>F probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (.1, .2)</li>
+<li>Numerator degrees of freedom: 1.02000000</li>
+<li>Denominator degrees of freedom: 1.11000000</li>
+<li>non-centrality parameter: 0.02000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>F probabilities: 0.19324 0.26733</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.f_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.f_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.f_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (qf (p = c (0.95), df1 = 1.00000000, df2 = 1.00000000, ncp = 0.00000000, lower.tail=FALSE, log.p = FALSE))
+## Print result
+rk.header ("F quantile", list ("Vector of probabilities", "c (0.95)", "Numerator degrees of freedom", "1.00000000", "Denominator degrees of freedom", "1.00000000", "non-centrality parameter", "0.00000000", "Tail", "lower.tail=FALSE", "Probabilities p are given as", "log.p = FALSE"));
+rk.results (result, titles="F quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::f_quantiles", settings="df1.real=1.00000000\ndf2.real=1.00000000\nlogp.string=log.p = FALSE\nncp.real=0.00000000\np.text=0.95\ntail.string=lower.tail=FALSE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.f_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.f_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.f_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,11 @@
+<h1>F quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (0.95)</li>
+<li>Numerator degrees of freedom: 1.00000000</li>
+<li>Denominator degrees of freedom: 1.00000000</li>
+<li>non-centrality parameter: 0.00000000</li>
+<li>Tail: lower.tail=FALSE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>F quantiles: 0.006194</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.gamma_clt.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.gamma_clt.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.gamma_clt.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,28 @@
+local({
+## Prepare
+## Compute
+## Print result
+# parameters:
+shape <- 5.90000000; rate <- 0.30000000;
+# mean and variances of the distribution of sample averages:
+avg.exp <- shape/rate;
+avg.var <- (shape/(rate^2))/10;
+# generate the entire data:
+data <- matrix(rgamma(n=10000, shape=shape, rate=rate), nrow=10);
+# get the sample averages:
+avg <- colMeans(data);
+# generate random normal samples:
+normX <- seq(from=min(avg), to=max(avg), length=1000);
+normY <- dnorm (normX, mean = avg.exp, sd = sqrt(avg.var));
+dist.hist <- hist(avg, plot=FALSE, breaks="Sturges");
+# calculate the ylims appropriately:
+ylim <- c(0,max(c(dist.hist$density, normY)));
+rk.graph.on ()
+try ({
+ plot(dist.hist, ylim=ylim, freq=FALSE, lty="solid", density=-1, xlab="Sample Averages", main="Gamma")
+ lines (x=normX, y=normY, type="l", col="red")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_gamma_clt", settings="drawnorm.state=1\nfunction.string=hist\nhistogram_opt.addtoplot.state=\nhistogram_opt.barlabels.state=\nhistogram_opt.density.real=-1.000000\nhistogram_opt.doborder.state=1\nhistogram_opt.freq.state=0\nhistogram_opt.histbordercol.color.string=\nhistogram_opt.histbreaksFunction.string=Sturges\nhistogram_opt.histlinetype.string=solid\nhistogram_opt.rightclosed.state=1\nhistogram_opt.usefillcol.state=\nnAvg.real=10.000000\nnDist.real=1000.000000\nnormlinecol.color.string=red\nnormpointtype.string=l\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nrate.real=0.30000000\nscalenorm.state=0\nshape.real=5.90000000", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.gamma_clt.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.gamma_clt.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.gamma_clt.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1 @@
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.gamma_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.gamma_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.gamma_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (pgamma (q = c (0.95), shape = 1.00000000, rate = 1.00000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Gamma probability", list ("Vector of quantiles", "c (0.95)", "Shape", "1.00000000", "Rate", "1.00000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Gamma probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::gamma_probabilities", settings="logp.string=log.p = FALSE\nq.text=0.95\nrate.real=1.00000000\nshape.real=1.00000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.gamma_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.gamma_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.gamma_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Gamma probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.95)</li>
+<li>Shape: 1.00000000</li>
+<li>Rate: 1.00000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Gamma probabilities: 0.61326</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.gamma_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.gamma_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.gamma_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,11 @@
+local({
+## Prepare
+## Compute
+result <- (qgamma (p = c (-5), shape = 1.00000000, rate = 1.00000000, lower.tail=TRUE, log.p = TRUE))
+
+## Print result
+rk.header ("Gamma quantile", list ("Vector of probabilities", "c (-5)", "Shape", "1.00000000", "Rate", "1.00000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = TRUE"))
+rk.results (result, titles="Gamma quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::gamma_quantiles", settings="logp.string=log.p = TRUE\np.text=-5\nrate.real=1.00000000\nshape.real=1.00000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.gamma_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.gamma_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.gamma_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Gamma quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (-5)</li>
+<li>Shape: 1.00000000</li>
+<li>Rate: 1.00000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = TRUE</li>
+</ul>
+DATE<br>
+<h3>Gamma quantiles: 0.0067607</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.geom_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.geom_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.geom_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (pgeom (q = c (0.95), prob = 0.50000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Geometric probability", list ("Vector of quantiles", "c (0.95)", "Probability of success in each trial", "0.50000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Geometric probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::geom_probabilities", settings="logp.string=log.p = FALSE\nprob.real=0.50000000\nq.text=0.95\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.geom_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.geom_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.geom_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,9 @@
+<h1>Geometric probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.95)</li>
+<li>Probability of success in each trial: 0.50000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Geometric probabilities: 0.5</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.geom_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.geom_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.geom_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (qgeom (p = c (0.95), prob = 0.50000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Geometric quantile", list ("Vector of probabilities", "c (0.95)", "Probability of success in each trial", "0.50000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Geometric quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::geom_quantiles", settings="logp.string=log.p = FALSE\np.text=0.95\nprob.real=0.50000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.geom_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.geom_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.geom_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,9 @@
+<h1>Geometric quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (0.95)</li>
+<li>Probability of success in each trial: 0.50000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Geometric quantiles: 4</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.geometric_clt.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.geometric_clt.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.geometric_clt.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,28 @@
+local({
+## Prepare
+## Compute
+## Print result
+# parameters:
+prob <- 0.50000000;
+# mean and variances of the distribution of sample averages:
+avg.exp <- (1-prob)/prob;
+avg.var <- ((1-prob)/(prob^2))/10;
+# generate the entire data:
+data <- matrix(rgeom(n=10000, prob=prob), nrow=10);
+# get the sample averages:
+avg <- colMeans(data);
+# generate random normal samples:
+normX <- seq(from=min(avg), to=max(avg), length=1000);
+normY <- dnorm (normX, mean = avg.exp, sd = sqrt(avg.var));
+dist.hist <- hist(avg, plot=FALSE, breaks="Sturges");
+# calculate the ylims appropriately:
+ylim <- c(0,max(c(dist.hist$density, normY)));
+rk.graph.on ()
+try ({
+ plot(dist.hist, ylim=ylim, freq=FALSE, lty="solid", density=-1, xlab="Sample Averages", main="Geometric")
+ lines (x=normX, y=normY, type="l", col="red")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_geometric_clt", settings="drawnorm.state=1\nfunction.string=hist\nhistogram_opt.addtoplot.state=\nhistogram_opt.barlabels.state=\nhistogram_opt.density.real=-1.000000\nhistogram_opt.doborder.state=1\nhistogram_opt.freq.state=0\nhistogram_opt.histbordercol.color.string=\nhistogram_opt.histbreaksFunction.string=Sturges\nhistogram_opt.histlinetype.string=solid\nhistogram_opt.rightclosed.state=1\nhistogram_opt.usefillcol.state=\nnAvg.real=10.000000\nnDist.real=1000.000000\nnormlinecol.color.string=red\nnormpointtype.string=l\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nprob.real=0.50000000\nscalenorm.state=0", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.geometric_clt.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.geometric_clt.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.geometric_clt.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1 @@
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.gumbel_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.gumbel_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.gumbel_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (pweibull (q = exp(c (0.95)), shape = 1.03000000, scale = 1.04000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Gumbel probability", list ("Vector of quantiles", "c (0.95)", "Shape", "1.03000000", "Scale", "1.04000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Gumbel probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::gumbel_probabilities", settings="logp.string=log.p = FALSE\nq.text=0.95\nscale.real=1.04000000\nshape.real=1.03000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.gumbel_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.gumbel_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.gumbel_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Gumbel probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.95)</li>
+<li>Shape: 1.03000000</li>
+<li>Scale: 1.04000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Gumbel probabilities: 0.92232</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.gumbel_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.gumbel_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.gumbel_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- log(qweibull (p = c (0.95), shape = 1.00000000, scale = 1.00000000, lower.tail=FALSE, log.p = FALSE))
+## Print result
+rk.header ("Gumbel quantile", list ("Vector of probabilities", "c (0.95)", "Shape", "1.00000000", "Scale", "1.00000000", "Tail", "lower.tail=FALSE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Gumbel quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::gumbel_quantiles", settings="logp.string=log.p = FALSE\np.text=0.95\nscale.real=1.00000000\nshape.real=1.00000000\ntail.string=lower.tail=FALSE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.gumbel_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.gumbel_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.gumbel_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Gumbel quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (0.95)</li>
+<li>Shape: 1.00000000</li>
+<li>Scale: 1.00000000</li>
+<li>Tail: lower.tail=FALSE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Gumbel quantiles: -2.9702</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_clt.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_clt.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_clt.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,28 @@
+local({
+## Prepare
+## Compute
+## Print result
+# parameters:
+m <- 12; n <- 12; k <- 15;
+# mean and variances of the distribution of sample averages:
+avg.exp <- k*m/(m+n);
+avg.var <- (k*m*n*(m+n-k)/((m+n)^2*(m+n-1)))/10;
+# generate the entire data:
+data <- matrix(rhyper(nn=10000, m=m, n=n, k=k), nrow=10);
+# get the sample averages:
+avg <- colMeans(data);
+# generate random normal samples:
+normX <- seq(from=min(avg), to=max(avg), length=1000);
+normY <- dnorm (normX, mean = avg.exp, sd = sqrt(avg.var));
+dist.hist <- hist(avg, plot=FALSE, breaks="Sturges");
+# calculate the ylims appropriately:
+ylim <- c(0,max(c(dist.hist$density, normY)));
+rk.graph.on ()
+try ({
+ plot(dist.hist, ylim=ylim, freq=FALSE, lty="solid", density=-1, xlab="Sample Averages", main="Hypergeometric")
+ lines (x=normX, y=normY, type="l", col="red")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_hypergeometric_clt", settings="drawnorm.state=1\nfunction.string=hist\nhistogram_opt.addtoplot.state=\nhistogram_opt.barlabels.state=\nhistogram_opt.density.real=-1.000000\nhistogram_opt.doborder.state=1\nhistogram_opt.freq.state=0\nhistogram_opt.histbordercol.color.string=\nhistogram_opt.histbreaksFunction.string=Sturges\nhistogram_opt.histlinetype.string=solid\nhistogram_opt.rightclosed.state=1\nhistogram_opt.usefillcol.state=\nk.real=15.000000\nm.real=12.000000\nn.real=12.000000\nnAvg.real=10.000000\nnDist.real=1000.000000\nnormlinecol.color.string=red\nnormpointtype.string=l\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nscalenorm.state=0", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_clt.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_clt.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_clt.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1 @@
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (phyper (q = c (0, 1, 2, 3, 4, 5), m = 5, n = 4, k = 4, lower.tail=FALSE, log.p = FALSE))
+## Print result
+rk.header ("Hypergeometric probability", list ("Vector of quantiles", "c (0, 1, 2, 3, 4, 5)", "Number of white balls in the urn", "5", "Number of black balls in the urn", "4", "Number of balls drawn from the urn", "4", "Tail", "lower.tail=FALSE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Hypergeometric probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::hypergeometric_probabilities", settings="k.real=4.000000\nlogp.string=log.p = FALSE\nm.real=5.000000\nn.real=4.000000\nq.text=0 1 2 3 4 5\ntail.string=lower.tail=FALSE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,11 @@
+<h1>Hypergeometric probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0, 1, 2, 3, 4, 5)</li>
+<li>Number of white balls in the urn: 5</li>
+<li>Number of black balls in the urn: 4</li>
+<li>Number of balls drawn from the urn: 4</li>
+<li>Tail: lower.tail=FALSE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Hypergeometric probabilities: 0.99206 0.83333 0.35714 0.039683 0 0</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (qhyper (p = c (0.95), m = 1, n = 1, k = 1, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Hypergeometric quantile", list ("Vector of probabilities", "c (0.95)", "Number of white balls in the urn", "1", "Number of black balls in the urn", "1", "Number of balls drawn from the urn", "1", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Hypergeometric quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::hypergeometric_quantiles", settings="k.real=1.000000\nlogp.string=log.p = FALSE\nm.real=1.000000\nn.real=1.000000\np.text=0.95\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.hypergeometric_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,11 @@
+<h1>Hypergeometric quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (0.95)</li>
+<li>Number of white balls in the urn: 1</li>
+<li>Number of black balls in the urn: 1</li>
+<li>Number of balls drawn from the urn: 1</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Hypergeometric quantiles: 1</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.log_normal_clt.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.log_normal_clt.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.log_normal_clt.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,28 @@
+local({
+## Prepare
+## Compute
+## Print result
+# parameters:
+mean <- 0.00000000; sd <- 1.00000000;
+# mean and variances of the distribution of sample averages:
+avg.exp <- exp(mean+sd^2/2);
+avg.var <- (exp(2*mean+sd^2)*(exp(sd^2)-1))/10;
+# generate the entire data:
+data <- matrix(rlnorm(n=10000, meanlog=mean, sdlog=sd), nrow=10);
+# get the sample averages:
+avg <- colMeans(data);
+# generate random normal samples:
+normX <- seq(from=min(avg), to=max(avg), length=1000);
+normY <- dnorm (normX, mean = avg.exp, sd = sqrt(avg.var));
+dist.hist <- hist(avg, plot=FALSE, breaks="Scott");
+# calculate the ylims appropriately:
+ylim <- c(0,max(c(dist.hist$density, normY)));
+rk.graph.on ()
+try ({
+ plot(dist.hist, ylim=ylim, freq=FALSE, lty="solid", density=7, angle=45.00000000, border=FALSE, xlab="Sample Averages", main="Lognormal")
+ lines (x=normX, y=normY, type="l", col="red")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_log_normal_clt", settings="drawnorm.state=1\nfunction.string=hist\nhistogram_opt.addtoplot.state=\nhistogram_opt.angle.real=45.00000000\nhistogram_opt.barlabels.state=\nhistogram_opt.density.real=7.000000\nhistogram_opt.doborder.state=\nhistogram_opt.freq.state=0\nhistogram_opt.histbreaksFunction.string=Scott\nhistogram_opt.histlinetype.string=solid\nhistogram_opt.rightclosed.state=1\nhistogram_opt.usefillcol.state=\nmean.real=0.00000000\nnAvg.real=10.000000\nnDist.real=1000.000000\nnormlinecol.color.string=red\nnormpointtype.string=l\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nscalenorm.state=0\nsd.real=1.00000000", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.log_normal_clt.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.log_normal_clt.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.log_normal_clt.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1 @@
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.log_normal_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.log_normal_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.log_normal_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (plnorm (q = c (0.95), meanlog = 0.00000000, sdlog = 1.00000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Log Normal probability", list ("Vector of quantiles", "c (0.95)", "meanlog", "0.00000000", "sdlog", "1.00000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Log Normal probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::log_normal_probabilities", settings="logp.string=log.p = FALSE\nmeanlog.real=0.00000000\nq.text=0.95\nsdlog.real=1.00000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.log_normal_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.log_normal_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.log_normal_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Log Normal probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.95)</li>
+<li>meanlog: 0.00000000</li>
+<li>sdlog: 1.00000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Log Normal probabilities: 0.47955</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.log_normal_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.log_normal_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.log_normal_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (qlnorm (p = c (0.95), meanlog = 0.00000000, sdlog = 1.00000000, lower.tail=FALSE, log.p = FALSE))
+## Print result
+rk.header ("Log Normal quantile", list ("Vector of probabilities", "c (0.95)", "meanlog", "0.00000000", "sdlog", "1.00000000", "Tail", "lower.tail=FALSE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Log Normal quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::log_normal_quantiles", settings="logp.string=log.p = FALSE\nmeanlog.real=0.00000000\np.text=0.95\nsdlog.real=1.00000000\ntail.string=lower.tail=FALSE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.log_normal_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.log_normal_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.log_normal_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Log Normal quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (0.95)</li>
+<li>meanlog: 0.00000000</li>
+<li>sdlog: 1.00000000</li>
+<li>Tail: lower.tail=FALSE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Log Normal quantiles: 0.19304</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.logistic_clt.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.logistic_clt.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.logistic_clt.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,28 @@
+local({
+## Prepare
+## Compute
+## Print result
+# parameters:
+loc <- 0.00000000; scale <- 3.00000000;
+# mean and variances of the distribution of sample averages:
+avg.exp <- loc;
+avg.var <- ((pi^2/3)*scale^2)/10;
+# generate the entire data:
+data <- matrix(rlogis(n=10000, location=loc, scale=scale), nrow=10);
+# get the sample averages:
+avg <- colMeans(data);
+# generate random normal samples:
+normX <- seq(from=min(avg), to=max(avg), length=1000);
+normY <- dnorm (normX, mean = avg.exp, sd = sqrt(avg.var));
+dist.hist <- hist(avg, plot=FALSE, breaks=seq (floor (min (avg, na.rm=TRUE))-0.5, ceiling (max (avg, na.rm=TRUE))+0.5), right=FALSE);
+# calculate the ylims appropriately:
+ylim <- c(0,max(c(dist.hist$density, normY)));
+rk.graph.on ()
+try ({
+ plot(dist.hist, ylim=ylim, freq=FALSE, labels=TRUE, lty="solid", density=-1, xlab="Sample Averages", main="Logistic")
+ lines (x=normX, y=normY, type="l", col="red")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_logistic_clt", settings="drawnorm.state=1\nfunction.string=hist\nhistogram_opt.addtoplot.state=\nhistogram_opt.barlabels.state=1\nhistogram_opt.density.real=-1.000000\nhistogram_opt.doborder.state=1\nhistogram_opt.freq.state=0\nhistogram_opt.histbordercol.color.string=\nhistogram_opt.histbreaksFunction.string=int\nhistogram_opt.histlinetype.string=solid\nhistogram_opt.include_lowest.state=1\nhistogram_opt.rightclosed.state=\nhistogram_opt.usefillcol.state=\nloc.real=0.00000000\nnAvg.real=10.000000\nnDist.real=1000.000000\nnormlinecol.color.string=red\nnormpointtype.string=l\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nscale.real=3.00000000\nscalenorm.state=0", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.logistic_clt.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.logistic_clt.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.logistic_clt.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1 @@
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.logistic_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.logistic_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.logistic_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (plogis (q = c (0.95), location = 1.04000000, scale = 1.00000000, lower.tail=TRUE, log.p = TRUE))
+## Print result
+rk.header ("Logistic probability", list ("Vector of quantiles", "c (0.95)", "Location", "1.04000000", "Scale", "1.00000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = TRUE"))
+rk.results (result, titles="Logistic probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::logistic_probabilities", settings="location.real=1.04000000\nlogp.string=log.p = TRUE\nq.text=0.95\nscale.real=1.00000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.logistic_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.logistic_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.logistic_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Logistic probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.95)</li>
+<li>Location: 1.04000000</li>
+<li>Scale: 1.00000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = TRUE</li>
+</ul>
+DATE<br>
+<h3>Logistic probabilities: -0.73916</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.logistic_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.logistic_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.logistic_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (qlogis (p = c (0.95), location = 1.00000000, scale = 1.00000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Logistic quantile", list ("Vector of probabilities", "c (0.95)", "Location", "1.00000000", "Scale", "1.00000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Logistic quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::logistic_quantiles", settings="location.real=1.00000000\nlogp.string=log.p = FALSE\np.text=0.95\nscale.real=1.00000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.logistic_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.logistic_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.logistic_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Logistic quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (0.95)</li>
+<li>Location: 1.00000000</li>
+<li>Scale: 1.00000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Logistic quantiles: 3.9444</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (pnbinom (q = c (0.95), size = 3, prob = 0.50000000, lower.tail=TRUE, log.p = TRUE))
+## Print result
+rk.header ("Negative Binomial probability", list ("Vector of quantiles", "c (0.95)", "Size", "3", "Probability of success in each trial", "0.50000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = TRUE"))
+rk.results (result, titles="Negative Binomial probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::negative_binomial_probabilities", settings="logp.string=log.p = TRUE\nprob.real=0.50000000\nq.text=0.95\nsize.real=3.000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Negative Binomial probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.95)</li>
+<li>Size: 3</li>
+<li>Probability of success in each trial: 0.50000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = TRUE</li>
+</ul>
+DATE<br>
+<h3>Negative Binomial probabilities: -2.0794</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (qnbinom (p = c (0.95), size = 4, prob = 0.50000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Negative Binomial quantile", list ("Vector of probabilities", "c (0.95)", "Size", "4", "Probability of success in each trial", "0.50000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"))
+rk.results (result, titles="Negative Binomial quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::negative_binomial_quantiles", settings="logp.string=log.p = FALSE\np.text=0.95\nprob.real=0.50000000\nsize.real=4.000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.negative_binomial_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Negative Binomial quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (0.95)</li>
+<li>Size: 4</li>
+<li>Probability of success in each trial: 0.50000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Negative Binomial quantiles: 9</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.negbinomial_clt.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.negbinomial_clt.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.negbinomial_clt.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,28 @@
+local({
+## Prepare
+## Compute
+## Print result
+# parameters:
+size <- 12; prob <- 0.28000000;
+# mean and variances of the distribution of sample averages:
+avg.exp <- size*(1-prob)/prob;
+avg.var <- (size*(1-prob)/prob^2)/10;
+# generate the entire data:
+data <- matrix(rnbinom(n=10000, size=size, prob=prob), nrow=10);
+# get the sample averages:
+avg <- colMeans(data);
+# generate random normal samples:
+normX <- seq(from=min(avg), to=max(avg), length=1000);
+normY <- dnorm (normX, mean = avg.exp, sd = sqrt(avg.var));
+dist.hist <- hist(avg, plot=FALSE, breaks="Sturges");
+# calculate the ylims appropriately:
+ylim <- c(0,max(c(dist.hist$density, normY)));
+rk.graph.on ()
+try ({
+ plot(dist.hist, ylim=ylim, freq=FALSE, lty="solid", density=-1, xlab="Sample Averages", main="Negative Binomial")
+ lines (x=normX, y=normY, type="l", col="red")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_negbinomial_clt", settings="drawnorm.state=1\nfunction.string=hist\nhistogram_opt.addtoplot.state=\nhistogram_opt.barlabels.state=\nhistogram_opt.density.real=-1.000000\nhistogram_opt.doborder.state=1\nhistogram_opt.freq.state=0\nhistogram_opt.histbordercol.color.string=\nhistogram_opt.histbreaksFunction.string=Sturges\nhistogram_opt.histlinetype.string=solid\nhistogram_opt.rightclosed.state=1\nhistogram_opt.usefillcol.state=\nnAvg.real=10.000000\nnDist.real=1000.000000\nnormlinecol.color.string=red\nnormpointtype.string=l\nparam.string=pprob\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nprob.real=0.28000000\nscalenorm.state=0\nsize_disp.real=12.00000000\nsize_trial.real=12.000000", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.negbinomial_clt.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.negbinomial_clt.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.negbinomial_clt.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1 @@
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.normal_clt.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.normal_clt.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.normal_clt.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,25 @@
+local({
+## Prepare
+## Compute
+## Print result
+# parameters:
+mean <- 0.00000000; sd <- 1.00000000;
+# mean and variances of the distribution of sample averages:
+avg.exp <- mean;
+avg.var <- (sd^2)/10;
+# generate the entire data:
+data <- matrix(rnorm(n=10000, mean=mean, sd=sd), nrow=10);
+# get the sample averages:
+avg <- colMeans(data);
+# generate random normal samples:
+normX <- seq(from=min(avg), to=max(avg), length=1000);
+normY <- pnorm (normX, mean = avg.exp, sd = sqrt(avg.var));
+rk.graph.on ()
+try ({
+ plot(ecdf(avg), xlab="Sample Averages", main="Normal", verticals=TRUE, col.vert="blue", do.points=FALSE, col.hor="blue", col.01line=c("gold","cyan"))
+ lines (x=normX, y=normY, type="l", col="red")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_normal_clt", settings="dist_stepfun.addtoplot.state=\ndist_stepfun.col_hor.color.string=blue\ndist_stepfun.col_y0.color.string=gold\ndist_stepfun.col_y1.color.string=cyan\ndist_stepfun.do_points.state=\ndist_stepfun.linetype.string=\ndist_stepfun.verticals.state=1\ndrawnorm.state=1\nfunction.string=dist\nmean.real=0.00000000\nnAvg.real=10.000000\nnDist.real=1000.000000\nnormlinecol.color.string=red\nnormpointtype.string=l\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nscalenorm.state=0\nsd.real=1.00000000", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.normal_clt.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.normal_clt.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.normal_clt.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1 @@
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.normal_probabilities.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.normal_probabilities.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.normal_probabilities.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (pnorm (q = c (0.95), mean = 0.00000000, sd = 1.00000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Normal probability", list ("Vector of quantiles", "c (0.95)", "mu", "0.00000000", "sigma", "1.00000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"));
+rk.results (result, titles="Normal probabilities")
+})
+.rk.rerun.plugin.link(plugin="rkward::normal_probabilities", settings="logp.string=log.p = FALSE\nmean.real=0.00000000\nq.text=0.95\nsd.real=1.00000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.normal_probabilities.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.normal_probabilities.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.normal_probabilities.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Normal probability</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of quantiles: c (0.95)</li>
+<li>mu: 0.00000000</li>
+<li>sigma: 1.00000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Normal probabilities: 0.82894</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.normal_quantiles.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.normal_quantiles.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.normal_quantiles.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+local({
+## Prepare
+## Compute
+result <- (qnorm (p = c (0.95), mean = 0.00000000, sd = 1.00000000, lower.tail=TRUE, log.p = FALSE))
+## Print result
+rk.header ("Normal quantile", list ("Vector of probabilities", "c (0.95)", "mu", "0.00000000", "sigma", "1.00000000", "Tail", "lower.tail=TRUE", "Probabilities p are given as", "log.p = FALSE"));
+rk.results (result, titles="Normal quantiles")
+})
+.rk.rerun.plugin.link(plugin="rkward::normal_quantiles", settings="logp.string=log.p = FALSE\nmean.real=0.00000000\np.text=0.95\nsd.real=1.00000000\ntail.string=lower.tail=TRUE", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.normal_quantiles.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.normal_quantiles.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.normal_quantiles.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Normal quantile</h1>
+<h2>Parameters</h2>
+<ul><li>Vector of probabilities: c (0.95)</li>
+<li>mu: 0.00000000</li>
+<li>sigma: 1.00000000</li>
+<li>Tail: lower.tail=TRUE</li>
+<li>Probabilities p are given as: log.p = FALSE</li>
+</ul>
+DATE<br>
+<h3>Normal quantiles: 1.6449</h3>
\ No newline at end of file
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_binomial_distribution.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_binomial_distribution.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_binomial_distribution.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,14 @@
+local({
+## Prepare
+## Compute
+## Print result
+rk.header ("Binomial density function", list ("Lower quantile", "0", "Upper quantile", "12", "Number of trials", "12", "Probability of success on each trial", "0.50000000", "Scale", "normal", "Function", "dbinom"));
+
+rk.graph.on ()
+try ({
+ curve (dbinom(x, size=12, prob=0.50000000), from=0, to=12, n=13, type="p")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_binomial_distribution", settings="function.string=d\nlog.state=0\nmax.real=12.000000\nmin.real=0.000000\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=p\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nprob.real=0.50000000\nsize.real=12.000000", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_binomial_distribution.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_binomial_distribution.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_binomial_distribution.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,11 @@
+<h1>Binomial density function</h1>
+<h2>Parameters</h2>
+<ul><li>Lower quantile: 0</li>
+<li>Upper quantile: 12</li>
+<li>Number of trials: 12</li>
+<li>Probability of success on each trial: 0.50000000</li>
+<li>Scale: normal</li>
+<li>Function: dbinom</li>
+</ul>
+DATE<br>
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_cauchy_distribution.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_cauchy_distribution.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_cauchy_distribution.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,14 @@
+local({
+## Prepare
+## Compute
+## Print result
+rk.header ("Cauchy density function", list ("Number of Observations", "100", "Lower quantile", "-3.29000000", "Upper quantile", "3.29000000", "Location", "0.00000000", "Scale", "1.00000000", "Scale", "normal", "Function", "dcauchy"));
+
+rk.graph.on ()
+try ({
+ curve (dcauchy(x, location=0.00000000, scale=1.00000000), from=-3.29000000, to=3.29000000, n=100)
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_cauchy_distribution", settings="function.string=d\nloc.real=0.00000000\nlog.state=0\nmax.real=3.29000000\nmin.real=-3.29000000\nn.real=100.000000\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nscale.real=1.00000000", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_cauchy_distribution.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_cauchy_distribution.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_cauchy_distribution.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,12 @@
+<h1>Cauchy density function</h1>
+<h2>Parameters</h2>
+<ul><li>Number of Observations: 100</li>
+<li>Lower quantile: -3.29000000</li>
+<li>Upper quantile: 3.29000000</li>
+<li>Location: 0.00000000</li>
+<li>Scale: 1.00000000</li>
+<li>Scale: normal</li>
+<li>Function: dcauchy</li>
+</ul>
+DATE<br>
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_chi_squared_distribution.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_chi_squared_distribution.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_chi_squared_distribution.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,14 @@
+local({
+## Prepare
+## Compute
+## Print result
+rk.header ("Chisquare density function", list ("Number of Observations", "100", "Lower quantile", "0.30000000", "Upper quantile", "24.10000000", "Degrees of freedom", "4.00000000", "Non-centrality parameter", "0.00000000", "Scale", "normal", "Function", "dchisq"));
+
+rk.graph.on ()
+try ({
+ curve (dchisq(x, df=4.00000000, ncp=0.00000000), from=0.30000000, to=24.10000000, n=100)
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_chi_squared_distribution", settings="df.real=4.00000000\nfunction.string=d\nlog.state=0\nmax.real=24.10000000\nmin.real=0.30000000\nn.real=100.000000\nncp.real=0.00000000\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_chi_squared_distribution.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_chi_squared_distribution.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_chi_squared_distribution.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,12 @@
+<h1>Chisquare density function</h1>
+<h2>Parameters</h2>
+<ul><li>Number of Observations: 100</li>
+<li>Lower quantile: 0.30000000</li>
+<li>Upper quantile: 24.10000000</li>
+<li>Degrees of freedom: 4.00000000</li>
+<li>Non-centrality parameter: 0.00000000</li>
+<li>Scale: normal</li>
+<li>Function: dchisq</li>
+</ul>
+DATE<br>
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_exponential_distribution.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_exponential_distribution.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_exponential_distribution.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,14 @@
+local({
+## Prepare
+## Compute
+## Print result
+rk.header ("Exponential distribution function", list ("Number of Observations", "100", "Lower quantile", "0.00000000", "Upper quantile", "10.00000000", "Rate", "1.00000000", "Scale", "normal", "Tail","Upper", "Function", "pexp"));
+
+rk.graph.on ()
+try ({
+ curve (pexp(x, rate=1.00000000, lower.tail = FALSE), from=0.00000000, to=10.00000000, n=100)
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_exponential_distribution", settings="function.string=p\nlog.state=0\nlower.state=0\nmax.real=10.00000000\nmin.real=0.00000000\nn.real=100.000000\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nrate.real=1.00000000", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_exponential_distribution.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_exponential_distribution.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_exponential_distribution.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,12 @@
+<h1>Exponential distribution function</h1>
+<h2>Parameters</h2>
+<ul><li>Number of Observations: 100</li>
+<li>Lower quantile: 0.00000000</li>
+<li>Upper quantile: 10.00000000</li>
+<li>Rate: 1.00000000</li>
+<li>Scale: normal</li>
+<li>Tail: Upper</li>
+<li>Function: pexp</li>
+</ul>
+DATE<br>
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_f_distribution.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_f_distribution.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_f_distribution.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,14 @@
+local({
+## Prepare
+## Compute
+## Print result
+rk.header ("F density function", list ("Number of Observations", "100", "Lower quantile", "0.00100000", "Upper quantile", "25.00000000", "Numerator degrees of freedom", "5.00000000", "Denominator degrees of freedom", "5.00000000", "Non-centrality", "0.00000000", "Scale", "logarithmic", "Function", "df"));
+
+rk.graph.on ()
+try ({
+ curve (df(x, df1=5.00000000, df2=5.00000000, ncp=0.00000000, log=TRUE), from=0.00100000, to=25.00000000, n=100)
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_f_distribution", settings="df1.real=5.00000000\ndf2.real=5.00000000\nfunction.string=d\nlog.state=1\nmax.real=25.00000000\nmin.real=0.00100000\nn.real=100.000000\nncp.real=0.00000000\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_f_distribution.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_f_distribution.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_f_distribution.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,13 @@
+<h1>F density function</h1>
+<h2>Parameters</h2>
+<ul><li>Number of Observations: 100</li>
+<li>Lower quantile: 0.00100000</li>
+<li>Upper quantile: 25.00000000</li>
+<li>Numerator degrees of freedom: 5.00000000</li>
+<li>Denominator degrees of freedom: 5.00000000</li>
+<li>Non-centrality: 0.00000000</li>
+<li>Scale: logarithmic</li>
+<li>Function: df</li>
+</ul>
+DATE<br>
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_gamma_distribution.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_gamma_distribution.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_gamma_distribution.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,14 @@
+local({
+## Prepare
+## Compute
+## Print result
+rk.header ("Gamma density function", list ("Number of Observations", "100", "Lower quantile", "0.01000000", "Upper quantile", "4.60000000", "Shape", "1.61000000", "Rate", "0.87000000", "Scale", "normal", "Function", "dgamma"));
+
+rk.graph.on ()
+try ({
+ curve (dgamma(x, shape=1.61000000, rate=0.87000000), from=0.01000000, to=4.60000000, n=100)
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_gamma_distribution", settings="function.string=d\nlog.state=0\nmax.real=4.60000000\nmin.real=0.01000000\nn.real=100.000000\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nrate.real=0.87000000\nshape.real=1.61000000", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_gamma_distribution.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_gamma_distribution.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_gamma_distribution.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,12 @@
+<h1>Gamma density function</h1>
+<h2>Parameters</h2>
+<ul><li>Number of Observations: 100</li>
+<li>Lower quantile: 0.01000000</li>
+<li>Upper quantile: 4.60000000</li>
+<li>Shape: 1.61000000</li>
+<li>Rate: 0.87000000</li>
+<li>Scale: normal</li>
+<li>Function: dgamma</li>
+</ul>
+DATE<br>
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_geometric_distribution.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_geometric_distribution.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_geometric_distribution.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,14 @@
+local({
+## Prepare
+## Compute
+## Print result
+rk.header ("Geometric density function", list ("Lower quantile", "0", "Upper quantile", "12", "Probability of success on each trial", "0.50000000", "Scale", "normal", "Function", "dgeom"));
+
+rk.graph.on ()
+try ({
+ curve (dgeom(x, prob=0.50000000), from=0, to=12, n=13, type="p")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_geometric_distribution", settings="function.string=d\nlog.state=0\nmax.real=12.000000\nmin.real=0.000000\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=p\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\nprob.real=0.50000000", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_geometric_distribution.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_geometric_distribution.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_geometric_distribution.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,10 @@
+<h1>Geometric density function</h1>
+<h2>Parameters</h2>
+<ul><li>Lower quantile: 0</li>
+<li>Upper quantile: 12</li>
+<li>Probability of success on each trial: 0.50000000</li>
+<li>Scale: normal</li>
+<li>Function: dgeom</li>
+</ul>
+DATE<br>
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_hypergeometric_distribution.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_hypergeometric_distribution.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_hypergeometric_distribution.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,14 @@
+local({
+## Prepare
+## Compute
+## Print result
+rk.header ("Hypergeometric distribution function", list ("Lower quantile", "0", "Upper quantile", "12", "Number of white balls", "12", "Number of black balls", "12", "Number of balls drawn", "15", "Scale", "normal", "Tail","Lower", "Function", "phyper"));
+
+rk.graph.on ()
+try ({
+ curve (phyper(x, m=12, n=12, k=15, lower.tail = TRUE), from=0, to=12, n=13, type="p")
+})
+rk.graph.off ()
+})
+.rk.rerun.plugin.link(plugin="rkward::plot_hypergeometric_distribution", settings="function.string=p\nk.real=15.000000\nlog.state=0\nlower.state=1\nm.real=12.000000\nmax.real=12.000000\nmin.real=0.000000\nn_val.real=12.000000\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00000000\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=p\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=", label="Run again")
+.rk.make.hr()
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_hypergeometric_distribution.rkout
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_hypergeometric_distribution.rkout (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_hypergeometric_distribution.rkout 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,13 @@
+<h1>Hypergeometric distribution function</h1>
+<h2>Parameters</h2>
+<ul><li>Lower quantile: 0</li>
+<li>Upper quantile: 12</li>
+<li>Number of white balls: 12</li>
+<li>Number of black balls: 12</li>
+<li>Number of balls drawn: 15</li>
+<li>Scale: normal</li>
+<li>Tail: Lower</li>
+<li>Function: phyper</li>
+</ul>
+DATE<br>
+<img src="graph.png" width="480" height="480"><br>
Added: trunk/rkward/tests/distributions/RKTestStandard.plot_log_normal_distribution.rkcommands.R
===================================================================
--- trunk/rkward/tests/distributions/RKTestStandard.plot_log_normal_distribution.rkcommands.R (rev 0)
+++ trunk/rkward/tests/distributions/RKTestStandard.plot_log_normal_distribution.rkcommands.R 2009-09-24 14:09:03 UTC (rev 2660)
@@ -0,0 +1,14 @@
+local({
+## Prepare
+## Compute
+## Print result
+rk.header ("Lognormal distribution function", list ("Number of Observations", "100", "Lower quantile", "0.01000000", "Upper quantile", "3.29000000", "Mean", "4.00000000", "Standard deviation", "1.00000000", "Scale", "normal", "Tail","Lower", "Function", "plnorm"));
+
+rk.graph.on ()
+try ({
+ curve (plnorm(x, meanlog=4.00000000, sdlog=1.00000000, lower.tail = TRUE), from=0.01000000, to=3.29000000, n=100)
+})
+rk.graph.off ()
+})
@@ Diff output truncated at 100000 characters. @@
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