stirling_cfa | R Documentation |
Calculates the binomial aproximation using stirling's formula (Version of function: V 1.0 - November 2013)
stirling_cfa( observed, expected = NULL, n = sum(observed), p = NULL, cum = T, verb = T )
observed |
a integer vector with observed freqencies |
expected |
a vector giving the expected frequencies. expected can be set to |
n |
number of trials (scalar) default is |
p |
a vector of cell probabilities. If p is not NULL the argument |
cum |
a logical - computation of cumulative density. If |
verb |
logical - verbose results: If |
Vector p must be of same length as observed _or_ p may be a scalar (e.g. in case of the zero-order CFA).
The routine autoselects the upper or lower tail:
if obs > exp then sum obs:n
else sum 0:obs
The stirling approximation cannot be evaluated if the observed frequency is 0 or n. Therefore, the proposal of A. von Eye (20xx) is adopted, taking the sum up to 1 or n-1, respectively.
R.W. Alexandrowicz
von Eye, A. (2002). Configural Frequency Analysis. Methods, Models, and Applications. Mahwah, NJ, LEA.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.