# Configural Frequencies Analysis Main Function

### Description

Calculates various coefficients for the Configural Frequencies Analysis (CFA) defining main- and (optionaly) interaction effects. The core principle is to use `glm`

in package `stats`

to calculate the expected counts considering a designmatrix, which is constructed based on an formular definition given in argument `form`

.

### Usage

1 2 3 |

### Arguments

`patternfreq` |
an object of class |

`alpha` |
a numeric giving the alpha level for testing (default set to |

`form` |
either a character expression which can be coerced into a model formula with the function |

`ccor` |
either a logical (TRUE / FALSE) determining wether to apply a continuity correction or not. When set to |

`family` |
argument passed to |

`intercept` |
argument passed to |

`method` |
charcter defining the estimation method for expected frequencies with default set to |

`blank` |
unsed only if argument |

`...` |
additional parameters passed through to other functions. |

### Details

This is the main function of the package. It internaly calls several functions of the package `confreq`

which are also available as single functions. For clasification of the observed patterns into 'Types' and 'Antitypes' according to Linert (1971), a S3 summary method for the resulting object of class `"CFA"`

can be applied - see `summary.CFA`

.

### Value

an object of class `CFA`

with results.

### References

Lienert, G. A. (1971). Die Konfigurationsfrequenzanalyse: I. Ein neuer Weg zu Typen und Syndromen. *Zeitschrift für Klinische Psychologie und Psychotherapie, 19*(2), 99-115.

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
#######################################
######### some examples ########
data(LienertLSD)
LienertLSD
res1 <- CFA(LienertLSD)
summary(res1)
## testing with (full) interactions
res2 <- CFA(LienertLSD,form="~ C + T + A + C:T + C:A + T:A + C:T:A")
summary(res2)
#' ## testing the null model
res3 <- CFA(LienertLSD,form="null")
summary(res3)
#######################
data(suicide)
suicide
# suicide data is in non tabulated data representation - so it must be tabulated !
res4 <- CFA(dat2fre(suicide))
summary(res4)
``` |