scfa {cfa}R Documentation

One sample CFA

Description

Performs a configuration frequency analysis if only one set of counts exists. This function is not designed to be called directly by the user but will only be used internally by by cfa(). Both the simple an the multiple cfa are handled by cfa()

Usage

scfa(cfg, cnt=NA, sorton="chisq", sort.descending=TRUE, format.labels=TRUE)

Arguments

cfg Contains the configurations. This can be a dataframe or a matrix. The dataframe can contain numbers, characters, factors or booleans. The matrix can consist of numbers, characters or booleans (factors are implicitely re-converted to numerical levels). There must be >=3 columns.
cnt Contains the counts for the configuration. If it is set to NA, a count of one is assumed for every row. This allows untabulated data to be processed. cnts is a vector.
sorton Determines the sorting order of the output. Can be set to chisq, n, or label.
sort.descending Sort in descending order
format.labels Format the labels of the configuration. This makes to output wider but it will increase the readability.

Details

This function is the "engine" cfa() will use. It does the aggregation, summing up, and will calculate chi squared. All tests of significance are left to cfa()

Value

The function returns the following list:

labels Configuration label
n.levels Number of levels for each configuration
sums Sums for each configuration and each variable in the configuration
counts Observed n of the given configuration
expected Expected n for the given configuration
chisq Chi squared for each configuration

Note

There are no hard-coded limits in the program so even large tables can be processed.

Author(s)

Stefan Funke <s.funke@t-online.de>

References

Krauth J., Lienert G. A. (1973, Reprint 1995) Die Konfigurationsfrequenzanalyse (KFA) und ihre Anwendung in Psychologie und Medizin, Beltz Psychologie Verlagsunion

Lautsch, E., von Weber S. (1995) Methoden und Anwendungen der Konfigurationsfrequenzanalyse Psychologie und Medizin, Beltz Psychologie Verlagsunion

Eye, A. von (1990) Introduction to configural frequency analysis. The search for types and anti-types in cross-classification. Cambride 1990

See Also

cfa, mcfa

Examples

 
# library(cfa) if not yet loaded
# Some random configurations:
configs<-cbind(c("A","B")[rbinom(250,1,0.3)+1],c("C","D")[rbinom(250,1,0.1)+1],
          c("E","F")[rbinom(250,1,0.3)+1],c("G","H")[rbinom(250,1,0.1)+1])
counts<-trunc(runif(250)*10)
cfa(configs,counts) 
# cfa rather than scfa!

[Package cfa version 0.8-4 Index]