2
function preprocess () {
5
function calculate () {
9
?>rk.header ("Plot density <? getRK ("function"); ?>", list ("Number of Observations", "<? getRK ("n"); ?>", "Minimum", "<? getRK ("min"); ?>", "Maximum", "<? getRK ("max"); ?>", "Degrees of freedom", "<? getRK ("df"); ?>", "Function", "<? getRK ("function"); ?>"));
12
plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , df = <? getRK ("df"); ?>), xlab=expression(chi^2))
2
include ("plot_dist_common.php");
4
function getParameters () {
7
$options['df'] = getRK_val ("df");
8
$options['ncp'] = getRK_val ("ncp");
9
getContRangeParameters ();
11
if ($options['is_density']) {
12
$options['fun'] = "dchisq";
14
$options['fun'] = "pchisq";
18
function doHeader () {
21
echo ('rk.header ("Chisquare ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Degrees of freedom", "' . $options['df'] . '", "Non-centrality parameter", "' . $options['ncp'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
24
function doFunCall () {
27
echo ($options['fun'] . '(x, df=' . $options['df'] . ', ncp=' . $options['ncp'] . $options['log_option'] . $options['tail_option'] . ')');