CFA {confreq} | R Documentation |
Configural Frequencies Analysis Main Function
Description
Calculates various coefficients for the Configural Frequencies Analysis (CFA) defining main- and (optional) 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 formula definition given in argument form
.
Usage
CFA(
patternfreq,
alpha = 0.05,
form = NULL,
ccor = FALSE,
family = poisson(),
intercept = FALSE,
method = "log",
blank = NULL,
cova = NULL,
bintest = TRUE,
...
)
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 whether to apply a continuity correction or not for the Binomial Approximation to the z-Test. When set to |
family |
argument passed to |
intercept |
argument passed to |
method |
character defining the estimation method for expected frequencies with default set to |
blank |
can be used to indicate which pattern (configurations) are declared as structural cells (configurations) for functional CFA. Should be either (1) a character vector defining the pattern (with spaces between variable categories), which will be ignored for calculation of expected frequencies; or (2) a numeric vector defining the (row) positions of the pattern in an object of class |
cova |
a matrix (possibly with one or more columns) holding the covariate (mean) values for each pattern (configurations) see function |
bintest |
a logical with default set to |
... |
additional parameters passed through to other functions. |
Details
This is the main function of the package. It internal calls several functions of the package confreq-package
which are also available as single functions. For classification of the observed patterns into 'Types' and 'Antitypes' according to Lienert (1971), a S3 summary method for the resulting object of class "CFA"
can be applied - see summary.CFA
. An S3 plot method is useful for visualization of the contingency table and the 'Types' and 'Antitypes' – see plot.CFA
. Since version 1.6.0-1 of confreq
survey weights are supported when tabluating a data set with function dat2fre
. In case that for the resulting tabulated data in the object of class c("data.frame","Pfreq")
survey weights were used the function CFA
will take into account those weigts for estimation of the expected counts – currently only when method="log"
.
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.
Glück, J., & Von Eye, A. (2000). Including covariates in Configural Frequency Analysis. Psychologische Beitrage, 42, 405–417.
Victor, N. (1989). An Alternativ Approach to Configural Frequency Analysis. Methodika, 3, 61–73.
Stemmler, M. (2020). Person-Centered Methods. Cham: Springer International Publishing.
Examples
#######################################
######### 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)