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

kapatp at users.sourceforge.net kapatp at users.sourceforge.net
Mon Mar 19 05:40:36 UTC 2007


Revision: 1630
          http://svn.sourceforge.net/rkward/?rev=1630&view=rev
Author:   kapatp
Date:     2007-03-18 22:40:35 -0700 (Sun, 18 Mar 2007)

Log Message:
-----------
Allow non-integer values for the dispersion (size) parameter when mu-parameterisation is used for negative binomial distribution

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.rkh
    trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml

Modified: trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php	2007-03-19 05:24:55 UTC (rev 1629)
+++ trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php	2007-03-19 05:40:35 UTC (rev 1630)
@@ -41,14 +41,15 @@
 	}
 	$min = getRK_val ("min");
 	$max = getRK_val ("max");
-	$size = getRK_val ("size");
 	$paramTag = "";
 	$paramVal = "";
  	if (getRK_val ("param") == "pprob") {
+		$size = getRK_val ("size_trial");
 		$paramTag = ", prob=";
 		$paramVal = getRK_val ("prob");
 		$paramLabel = "Probability of success in each trial";
 	} else {
+		$size = getRK_val ("size_disp");
 		$paramTag = ", mu=";
 		$paramVal = getRK_val ("mu");
 		$paramLabel = "Alternative parameter, mu";

Modified: trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.rkh
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.rkh	2007-03-19 05:24:55 UTC (rev 1629)
+++ trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.rkh	2007-03-19 05:40:35 UTC (rev 1630)
@@ -15,7 +15,8 @@
 		</setting>
 		<setting id="min">Smallest value at which the function is to be plotted.</setting>
 		<setting id="max">Largest value at which the function is to be plotted. Since this is a discrete distribution the function will be evaluated at all the integers between the lower quantile and the upper quantile (inclusive of the end points).</setting>
-		<setting id="size">See R reference on Negative Binomial distribution.</setting>
+		<setting id="size_trial">This is the <i>size</i> parameter when the 'probability' form of the parameterisation is used. This is always a non-negative integer. See R reference on Negative Binomial distribution.</setting>
+		<setting id="size_disp">This is the <i>size</i> parameter when the 'mu' form of the parameterisation is used. This is a non-negative real number. See R reference on Negative Binomial distribution.</setting>
 		<setting id="prob">See R reference on Negative Binomial distribution.</setting>
 		<setting id="mu">See R reference on Negative Binomial distribution.</setting>
 		<setting id="param">The type of the parameterization to be used. See R reference on Negative Binomial distribution.</setting>

Modified: trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml	2007-03-19 05:24:55 UTC (rev 1629)
+++ trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml	2007-03-19 05:40:35 UTC (rev 1630)
@@ -8,8 +8,10 @@
 		<connect client="lower.enabled" governor="dodist" />
 		<convert id="useprob" mode="equals" sources="param.string" standard="pprob" />
 		<connect client="prob.enabled" governor="useprob" />
+		<connect client="size_trial.visible" governor="useprob" />
 		<convert id="usemu" mode="equals" sources="param.string" standard="pmu" />
 		<connect client="mu.enabled" governor="usemu" />
+		<connect client="size_disp.visible" governor="usemu" />
 		<set id="plotoptions.allow_log" to="false"/>
 		<set id="plotoptions.default_pointtype" to="p"/>
 	</logic>
@@ -23,14 +25,15 @@
 							<spinbox type="integer" min = "0" id="max" initial="24" label="Upper quantile" />
 						</frame>
 						<frame label="Parameters">
-							<spinbox type="integer" id="size" min="1" initial="12" label="Target number of successful trials" />
+							<spinbox type="integer" id="size_trial" min="1" initial="12" label="Target number of successful trials" />
+							<spinbox id="size_disp" min="0.01" initial="12.00" label="Dispersion (Size)"/>
 							<row>
 							<column>
 							<spinbox default_precision="2" type="real" id="prob" initial="0.75" min="0" max="1" label="Probability of success on each trial" />
 							<spinbox default_precision="2" type="real" id="mu" initial="4" min="0.01" label="Mean (alternate parameter, mu)" />
 						</column>
 						<column>
-						<radio id="param" label="Choose the type of Parameterization" >
+						<radio id="param" label="Type of Parameterization" >
 							<option value="pprob" label="Success probability" />
 							<option value="pmu" label="Mean (mu)" />
 						</radio>


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