A fast procedure for computing log-multiplicative analysis, i.e. Goodman's _RC(M)_ association model.
fast_lma(
dat,
k,
weights = "marginal",
tol = 1e-08,
base = exp(1),
init = "marginal"
)fast_rca(
dat,
k,
weights = "marginal",
tol = 1e-08,
base = exp(1),
init = "marginal"
)
Input data: can be a table or a data frame.
Numeric specification of the number of latent axes to compute (i.e. k = M).
Character specification of the weights applied to standardize the coordinates: can be one of
"marginal"
, "uniform"
, "unit"
or "none"
.
Numeric specification of the convergence criterion.
Numeric specification of the base with respect to which logarithms are computed.
Character specification of the initialization scheme for the marginal parameters: can be either
"kateri"
or "marginal"
. This argument may change in future versions of the svs package.
A list with components:
mar
A list with marginal parameters in components mar1
and mar2
; not so important for the analysis.
val
The association parameters, indicating how much association each latent axis explains.
pos1
The coordinates of the first set of levels (viz. the row levels of a frequency table).
pos2
The coordinates of the second set of levels (viz. the column levels of a frequency table).
For now (i.e. version 3.0.0 of the svs package), the data frame must have only two columns.
Goodman, L. A. (1979) Simple models for the analysis of association in cross-classifications having ordered categories. Journal of the American statistical association 74 (367), 537--552.
Kateri, M. (2014) Contingency table analysis. Methods and implementation using R. New York: Springer-Birkhauser.
Wong, R. S.-K. (2010) Association models. Thousand Oaks: SAGE.
# NOT RUN {
SndT_Fra <- read.table(system.file("extdata", "SndT_Fra.txt", package = "svs"),
header = TRUE, sep = "\t", quote = "\"", encoding = "UTF-8",
stringsAsFactors = FALSE)
lma.SndT_Fra <- fast_lma(SndT_Fra, k = 7)
lma.SndT_Fra
# }
Run the code above in your browser using DataLab