.-
help for ^chitesti^
.-

Chi-square test for univariate frequency distributions
------------------------------------------------------

    ^chitesti^ #obs1 #obs2 [...] [ ^\^ #exp1 #exp2 [...] ]
    [ ^,^ ^nfit(#) replace^ ]

Description
-----------

The input for ^chitesti^ must consist of
    either a single row of values
    or two rows of values separated by '^\^'.

The first row is taken to be observed frequencies, which must be zeros
or positive integers. The second row, if present, is taken to be
expected frequencies under some hypothesis, which must be positive.
These may be given either as numbers or as arithmetic expressions
without embedded spaces. If the second row is not present, the expected
frequencies are taken to be equal, i.e. equal to the mean of the
observed frequencies.

The display includes the Pearson chi-square statistic and its P-value
for a test of the hypothesis, the likelihood-ratio chi-square statistic
and its P-value, observed frequencies, expected frequencies, classic
residuals (observed - expected), and Pearson residuals, defined as
(observed - expected)/sqrt(expected).

Any cells with expected frequencies less than 5 are flagged.

Option
------

^nfit^ indicates the number of parameters that have been estimated from
    the data. This number will be subtracted from (number of cells - 1)
    to give the number of degrees of freedom. The default is 0.

^replace^ indicates that the observed and expected frequencies are to be
    left as the current data in place of whatever data was there. These
    variables will be called ^observed^ and ^expected^.

Examples
--------

        . ^chitesti 315 108 101 32 \ 312.75 104.25 104.25 34.75^

        . ^chitesti 315 108 101 32 \ 556*9/16 556*3/16 556*3/16 556*1/16^

        . ^chitesti 315 108 101 32 \ 312.75 104.25 104.25 34.75,^
          ^replace^

Saved values
------------

    S_1      number of classes in distribution
    S_2      degrees of freedom
    S_3      Pearson chi-square
    S_4      P-value of Pearson chi-square
    S_5      likelihood-ratio chi-square
    S_6      P-value of likelihood-ratio chi-square

Author
------
         Nicholas J. Cox, University of Durham, U.K.
         n.j.cox@@durham.ac.uk

Also see
--------

 Manual:  [4] immediate, chitest
On-line:  help for @immed@, @chitest@

