fast_lma {svs}R Documentation

Log-Multiplicative Association Analysis

Description

A fast procedure for computing log-multiplicative analysis, i.e. Goodman's _RC(M)_ association model.

Usage

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"
)

Arguments

dat

Input data: can be a table or a data frame.

k

Numeric specification of the number of latent axes to compute (i.e. k = M).

weights

Character specification of the weights applied to standardize the coordinates: can be one of "marginal", "uniform", "unit" or "none".

tol

Numeric specification of the convergence criterion.

base

Numeric specification of the base with respect to which logarithms are computed.

init

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.

Details

For now (i.e. version 3.0.0 of the svs package), the data frame must have only two columns.

Value

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).

References

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.

Examples

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

[Package svs version 3.1.1 Index]