[rkward-cvs] rkward/rkward/plugins/distributions binomial_probabilities.php,NONE,1.1 binomial_probabilities.xml,NONE,1.1 binomial_quantiles.php,NONE,1.1 binomial_quantiles.xml,NONE,1.1 binomial_tail_probabilities.php,NONE,1.1 binomial_tail_probabilities.xml,NONE,1.1 chi_squared_probabilities.php,NONE,1.1 chi_squared_probabilities.xml,NONE,1.1 chi_squared_quantiles.php,NONE,1.1 chi_squared_quantiles.xml,NONE,1.1 f_probabilities.php,NONE,1.1 f_probabilities.xml,NONE,1.1 f_quantiles.php,NONE,1.1 f_quantiles.xml,NONE,1.1 normal_probabilities.php,NONE,1.1 normal_probabilities.xml,NONE,1.1 normal_quantiles.php,NONE,1.1 normal_quantiles.xml,NONE,1.1 plot_binomial_distribution.php,NONE,1.1 plot_binomial_distribution.xml,NONE,1.1 plot_chi_squared_distribution.php,NONE,1.1 plot_chi_squared_distribution.xml,NONE,1.1 plot_f_distribution.php,NONE,1.1 plot_f_distribution.xml,NONE,1.1 plot_normal_distribution.php,NONE,1.1 plot_normal_distribution.xml,NONE,1.1 plot_poisson_distribution.php,NONE,1.1 plot_poisson_distribution.xml,NONE,1.1 plot_t_distribution.php,NONE,1.1 plot_t_distribution.xml,NONE,1.1 poisson_probabilities.php,NONE,1.1 poisson_probabilities.xml,NONE,1.1 t_probabilities.php,NONE,1.1 t_probabilities.xml,NONE,1.1 t_quantiles.php,NONE,1.1 t_quantiles.xml,NONE,1.1

Thomas Friedrichsmeier tfry at users.sourceforge.net
Sun Mar 12 18:09:14 UTC 2006


Update of /cvsroot/rkward/rkward/rkward/plugins/distributions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3059

Added Files:
	binomial_probabilities.php binomial_probabilities.xml 
	binomial_quantiles.php binomial_quantiles.xml 
	binomial_tail_probabilities.php 
	binomial_tail_probabilities.xml chi_squared_probabilities.php 
	chi_squared_probabilities.xml chi_squared_quantiles.php 
	chi_squared_quantiles.xml f_probabilities.php 
	f_probabilities.xml f_quantiles.php f_quantiles.xml 
	normal_probabilities.php normal_probabilities.xml 
	normal_quantiles.php normal_quantiles.xml 
	plot_binomial_distribution.php plot_binomial_distribution.xml 
	plot_chi_squared_distribution.php 
	plot_chi_squared_distribution.xml plot_f_distribution.php 
	plot_f_distribution.xml plot_normal_distribution.php 
	plot_normal_distribution.xml plot_poisson_distribution.php 
	plot_poisson_distribution.xml plot_t_distribution.php 
	plot_t_distribution.xml poisson_probabilities.php 
	poisson_probabilities.xml t_probabilities.php 
	t_probabilities.xml t_quantiles.php t_quantiles.xml 
Log Message:
Adding distribution plugins by Stefan Roediger

--- NEW FILE: t_probabilities.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp = (pt (q = <? getRK ("val"); ?>, df = <? getRK ("df"); ?>, <? getRK ("tail"); ?>))
rk.temp.date = date()
<?
	}
	
	function printout () {

		//produce the output
?>
cat ("<h1>t probaility</h1>")

	cat ("<table border = \"1\">")
		cat ("<TR><TD>Method:</TD><TD>Variable value : <? getRK ("val"); ?></TD><TD>Degree of Freedom :  <? getRK ("df"); ?></TD><TD><? getRK ("tail"); ?></TD></TR>")
		cat ("<TR><TD>", rk.temp.date,"</TD></TR>")
			cat ("<TR><TD></TD></TR>")
		cat ("<TR><TD>t probaility:</TD><TD> ", rk.temp," </TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp)
rm (rk.temp.date)
<?
	}
?>

--- NEW FILE: poisson_probabilities.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
		$vars = "substitute (" . str_replace ("\n", "), substitute (", trim (getRK_val ("x"))) . ")";
?>
rk.temp.options <- list (doquantile=<? getRK ("quantile"); ?>)
rk.temp.results <- list ()
i=0; for (var in list (<? echo ($vars); ?>)) {
	i = i+1
	rk.temp.results[[i]] <- list ()
	rk.temp.results[[i]]$object <- var
	if (rk.temp.options$doquantile) try (rk.temp.results[[i]]$quantile <- quantile (eval (var), na.rm= <? getRK ("narm"); ?>, type = <? getRK ("samplequantile"); ?>, name = <? getRK ("names"); ?>, probs = seq(<? getRK ("probs1"); ?>, <? getRK ("probs2"); ?>, <? getRK ("probs3"); ?>)))
}<?
	}
	
	function printout () {
?>
cat ("<h1>Descriptive statistics</h1>")

cat ("<table border=\"1\"><tr><td>Variable</td>")
if (rk.temp.options$doquantile) cat ("<td>quantile</td>")
cat ("</tr>")

for (i in 1:length (rk.temp.results)) {
	cat (paste ("<tr><td>", rk.get.description (rk.temp.results[[i]]$object), "</td>"))
	if (rk.temp.options$doquantile) cat (paste ("<td>", rk.temp.results[[i]]$quantile, "</td>"))
	cat ("</tr>")
}
cat ("</table>")
<?
	}
	
	function cleanup () {
?>rm (rk.temp.options)
rm (rk.temp.results)
<?
	}
?>

--- NEW FILE: normal_quantiles.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp = (qnorm (p = <? getRK ("p"); ?>, mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>, <? getRK ("tail"); ?>))
rk.temp.date = date()
<?
	}
	
	function printout () {

		//produce the output
?>
cat ("<h1>Normal quantile</h1>")

	cat ("<table border = \"1\">")
		cat ("<TR><TD>Method:</TD><TD>n = <? getRK ("p"); ?></TD><TD>mu =  <? getRK ("mean"); ?></TD><TD>sigma = <?getRK ("sd"); ?></TD><TD><? getRK ("tail"); ?></TD></TR>")
		cat ("<TR><TD>", rk.temp.date,"</TD></TR>")
			cat ("<TR><TD></TD></TR>")
		cat ("<TR><TD>Normal quantile:</TD><TD> ", rk.temp," </TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp)
rm (rk.temp.date)
<?
	}
?>

--- NEW FILE: plot_f_distribution.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp.date = date()
<?
	}
	
	function printout () {
?>cat ("<h1>Plot F density <? getRK ("function"); ?></h1>")
rk.graph.on ()
plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>))
rk.graph.off ()
cat ("<table border = \"1\">")
		cat ("<TR><TD>Created</TD><TD> ", rk.temp.date," </TD></TR>")
		cat ("<TR><TD>Number of Observations</TD><TD><? getRK ("n"); ?></TD></TR>")
		cat ("<TR><TD>Minimum</TD><TD><? getRK ("min"); ?></TD></TR>")
		cat ("<TR><TD>Maximum</TD><TD><? getRK ("max"); ?></TD></TR>")
		cat ("<TR><TD>Numerator degrees of freedom</TD><TD><? getRK ("df1"); ?></TD></TR>")
		cat ("<TR><TD>Denominator degrees of freedom</TD><TD><? getRK ("df2"); ?></TD></TR>")
		cat ("<TR><TD>Function</TD><TD><? getRK ("function"); ?></TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp.date)
rm (rk.temp.seq)
<?
	}
?>

--- NEW FILE: f_probabilities.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp = (pf (q = <? getRK ("val"); ?>, df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>,  ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>))
rk.temp.date = date()
<?
	}
	
	function printout () {

		//produce the output
?>
cat ("<h1>F probability</h1>")

	cat ("<table border = \"1\">")
		cat ("<TR><TD>Method:</TD><TD>Variable value = <? getRK ("val"); ?></TD><TD>Numerator degree of freedom = <? getRK ("df1"); ?></TD><TD>Denominator degree of freedom =  <? getRK ("df2"); ?></TD><TD> non-centrality parameter = <? getRK ("ncp"); ?></TD><TD><? getRK ("tail"); ?></TD></TR>")
		cat ("<TR><TD>", rk.temp.date,"</TD></TR>")
			cat ("<TR><TD></TD></TR>")
		cat ("<TR><TD>F probability:</TD><TD> ", rk.temp," </TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp)
rm (rk.temp.date)
<?
	}
?>

--- NEW FILE: normal_probabilities.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp = (pnorm (q = <? getRK ("val"); ?>, mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>, <? getRK ("tail"); ?>))
rk.temp.date = date()
<?
	}
	
	function printout () {

		//produce the output
?>
cat ("<h1>Normal probabilities</h1>")

	cat ("<table border = \"1\">")
		cat ("<TR><TD>Method:</TD><TD>Variable value(s) = <? getRK ("val"); ?></TD><TD>mu =  <? getRK ("mean"); ?></TD><TD>sigma = <?getRK ("sd"); ?></TD><TD><? getRK ("tail"); ?></TD></TR>")
		cat ("<TR><TD>", rk.temp.date,"</TD></TR>")
			cat ("<TR><TD></TD></TR>")
		cat ("<TR><TD>Normal quantile:</TD><TD> ", rk.temp," </TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp)
rm (rk.temp.date)
<?
	}
?>

--- NEW FILE: plot_f_distribution.xml ---
<!DOCTYPE rkplugin>
<!--This is the simple "Plot F probabilities" plugin--><document>
  <code file="plot_f_distribution.php" />
  <dialog label="Plot F probabilities" >
    <tabbook>
      <tab label="Plot F probabilities" >
        <frame>
          <row>
            <column>
              <row>
                <spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="n" initial="100" max="10000000" label="Number of Observations" />
              </row>
              <row>
                <frame label="Range" >
			<spinbox max_precision="" default_precision="" type="real" min="0.001" id="min" initial="0.001" max="10000000" label="Minumum" />
			<spinbox max_precision="" default_precision="" type="real" min="0.001" id="max" initial="1999" max="10000000" label="Maximum" />
                </frame>
              </row>
              <row>
                <spinbox max_precision="" default_precision="" type="real" min="1" id="df1" initial="1" max="10000000" label="Numerator degrees of freedom" />
		<spinbox max_precision="2" default_precision="2" type="real" min="1" id="df2" initial="1" max="10000000" label="Denominator degrees of freedom" />
              </row>
            </column>
            <column>
              <radio id="function" label="Choose type of function plot" >
		      <option value="df" label="Plot density function" />
		<option value="pf" label="Plot distribution" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: plot_chi_squared_distribution.xml ---
<!DOCTYPE rkplugin>
<!--This is the simple "Plot Chi-squared probabilities" plugin--><document>
  <code file="plot_chi_squared_distribution.php" />
  <dialog label="Plot Chi-squared probabilities" >
    <tabbook>
	    <tab label="Plot Chi-squared probabilities" >
        <frame>
          <row>
            <column>
              <row>
                <spinbox max_precision="" default_precision="4" type="real" min="-10000000" id="n" initial="100" max="10000000" label="Number of Observations" />
              </row>
              <row>
                <frame label="Range" >
			<spinbox max_precision="" default_precision="4" type="real" min="-10000000" id="min" initial="0.299" max="10000000" label="Minumum" />
			<spinbox max_precision="" default_precision="4" type="real" min="-10000000" id="max" initial="24.103" max="10000000" label="Maximum" />
                </frame>
              </row>
              <row>
                <spinbox max_precision="1" default_precision="1" type="real" min="-10000000" id="df" initial="0" max="10000000" label="Degree of freedom" />
              </row>
            </column>
            <column>
              <radio id="function" label="Choose type of function plot" >
		      <option value="dchisq" label="Plot density function" />
		      <option value="pchisq" label="Plot distribution" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: t_probabilities.xml ---
<!DOCTYPE rkplugin>
<!--This is the "t probability" plugin-->
<document>
  <code file="t_probabilities.php" />
  <dialog label="t probability" >
    <tabbook>
      <tab label="t probability" >
        <frame>
          <row>
            <column>
              <spinbox max_precision="2" default_precision="2" type="real" initial="" id="val" min="0" max="1" label="Variable value"/>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="df" min="0" max="10" label="Degree of Freedom"/>
            </column>
            <column>
              <radio id="tail" label="Choose type of probability" >
                <option value="lower.tail=TRUE" label="lower tail" />
                <option value="lower.tail=FALSE" label="upper tail" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: normal_quantiles.xml ---
<!DOCTYPE rkplugin>
<!--This is the simple "Normal quantile" plugin-->
<document>
  <code file="normal_quantiles.php" />
  <dialog label="Normal quantile" >
    <tabbook>
      <tab label="Normal quantile" >
        <frame>
          <row>
            <column>
              <spinbox max_precision="4" default_precision="4" type="real" initial="0.95" id="p" min="0" max="1" label="probability [0,1]" depend="probs" />
              <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="mean" min="-10000000" max="10000000" label="mu (mean)" depend="probs" />
              <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="sd" min="-10000000" max="10000000" label="sigma (standard deviation)" depend="probs" />
            </column>
            <column>
              <radio id="tail" label="Choose type of probability" >
                <option value="lower.tail=TRUE" label="lower tail" />
                <option value="lower.tail=FALSE" label="upper tail" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: f_probabilities.xml ---
<!DOCTYPE rkplugin>
<!--This is the "F probability" plugin--><document>
  <code file="f_probabilities.php" />
  <dialog label="F probability" >
    <tabbook>
      <tab label="F probability" >
        <frame>
          <row>
            <column>
		    <spinbox max_precision="2" default_precision="2" type="real" initial="" id="val" min="-1000000" max="1000000" label="Variable value"/>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="df1" min="0" max="10" label="Numerator degree of Freedom"/>
	      <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="df2" min="0" max="10" label="Denominator degree of Freedom"/>
	      <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="ncp" min="0" max="1417" label="non-centrality parameter"/>	
            </column>
            <column>
              <radio id="tail" label="Choose type of probability" >
                <option value="lower.tail=TRUE" label="lower tail" />
                <option value="upper.tail=TRUE" label="upper tail" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: plot_poisson_distribution.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp.date = date()
<?
	}
	
	function printout () {
?>cat ("<h1>Plot density <? getRK ("function"); ?></h1>")
rk.graph.on ()
plot (<? getRK ("function"); ?> (<? getRK ("min"); ?> : <? getRK ("max"); ?>) , lambda = <? getRK ("mean"); ?>)
rk.graph.off ()
cat ("<table border = \"1\">")
		cat ("<TR><TD>Created</TD><TD> ", rk.temp.date," </TD></TR>")
		cat ("<TR><TD>Minimum</TD><TD><? getRK ("min"); ?></TD></TR>")
		cat ("<TR><TD>Maximum</TD><TD><? getRK ("max"); ?></TD></TR>")
		cat ("<TR><TD>Mean</TD><TD><? getRK ("mean"); ?></TD></TR>")
		cat ("<TR><TD>Function</TD><TD><? getRK ("function"); ?></TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp.date)
rm (rk.temp.seq)
<?
	}
?>

--- NEW FILE: f_quantiles.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp = (qf (p = <? getRK ("p"); ?>, df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>, <? getRK ("tail"); ?>))
rk.temp.date = date()
<?
	}
	
	function printout () {

		//produce the output
?>
cat ("<h1>F quantile</h1>")

	cat ("<table border = \"1\">")
		cat ("<TR><TD>Method:</TD><TD>Probabilities [0,1] : <? getRK ("p"); ?></TD><TD>Numerator degree of freedom :  <? getRK ("df1"); ?></TD><TD>Denominator degree of freedom :  <? getRK ("df2"); ?></TD><TD><? getRK ("tail"); ?></TD></TR>")
		cat ("<TR><TD>", rk.temp.date,"</TD></TR>")
			cat ("<TR><TD></TD></TR>")
		cat ("<TR><TD>F quantile:</TD><TD> ", rk.temp," </TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp)
rm (rk.temp.date)
<?
	}
?>

--- NEW FILE: chi_squared_quantiles.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp = (qchisq (p = <? getRK ("p"); ?>, df = <? getRK ("df"); ?>, ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>))
rk.temp.date = date()
<?
	}
	
	function printout () {

		//produce the output
?>
cat ("<h1>Chi-squared quantile</h1>")

	cat ("<table border = \"1\">")
		cat ("<TR><TD>Method:</TD><TD>Probabilities [0,1] : <? getRK ("p"); ?></TD><TD>Degree of Freedom :  <? getRK ("df"); ?></TD><TD> non-centrality parameter = <? getRK ("ncp"); ?></TD><TD><? getRK ("tail"); ?></TD></TR>")
		cat ("<TR><TD>", rk.temp.date,"</TD></TR>")
			cat ("<TR><TD></TD></TR>")
		cat ("<TR><TD>Chi-squared quantile:</TD><TD> ", rk.temp," </TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp)
rm (rk.temp.date)
<?
	}
?>

--- NEW FILE: chi_squared_quantiles.xml ---
<!DOCTYPE rkplugin>
<!--This is the "Chi-squared quantile" plugin--><document>
  <code file="chi_squared_quantiles.php" />
  <dialog label="Chi-squared quantile" >
    <tabbook>
      <tab label="Chi-squared quantile" >
        <frame>
          <row>
            <column>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="p" min="0" max="1" label="Probability"/>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="df" min="0" max="10" label="Degree of Freedom"/>
	      <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="ncp" min="0" max="1417" label="non-centrality parameter"/>
            </column>
            <column>
              <radio id="tail" label="Choose type of probability" >
                <option value="lower.tail=TRUE" label="lower tail" />
                <option value="upper.tail=TRUE" label="upper tail" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: binomial_tail_probabilities.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp = (pbinom (q = <? getRK ("q"); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>))
rk.temp.date = date()
<?
	}
	
	function printout () {

		//produce the output
?>
cat ("<h1>Binomial tail probability</h1>")

	cat ("<table border = \"1\">")
		cat ("<TR><TD>Method:</TD><TD>Variable value = <? getRK ("q"); ?></TD><TD>Binomial trials =  <? getRK ("size"); ?></TD><TD>Probability of success =  <? getRK ("prob"); ?></TD><TD><? getRK ("tail"); ?></TD></TR>")
		cat ("<TR><TD>", rk.temp.date,"</TD></TR>")
			cat ("<TR><TD></TD></TR>")
		cat ("<TR><TD>Binomial tail probability:</TD><TD> ", rk.temp," </TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp)
rm (rk.temp.date)
<?
	}
?>

--- NEW FILE: plot_binomial_distribution.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp.date = date()
<?
	}
	
	function printout () {
?>cat ("<h1>Plot density <? getRK ("function"); ?></h1>")
rk.graph.on ()
plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>))
rk.graph.off ()
cat ("<table border = \"1\">")
		cat ("<TR><TD>Created</TD><TD> ", rk.temp.date," </TD></TR>")
		cat ("<TR><TD>Number of Observations</TD><TD><? getRK ("n"); ?></TD></TR>")
		cat ("<TR><TD>Minimum</TD><TD><? getRK ("min"); ?></TD></TR>")
		cat ("<TR><TD>Maximum</TD><TD><? getRK ("max"); ?></TD></TR>")
		cat ("<TR><TD>Mean</TD><TD><? getRK ("mean"); ?></TD></TR>")
		cat ("<TR><TD>Standard Deviation</TD><TD><? getRK ("sd"); ?></TD></TR>")
		cat ("<TR><TD>Function</TD><TD><? getRK ("function"); ?></TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp.date)
rm (rk.temp.seq)
<?
	}
?>

--- NEW FILE: poisson_probabilities.xml ---
<!DOCTYPE rkplugin>
<!--This is the "Quntile plugin"
Description
	The generic function quantile produces sample quantiles corresponding to the given probabilities. The smallest observation corresponds to a probability of 0 and the largest to a probability of 1. 

Usage
	quantile(x, ...)

## Default S3 method:
quantile(x, probs = seq(0, 1, 0.25), na.rm = FALSE,
         names = TRUE, type = 7, ...)

--><document>
  <code file="poisson_probabilities.php" />
  <dialog label="Descriptive Statistics" >
    <tabbook>
      <tab label="Vairabel(s)" >
        <row>
          <column>
            <varselector id="vars" />
          </column>
          <column>
            <varslot multi="true" type="numeric" id="x" source="vars" label="variable(s):" required="true" />
          </column>
        </row>
      </tab>
      <tab label="Arguments" >
        <frame label="Options" >
          <row>
            <column>
              <checkbox value_unchecked="FALSE" checked="true" value="TRUE" id="names" label="Names" />
              <checkbox value_unchecked="FALSE" checked="true" value="TRUE" id="narm" label="Remove Missing Values" />
            </column>
            <spinbox default_precission="10" type="integer" id="" min="1" initial="5" max="10" label="Precision" />
          </row>
        </frame>
        <radio value_unchecked="0" checked="TRUE" value="1" id="samplequantile" label="Sample Quantile Types" >
          <option checked="false" value="1" id="type1" label="Inverse of empirical distribution function" />
          <option checked="false" value="2" id="type2" label="Similar to type 1 but with averaging at discontinuities" />
          <option checked="false" value="3" id="type3" label="SAS definition: nearest even order statistic" />
          <option checked="false" value="4" id="type4" label="p(k) = k / n (linear interpolation of the empirical cdf)" />
          <option checked="false" value="5" id="type5" label="p(k) = (k - 0.5) / n (piecewise linear function where the knots are the values midway through the steps of the empirical cdf)" />
          <option checked="false" value="6" id="type6" label="p(k) = k / (n + 1). Thus p(k) = E[F(x[k])] (used by Minitab and by SPSS)" />
          <option checked="false" value="7" id="type7" label="p(k) = (k - 1) / (n - 1). In this case, p(k) = mode[F(x[k])] (used by S)" />
          <option checked="true" value="8" id="type8" label="p(k) = (k - 1/3) / (n + 1/3). Then p(k) =~ median[F(x[k])] (resulting quantile estimates are approximately median-unbiased regardless of the distribution of x)" />
          <option checked="false" value="9" id="type9" label="p(k) = (k - 3/8) / (n + 1/4) (resulting quantile estimates are approximately unbiased if x is normally distributed" />
        </radio>
      </tab>
      <tab label="Probabilities" >
        <frame label="numeric vector of probabilities with values in [0,1]" >
          <spinbox max_precision="2" default_precision="2" type="real" min="0" id="probs1" initial="0" max="1" depend="probs" label="Lower" />
          <spinbox max_precision="2" default_precision="2" type="real" min="0" id="probs2" initial="1" max="1" depend="probs" label="Mid" />
          <spinbox max_precision="2" default_precision="2" type="real" min="0" id="probs3" initial="0.25" max="1" depend="probs" label="Upper" />
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: plot_chi_squared_distribution.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp.date = date()
<?
	}
	
	function printout () {
?>cat ("<h1>Plot density <? getRK ("function"); ?></h1>")
rk.graph.on ()
plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , df = <? getRK ("df"); ?>), xlab=expression(chi^2))
rk.graph.off ()
cat ("<table border = \"1\">")
		cat ("<TR><TD>Created</TD><TD> ", rk.temp.date," </TD></TR>")
		cat ("<TR><TD>Number of Observations</TD><TD><? getRK ("n"); ?></TD></TR>")
		cat ("<TR><TD>Minimum</TD><TD><? getRK ("min"); ?></TD></TR>")
		cat ("<TR><TD>Maximum</TD><TD><? getRK ("max"); ?></TD></TR>")
		cat ("<TR><TD>Degree of freedom</TD><TD><? getRK ("df"); ?></TD></TR>")
		cat ("<TR><TD>Function</TD><TD><? getRK ("function"); ?></TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp.date)
rm (rk.temp.seq)
<?
	}
?>

--- NEW FILE: plot_binomial_distribution.xml ---
<!DOCTYPE rkplugin>
<!--This is the simple "Plot normal probabilities" plugin--><document>
  <code file="plot_binomial_distribution.php" />
  <dialog label="Plot normal probabilities" >
    <tabbook>
      <tab label="Plot normal probabilities" >
        <frame>
          <row>
            <column>
              <row>
                <spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="n" initial="100" max="10000000" label="Number of Observations" />
              </row>
              <row>
                <frame label="Range" >
                  <spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="min" initial="-3.291" max="10000000" label="Minumum" />
                  <spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="max" initial="3.291" max="10000000" label="Maximum" />
                </frame>
              </row>
              <row>
                <spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="mean" initial="0" max="10000000" label="mu (mean)" />
		<spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="sd" initial="1" max="10000000" label="sigma (standard deviation)" label="standard deviation" />
              </row>
            </column>
            <column>
              <radio id="function" label="Choose type of function plot" >
                <option value="dnorm" label="Plot density function" />
		<option value="pnorm" label="Plot distribution" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: binomial_probabilities.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp = (pbinom (q = <? getRK ("q"); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>))
rk.temp.date = date()
<?
	}
	
	function printout () {

		//produce the output
?>
cat ("<h1>Binomial tail probability</h1>")

	cat ("<table border = \"1\">")
		cat ("<TR><TD>Method:</TD><TD>Variable value = <? getRK ("q"); ?></TD><TD>Binomial trials =  <? getRK ("size"); ?></TD><TD>Probability of success =  <? getRK ("prob"); ?></TD><TD><? getRK ("tail"); ?></TD></TR>")
		cat ("<TR><TD>", rk.temp.date,"</TD></TR>")
			cat ("<TR><TD></TD></TR>")
		cat ("<TR><TD>Binomial tail probability:</TD><TD> ", rk.temp," </TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp)
rm (rk.temp.date)
<?
	}
?>

--- NEW FILE: t_quantiles.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp = (qt (p = <? getRK ("p"); ?>, df = <? getRK ("df"); ?>, <? getRK ("tail"); ?>))
rk.temp.date = date()
<?
	}
	
	function printout () {

		//produce the output
?>
cat ("<h1>t quantile</h1>")

	cat ("<table border = \"1\">")
		cat ("<TR><TD>Method:</TD><TD>Probabilities [0,1] : <? getRK ("p"); ?></TD><TD>Degree of Freedom :  <? getRK ("df"); ?></TD><TD><? getRK ("tail"); ?></TD></TR>")
		cat ("<TR><TD>", rk.temp.date,"</TD></TR>")
			cat ("<TR><TD></TD></TR>")
		cat ("<TR><TD>t quantile:</TD><TD> ", rk.temp," </TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp)
rm (rk.temp.date)
<?
	}
?>

--- NEW FILE: binomial_quantiles.xml ---
<!DOCTYPE rkplugin>
<!--This is the "Binomial quantile" plugin-->

<document>
  <code file="binomial_quantiles.php" />
  <dialog label="Binomial quantile" >
    <tabbook>
      <tab label="Binomial quantile" >
        <frame>
          <row>
            <column>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="p" min="0" max="1" label="Probability"/>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="size" min="0" max="10" label="Binomial trials"/>
	      <spinbox max_precision="2" default_precision="2" type="real" initial="0.5" id="prob" min="0" max="1" label="Probability of success"/>
            </column>
            <column>
              <radio id="tail" label="Choose type of probability" >
                <option value="lower.tail=TRUE" label="lower tail" />
                <option value="upper.tail=TRUE" label="upper tail" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: plot_normal_distribution.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp.date = date()
<?
	}
	
	function printout () {
?>cat ("<h1>Plot density <? getRK ("function"); ?></h1>")
rk.graph.on ()
plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>))
rk.graph.off ()
cat ("<table border = \"1\">")
		cat ("<TR><TD>Created</TD><TD> ", rk.temp.date," </TD></TR>")
		cat ("<TR><TD>Number of Observations</TD><TD><? getRK ("n"); ?></TD></TR>")
		cat ("<TR><TD>Minimum</TD><TD><? getRK ("min"); ?></TD></TR>")
		cat ("<TR><TD>Maximum</TD><TD><? getRK ("max"); ?></TD></TR>")
		cat ("<TR><TD>Mean</TD><TD><? getRK ("mean"); ?></TD></TR>")
		cat ("<TR><TD>Standard Deviation</TD><TD><? getRK ("sd"); ?></TD></TR>")
		cat ("<TR><TD>Function</TD><TD><? getRK ("function"); ?></TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp.date)
rm (rk.temp.seq)
<?
	}
?>

--- NEW FILE: plot_poisson_distribution.xml ---
<!DOCTYPE rkplugin>
<!--This is the simple "Plot Poisson probabilities" plugin--><document>
  <code file="plot_poisson_distribution.php" />
  <dialog label="Plot Poisson probabilities" >
    <tabbook>
	    <tab label="Plot Poisson probabilities" >
        <frame>
          <row>
            <column>
              <row>
                <frame label="Range" >
                  <spinbox max_precision="" default_precision="" type="real" min="0" id="min" initial="0" max="10000000" label="Minumum" />
                  <spinbox max_precision="" default_precision="" type="real" min="0" id="max" initial="12" max="10000000" label="Maximum" />
                </frame>
              </row>
              <row>
                <spinbox max_precision="" default_precision="" type="real" min="-10000000" id="mean" initial="0" max="10000000" label="mean" />
              </row>
            </column>
            <column>
              <radio id="function" label="Choose type of function plot" >
		      <option value="dpois" label="Plot density function" />
		      <option value="ppois" label="Plot distribution" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: chi_squared_probabilities.xml ---
<!DOCTYPE rkplugin>
<!--This is the "Chi-squared probability" plugin-->
<document>
	<code file="chi_squared_probabilities.php" />
	<dialog label="Chi-squared probability" >
	<tabbook>
		<tab label="Chi-squared probability" >
		<frame>
			<row>
			<column>
			<spinbox max_precision="2" default_precision="2" type="real" initial="" id="val" min="0" max="1" label="Variable value"/>
			<spinbox max_precision="2" default_precision="2" type="real" initial="0" id="df" min="0" max="10" label="Degree of Freedom"/>
			<spinbox max_precision="2" default_precision="2" type="real" initial="0" id="ncp" min="0" max="1417" label="non-centrality parameter"/>
			</column>
			<column>
				<radio id="tail" label="Choose type of probability" >
				<option value="lower.tail=TRUE" label="lower tail" />
				<option value="lower.tail=FALSE" label="upper tail" />
				</radio>
			</column>
			</row>
		</frame>
		</tab>
		</tabbook>
	</dialog>
</document>

--- NEW FILE: binomial_probabilities.xml ---
<!DOCTYPE rkplugin>
<!--This is the "Binomial tail probability" plugin-->

<document>
  <code file="binomial_probabilities.php" />
  <dialog label="Binomial tail probability" >
    <tabbook>
      <tab label="Binomial tail probability" >
        <frame>
          <row>
            <column>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="q" min="0" max="1" label="Variable value"/>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="size" min="0" max="10" label="Binomial trials"/>
	      <spinbox max_precision="2" default_precision="2" type="real" initial="0.5" id="prob" min="0" max="1" label="Probability of success"/>
            </column>
            <column>
              <radio id="tail" label="Choose type of probability" >
                <option value="lower.tail=TRUE" label="lower tail" />
                <option value="upper.tail=TRUE" label="upper tail" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: f_quantiles.xml ---
<!DOCTYPE rkplugin>
<!--This is the "F quantile" plugin--><document>
  <code file="f_quantiles.php" />
  <dialog label="F quantile" >
    <tabbook>
      <tab label="F quantile" >
        <frame>
          <row>
            <column>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="p" min="0" max="1" label="Probability"/>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="df1" min="0" max="10" label="Numerator degree of Freedom"/>
	      <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="df2" min="0" max="10" label="Denominator degree of Freedom"/>
            </column>
            <column>
              <radio id="tail" label="Choose type of probability" >
                <option value="lower.tail=TRUE" label="lower tail" />
                <option value="upper.tail=TRUE" label="upper tail" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: plot_t_distribution.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp.date = date()
<?
	}
	
	function printout () {
?>cat ("<h1>Plot density <? getRK ("function"); ?></h1>")
rk.graph.on ()
plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>))
rk.graph.off ()
cat ("<table border = \"1\">")
		cat ("<TR><TD>Created</TD><TD> ", rk.temp.date," </TD></TR>")
		cat ("<TR><TD>Number of Observations</TD><TD><? getRK ("n"); ?></TD></TR>")
		cat ("<TR><TD>Minimum</TD><TD><? getRK ("min"); ?></TD></TR>")
		cat ("<TR><TD>Maximum</TD><TD><? getRK ("max"); ?></TD></TR>")
		cat ("<TR><TD>Mean</TD><TD><? getRK ("mean"); ?></TD></TR>")
		cat ("<TR><TD>Standard Deviation</TD><TD><? getRK ("sd"); ?></TD></TR>")
		cat ("<TR><TD>Function</TD><TD><? getRK ("function"); ?></TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp.date)
rm (rk.temp.seq)
<?
	}
?>

--- NEW FILE: plot_normal_distribution.xml ---
<!DOCTYPE rkplugin>
<!--This is the simple "Plot normal probabilities" plugin--><document>
  <code file="plot_normal_distribution.php" />
  <dialog label="Plot normal probabilities" >
    <tabbook>
      <tab label="Plot normal probabilities" >
        <frame>
          <row>
            <column>
              <row>
                <spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="n" initial="100" max="10000000" label="Number of Observations" />
              </row>
              <row>
                <frame label="Range" >
                  <spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="min" initial="-3.291" max="10000000" label="Minumum" />
                  <spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="max" initial="3.291" max="10000000" label="Maximum" />
                </frame>
              </row>
              <row>
                <spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="mean" initial="0" max="10000000" label="mu (mean)" />
		<spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="sd" initial="1" max="10000000" label="sigma (standard deviation)" label="standard deviation" />
              </row>
            </column>
            <column>
              <radio id="function" label="Choose type of function plot" >
                <option value="dnorm" label="Plot density function" />
		<option value="pnorm" label="Plot distribution" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: normal_probabilities.xml ---
<!DOCTYPE rkplugin>
<!--This is the simple "Normal probabilities" plugin-->
<document>
  <code file="normal_probabilities.php" />
  <dialog label="Normal probabilities" >
    <tabbook>
	<tab label="Normal probabilities" >
        <frame>
          <row>
            <column>
	     <spinbox max_precision="2" default_precision="2" type="real" initial="" id="val" min="-10000000" max="10000000" label="Variable value(s)"/>
             <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="mean" min="-10000000" max="10000000" label="mu (mean)"/>
             <spinbox max_precision="2" default_precision="2" type="real" initial="1" id="sd" min="-10000000" max="10000000" label="sigma (standard deviation)"/>
            </column>
            <column>
              <radio id="tail" label="Choose type of probability" >
                <option value="lower.tail=TRUE" label="lower tail" />
                <option value="lower.tail=FALSE" label="upper tail" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: binomial_quantiles.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp = (qbinom (p = <? getRK ("p"); ?>, size = <? getRK ("size"); ?>, prob = <? getRK ("prob"); ?>, <? getRK ("tail"); ?>))
rk.temp.date = date()
<?
	}
	
	function printout () {

		//produce the output
?>
cat ("<h1>Binomial quantile</h1>")

	cat ("<table border = \"1\">")
		cat ("<TR><TD>Method:</TD><TD>Probabilities [0,1] = <? getRK ("p"); ?></TD><TD>Binomial trials =  <? getRK ("size"); ?></TD><TD>Probability of success =  <? getRK ("prob"); ?></TD><TD><? getRK ("tail"); ?></TD></TR>")
		cat ("<TR><TD>", rk.temp.date,"</TD></TR>")
			cat ("<TR><TD></TD></TR>")
		cat ("<TR><TD>Binomial quantile:</TD><TD> ", rk.temp," </TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp)
rm (rk.temp.date)
<?
	}
?>

--- NEW FILE: chi_squared_probabilities.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp = (pchisq (q = <? getRK ("val"); ?>, df = <? getRK ("df"); ?>,  ncp = <? getRK ("ncp"); ?>, <? getRK ("tail"); ?>))
rk.temp.date = date()
<?
	}
	
	function printout () {

		//produce the output
?>
cat ("<h1>Chi-squared probaility</h1>")

	cat ("<table border = \"1\">")
		cat ("<TR><TD>Method:</TD><TD>Variable value = <? getRK ("val"); ?></TD><TD>Degree of Freedom =  <? getRK ("df"); ?></TD><TD>ncp = <? getRK ("ncp"); ?></TD><TD><? getRK ("tail"); ?></TD></TR>")
		cat ("<TR><TD>", rk.temp.date,"</TD></TR>")
			cat ("<TR><TD></TD></TR>")
		cat ("<TR><TD>Chi-squared probaility:</TD><TD> ", rk.temp," </TD></TR>")
	cat ("</table>")
<?
	}
	
	function cleanup () {
?>
rm (rk.temp)
rm (rk.temp.date)
<?
	}
?>

--- NEW FILE: t_quantiles.xml ---
<!DOCTYPE rkplugin>
<!--This is the "t quantile" plugin-->
<document>
  <code file="t_quantiles.php" />
  <dialog label="t quantile" >
    <tabbook>
      <tab label="t quantile" >
        <frame>
          <row>
            <column>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="p" min="0" max="1" label="Probability"/>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="df" min="0" max="10" label="Degree of Freedom"/>
            </column>
            <column>
              <radio id="tail" label="Choose type of probability" >
                <option value="lower.tail=TRUE" label="lower tail" />
                <option value="upper.tail=TRUE" label="upper tail" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: binomial_tail_probabilities.xml ---
<!DOCTYPE rkplugin>
<!--This is the "Binomial tail probability" plugin-->

<document>
  <code file="binomial_tail_probabilities.php" />
  <dialog label="Binomial tail probability" >
    <tabbook>
      <tab label="Binomial tail probability" >
        <frame>
          <row>
            <column>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0.95" id="q" min="0" max="1" label="Variable value"/>
              <spinbox max_precision="2" default_precision="2" type="real" initial="0" id="size" min="0" max="10" label="Binomial trials"/>
	      <spinbox max_precision="2" default_precision="2" type="real" initial="0.5" id="prob" min="0" max="1" label="Probability of success"/>
            </column>
            <column>
              <radio id="tail" label="Choose type of probability" >
                <option value="lower.tail=TRUE" label="lower tail" />
                <option value="upper.tail=TRUE" label="upper tail" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: plot_t_distribution.xml ---
<!DOCTYPE rkplugin>
<!--This is the simple "Plot t probabilities" plugin-->

<document>
  <code file="plot_t_distribution_density.php" />
  <dialog label="Plot t probabilities" >
    <tabbook>
      <tab label="Plot t probabilities" >
        <frame>
          <row>
            <column>
              <row>
                <spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="n" initial="100" max="10000000" label="Number of Observations" />
              </row>
              <row>
                <frame label="Range" >
			<spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="min" initial="-12.924" max="10000000" label="Minumum" />
			<spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="max" initial="12.924" max="10000000" label="Maximum" />
                </frame>
              </row>
              <row>
                <spinbox max_precision="2" default_precision="2" type="real" min="-10000000" id="mean" initial="0" max="10000000" label="Degree of freedom" />
              </row>
            </column>
            <column>
              <radio id="function" label="Choose type of function plot" >
                <option value="dt" label="Plot density function" />
		<option value="pt" label="Plot distribution" />
              </radio>
            </column>
          </row>
        </frame>
      </tab>
    </tabbook>
  </dialog>
</document>





More information about the rkward-tracker mailing list