Description Usage Arguments Details Value References See Also Examples
Calculate the chi-squared statistic from observed and expected counts using the Litchfield and Wilcoxon (1949) approach.
1 | LWchi2(obsn, expn, totn)
|
obsn |
A numeric vector of observed counts. |
expn |
A numeric vector of expected counts, the same length as |
totn |
A numeric vector of total counts possible, the same length as |
The denominator of Litchfield and Wilcoxon's (1949) chi-squared estimate
is the minimum of the expn
and (totn
- expn
)
following their Nomograph No. 1. This ensures that the same chi-squared
value is calculated regardless of which proportion is reported (e.g.,
affected vs. not affected).
A list of length two.
The first element is a numeric vector of length three:
chistat
, chi-squared statistic;
df
, degrees of freedom; and
pval
, P value.
The second element is a numeric vector the same length as obsn
,
containing total contributions to the chi-squared. To get the
individual contributions to the chi-squared as reported in
Litchfield and Wilcoxon (1949), divide by totn
.
Litchfield, JT Jr. and F Wilcoxon. 1949. A simplified method of evaluating dose-effect experiments. Journal of Pharmacology and Experimental Therapeutics 96(2):99-113. [link].
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.